Commit 532deabb authored by Dmitry Kazakov's avatar Dmitry Kazakov

Add override keyword in every function that is overridden

Thanks Kevin Funk for providing a patch!
parent 2f59d0d1

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -30,8 +30,8 @@ public:
/// Constructor
KoCreatePathToolFactory();
/// Destructor
~KoCreatePathToolFactory();
~KoCreatePathToolFactory() override;
KoToolBase* createTool(KoCanvasBase *canvas);
KoToolBase* createTool(KoCanvasBase *canvas) override;
};
#endif
......@@ -26,9 +26,9 @@ class KoPencilToolFactory : public KoToolFactoryBase
{
public:
KoPencilToolFactory();
~KoPencilToolFactory();
~KoPencilToolFactory() override;
KoToolBase * createTool(KoCanvasBase *canvas);
KoToolBase * createTool(KoCanvasBase *canvas) override;
};
#endif // _KOPENCILTOOLFACTORY_H_
......@@ -28,6 +28,6 @@ class Plugin : public QObject
public:
Plugin(QObject * parent, const QVariantList &);
~Plugin() {}
~Plugin() override {}
};
#endif
......@@ -47,21 +47,21 @@ public:
* @param canvas the canvas this tool will be working for.
*/
explicit KoCreatePathTool(KoCanvasBase * canvas);
virtual ~KoCreatePathTool();
~KoCreatePathTool() override;
/// reimplemented
virtual void paint(QPainter &painter, const KoViewConverter &converter);
void paint(QPainter &painter, const KoViewConverter &converter) override;
/// reimplemented
virtual void mousePressEvent(KoPointerEvent *event);
void mousePressEvent(KoPointerEvent *event) override;
/// reimplemented
virtual void mouseDoubleClickEvent(KoPointerEvent *event);
void mouseDoubleClickEvent(KoPointerEvent *event) override;
/// reimplemented
virtual void mouseMoveEvent(KoPointerEvent *event);
void mouseMoveEvent(KoPointerEvent *event) override;
/// reimplemented
virtual void mouseReleaseEvent(KoPointerEvent *event);
void mouseReleaseEvent(KoPointerEvent *event) override;
/// reimplemented
virtual void keyPressEvent(QKeyEvent *event);
void keyPressEvent(QKeyEvent *event) override;
/// For behavior as selection tool and with initial shift-key
virtual bool listeningToModifiers();
......@@ -73,11 +73,11 @@ public:
public Q_SLOTS:
/// reimplemented
virtual void activate(ToolActivation activation, const QSet<KoShape*> &shapes);
void activate(ToolActivation activation, const QSet<KoShape*> &shapes) override;
/// reimplemented
virtual void deactivate();
void deactivate() override;
/// reimplemented
virtual void documentResourceChanged(int key, const QVariant & res);
void documentResourceChanged(int key, const QVariant & res) override;
protected:
/**
......@@ -99,7 +99,7 @@ protected:
void removeLastPoint();
/// reimplemented
virtual QList<QPointer<QWidget> > createOptionWidgets();
QList<QPointer<QWidget> > createOptionWidgets() override;
private:
Q_DECLARE_PRIVATE(KoCreatePathTool)
......
......@@ -120,7 +120,7 @@ public:
m_angleStep = qAbs(angleStep);
}
virtual bool snap(const QPointF &mousePosition, KoSnapProxy * proxy, qreal maxSnapDistance) {
bool snap(const QPointF &mousePosition, KoSnapProxy * proxy, qreal maxSnapDistance) override {
Q_UNUSED(proxy);
if (!m_active)
......@@ -148,7 +148,7 @@ public:
return true;
}
virtual QPainterPath decoration(const KoViewConverter &converter) const {
QPainterPath decoration(const KoViewConverter &converter) const override {
Q_UNUSED(converter);
QPainterPath decoration;
......
......@@ -35,21 +35,21 @@ class KRITABASICFLAKES_EXPORT KoPencilTool : public KoToolBase
Q_OBJECT
public:
explicit KoPencilTool(KoCanvasBase *canvas);
~KoPencilTool();
~KoPencilTool() override;
void paint(QPainter &painter, const KoViewConverter &converter);
void repaintDecorations();
void paint(QPainter &painter, const KoViewConverter &converter) override;
void repaintDecorations() override;
void mousePressEvent(KoPointerEvent *event) ;
void mouseMoveEvent(KoPointerEvent *event);
void mouseReleaseEvent(KoPointerEvent *event);
void keyPressEvent(QKeyEvent *event);
void mousePressEvent(KoPointerEvent *event) override ;
void mouseMoveEvent(KoPointerEvent *event) override;
void mouseReleaseEvent(KoPointerEvent *event) override;
void keyPressEvent(QKeyEvent *event) override;
virtual void activate(ToolActivation activation, const QSet<KoShape*> &shapes);
void deactivate();
void activate(ToolActivation activation, const QSet<KoShape*> &shapes) override;
void deactivate() override;
protected:
virtual QList<QPointer<QWidget> > createOptionWidgets();
QList<QPointer<QWidget> > createOptionWidgets() override;
/**
* Add path shape to document.
......
......@@ -47,28 +47,28 @@ public:
KisAbrBrush(const QString& filename, KisAbrBrushCollection *parent);
KisAbrBrush(const KisAbrBrush& rhs);
KisAbrBrush(const KisAbrBrush& rhs, KisAbrBrushCollection *parent);
KisBrush* clone() const;
KisBrush* clone() const override;
virtual bool load();
bool load() override;
virtual bool loadFromDevice(QIODevice *dev);
bool loadFromDevice(QIODevice *dev) override;
virtual bool save();
bool save() override;
virtual bool saveToDevice(QIODevice* dev) const;
bool saveToDevice(QIODevice* dev) const override;
/**
* @return default file extension for saving the brush
*/
virtual QString defaultFileExtension() const;
QString defaultFileExtension() const override;
virtual QImage brushTipImage() const;
QImage brushTipImage() const override;
friend class KisAbrBrushCollection;
virtual void setBrushTipImage(const QImage& image);
void setBrushTipImage(const QImage& image) override;
void toXML(QDomDocument& d, QDomElement& e) const;
void toXML(QDomDocument& d, QDomElement& e) const override;
private:
KisAbrBrushCollection *m_parent;
......
......@@ -50,17 +50,17 @@ public:
/// Construct brush to load filename later as brush
KisAbrBrushCollection(const QString& filename);
KisBrush* clone() const;
KisBrush* clone() const override;
virtual ~KisAbrBrushCollection() {}
~KisAbrBrushCollection() override {}
virtual bool load();
bool load() override;
virtual bool loadFromDevice(QIODevice *dev);
bool loadFromDevice(QIODevice *dev) override;
virtual bool save();
bool save() override;
virtual bool saveToDevice(QIODevice* dev) const;
bool saveToDevice(QIODevice* dev) const override;
/**
* @return a preview of the brush
......@@ -70,7 +70,7 @@ public:
/**
* @return default file extension for saving the brush
*/
virtual QString defaultFileExtension() const;
QString defaultFileExtension() const override;
QList<KisAbrBrush*> brushes() {
return m_abrBrushes.values();
......@@ -79,7 +79,7 @@ public:
protected:
KisAbrBrushCollection(const KisAbrBrushCollection& rhs);
void toXML(QDomDocument& d, QDomElement& e) const;
void toXML(QDomDocument& d, QDomElement& e) const override;
private:
......
......@@ -38,7 +38,7 @@ public:
KisAutoBrush(const KisAutoBrush& rhs);
KisBrush* clone() const override;
virtual ~KisAutoBrush();
~KisAutoBrush() override;
public:
......@@ -51,21 +51,21 @@ public:
const KisPaintInformation& info) const override;
QSizeF characteristicSize(KisDabShape const&) const override;
virtual KisFixedPaintDeviceSP paintDevice(const KoColorSpace*,
KisFixedPaintDeviceSP paintDevice(const KoColorSpace*,
KisDabShape const&,
const KisPaintInformation&,
double = 0, double = 0) const override {
return 0; // The autobrush does NOT support images!
}
virtual void generateMaskAndApplyMaskOrCreateDab(KisFixedPaintDeviceSP dst,