Code refactoring - remove number of build warnings
This commit is contained in:
@@ -117,7 +117,7 @@
|
||||
<message>
|
||||
<location filename="../../src/widgets/capturelauncher.cpp" line="101"/>
|
||||
<source>Delay:</source>
|
||||
<translation>Затримка: </translation>
|
||||
<translation>Затримка:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -53,8 +53,6 @@ protected:
|
||||
bool m_supportsOrthogonalAdj = false;
|
||||
bool m_supportsDiagonalAdj = false;
|
||||
|
||||
virtual ToolType nameID() const = 0;
|
||||
|
||||
private:
|
||||
QPoint adjustedVector(QPoint v) const;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -73,6 +73,8 @@ bool DraggableWidgetMaker::eventFilter(QObject* obj, QEvent* event)
|
||||
return true;
|
||||
}
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return QObject::eventFilter(obj, event);
|
||||
|
||||
Reference in New Issue
Block a user