Code refactoring - remove number of build warnings

This commit is contained in:
Yuriy Puchkov
2020-12-06 08:18:33 +02:00
parent 3ae34418ad
commit 586ecb07eb
16 changed files with 15 additions and 20 deletions

View File

@@ -117,7 +117,7 @@
<message>
<location filename="../../src/widgets/capturelauncher.cpp" line="101"/>
<source>Delay:</source>
<translation>Затримка: </translation>
<translation>Затримка:</translation>
</message>
</context>
<context>

View File

@@ -36,9 +36,6 @@ public:
void paintMousePreview(QPainter& painter,
const CaptureContext& context) override;
protected:
virtual ToolType nameID() const = 0;
public slots:
void drawEnd(const QPoint& p) override;
void drawMove(const QPoint& p) override;

View File

@@ -42,8 +42,6 @@ protected:
void updateBackup(const QPixmap& pixmap);
void addPoint(const QPoint& point);
virtual ToolType nameID() const = 0;
QPixmap m_pixmapBackup;
QRect m_backupArea;
QColor m_color;

View File

@@ -53,8 +53,6 @@ protected:
bool m_supportsOrthogonalAdj = false;
bool m_supportsDiagonalAdj = false;
virtual ToolType nameID() const = 0;
private:
QPoint adjustedVector(QPoint v) const;
};

View File

@@ -25,7 +25,7 @@ class CopyTool : public AbstractActionTool
public:
explicit CopyTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class ExitTool : public AbstractActionTool
public:
explicit ExitTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class AppLauncher : public AbstractActionTool
public:
explicit AppLauncher(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class MoveTool : public AbstractActionTool
public:
explicit MoveTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class PinTool : public AbstractActionTool
public:
explicit PinTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class RedoTool : public AbstractActionTool
public:
explicit RedoTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class SaveTool : public AbstractActionTool
public:
explicit SaveTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class SelectionTool : public AbstractTwoPointTool
public:
explicit SelectionTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -25,7 +25,7 @@ class SizeIndicatorTool : public AbstractActionTool
public:
explicit SizeIndicatorTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -9,12 +9,12 @@ class ImgUploaderTool : public AbstractActionTool
public:
explicit ImgUploaderTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QString name() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
void setCapture(const QPixmap& pixmap);
void setCapture(const QPixmap& pixmap) override;
const QPixmap& capture();
public slots:

View File

@@ -25,7 +25,7 @@ class UndoTool : public AbstractActionTool
public:
explicit UndoTool(QObject* parent = nullptr);
bool closeOnButtonPressed() const;
bool closeOnButtonPressed() const override;
QIcon icon(const QColor& background, bool inEditor) const override;
QString name() const override;

View File

@@ -73,6 +73,8 @@ bool DraggableWidgetMaker::eventFilter(QObject* obj, QEvent* event)
return true;
}
} break;
default:
break;
}
return QObject::eventFilter(obj, event);