Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 60c0da39 authored by Kevin Funk's avatar Kevin Funk

Modernize: Use override where possible

parent 8a1a4f5b
......@@ -42,7 +42,7 @@ public:
int brightness, int contrast, int gamma,
bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectBalanceCommand ();
~kpEffectBalanceCommand () override;
protected:
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
......
......@@ -42,7 +42,7 @@ public:
int strength,
bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectBlurSharpenCommand ();
~kpEffectBlurSharpenCommand () override;
static QString nameForType (kpEffectBlurSharpen::Type type);
......
......@@ -42,7 +42,7 @@ public:
kpEffectClearCommand (bool actOnSelection,
const kpColor &newColor,
kpCommandEnvironment *environ);
virtual ~kpEffectClearCommand ();
~kpEffectClearCommand () override;
QString name () const Q_DECL_OVERRIDE;
......
......@@ -42,7 +42,7 @@ public:
kpEffectCommandBase (const QString &name,
bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectCommandBase ();
~kpEffectCommandBase () override;
QString name () const Q_DECL_OVERRIDE;
SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -40,7 +40,7 @@ public:
kpEffectEmbossCommand (int strength,
bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectEmbossCommand ();
~kpEffectEmbossCommand () override;
protected:
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
......
......@@ -42,7 +42,7 @@ public:
kpEffectFlattenCommand (const QColor &color1, const QColor &color2,
bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectFlattenCommand ();
~kpEffectFlattenCommand () override;
//
......
......@@ -39,7 +39,7 @@ class kpEffectGrayscaleCommand : public kpEffectCommandBase
public:
kpEffectGrayscaleCommand (bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectGrayscaleCommand ();
~kpEffectGrayscaleCommand () override;
//
......
......@@ -43,7 +43,7 @@ public:
kpCommandEnvironment *environ);
kpEffectInvertCommand (bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectInvertCommand ();
~kpEffectInvertCommand () override;
//
......
......@@ -40,7 +40,7 @@ public:
kpEffectToneEnhanceCommand (double granularity, double amount,
bool actOnSelection,
kpCommandEnvironment *environ);
virtual ~kpEffectToneEnhanceCommand ();
~kpEffectToneEnhanceCommand () override;
protected:
kpImage applyEffect (const kpImage &image) Q_DECL_OVERRIDE;
......
......@@ -42,7 +42,7 @@ public:
const kpDocumentMetaInfo &metaInfo,
const kpDocumentMetaInfo &oldMetaInfo,
kpCommandEnvironment *environ);
virtual ~kpDocumentMetaInfoCommand ();
~kpDocumentMetaInfoCommand () override;
SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -40,7 +40,7 @@ public:
bool horiz, bool vert,
kpCommandEnvironment *environ);
virtual ~kpTransformFlipCommand ();
~kpTransformFlipCommand () override;
QString name () const Q_DECL_OVERRIDE;
......
......@@ -57,7 +57,7 @@ public:
int newWidth, int newHeight,
Type type,
kpCommandEnvironment *environ);
virtual ~kpTransformResizeScaleCommand ();
~kpTransformResizeScaleCommand () override;
QString name () const Q_DECL_OVERRIDE;
SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -44,7 +44,7 @@ public:
kpTransformRotateCommand (bool actOnSelection,
double angle, // 0 <= angle < 360 (clockwise)
kpCommandEnvironment *environ);
virtual ~kpTransformRotateCommand ();
~kpTransformRotateCommand () override;
QString name () const Q_DECL_OVERRIDE;
......
......@@ -44,7 +44,7 @@ public:
kpTransformSkewCommand (bool actOnSelection,
int hangle, int vangle,
kpCommandEnvironment *environ);
virtual ~kpTransformSkewCommand ();
~kpTransformSkewCommand () override;
QString name () const Q_DECL_OVERRIDE;
......
......@@ -63,7 +63,7 @@ Q_OBJECT
public:
kpCommandHistory (bool doReadConfig, kpMainWindow *mainWindow);
virtual ~kpCommandHistory ();
~kpCommandHistory () override;
public:
// Same as addCommand(), except that this has a more desirable behavior
......
......@@ -65,7 +65,7 @@ Q_OBJECT
public:
kpCommandHistoryBase (bool doReadConfig, KActionCollection *ac);
virtual ~kpCommandHistoryBase ();
~kpCommandHistoryBase () override;
public:
// (provided for compatibility with KCommandHistory)
......
......@@ -39,7 +39,7 @@ class kpMacroCommand : public kpNamedCommand
{
public:
kpMacroCommand (const QString &name, kpCommandEnvironment *environ);
virtual ~kpMacroCommand ();
~kpMacroCommand () override;
//
......
......@@ -41,7 +41,7 @@ class kpToolFlowCommand : public kpNamedCommand
{
public:
kpToolFlowCommand (const QString &name, kpCommandEnvironment *environ);
virtual ~kpToolFlowCommand ();
~kpToolFlowCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -40,7 +40,7 @@ public:
kpToolColorPickerCommand (int mouseButton,
const kpColor &newColor, const kpColor &oldColor,
kpCommandEnvironment *environ);
virtual ~kpToolColorPickerCommand ();
~kpToolColorPickerCommand () override;
QString name () const Q_DECL_OVERRIDE;
......
......@@ -46,7 +46,7 @@ public:
kpToolFloodFillCommand (int x, int y,
const kpColor &color, int processedColorSimilarity,
kpCommandEnvironment *environ);
virtual ~kpToolFloodFillCommand ();
~kpToolFloodFillCommand () override;
QString name () const Q_DECL_OVERRIDE;
......
......@@ -52,7 +52,7 @@ public:
const kpColor &fcolor, int penWidth,
const kpColor &bcolor,
kpCommandEnvironment *environ);
virtual ~kpToolPolygonalCommand ();
~kpToolPolygonalCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -46,7 +46,7 @@ public:
const kpColor &fcolor, int penWidth,
const kpColor &bcolor,
kpCommandEnvironment *environ);
virtual ~kpToolRectangularCommand ();
~kpToolRectangularCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -55,7 +55,7 @@ public:
const kpAbstractSelection &originalSelBorder,
const QString &name,
kpCommandEnvironment *environ);
virtual ~kpAbstractSelectionContentCommand ();
~kpAbstractSelectionContentCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -41,7 +41,7 @@ public:
const kpImageSelectionTransparency &st,
const kpImageSelectionTransparency &oldST,
kpCommandEnvironment *environ);
virtual ~kpToolImageSelectionTransparencyCommand ();
~kpToolImageSelectionTransparencyCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -43,7 +43,7 @@ public:
// (if fromSelection doesn't have a pixmap, it will only recreate the region)
kpToolSelectionCreateCommand (const QString &name, const kpAbstractSelection &fromSelection,
kpCommandEnvironment *environ);
virtual ~kpToolSelectionCreateCommand ();
~kpToolSelectionCreateCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -42,7 +42,7 @@ class kpToolSelectionDestroyCommand : public kpNamedCommand
public:
kpToolSelectionDestroyCommand (const QString &name, bool pushOntoDocument,
kpCommandEnvironment *environ);
virtual ~kpToolSelectionDestroyCommand ();
~kpToolSelectionDestroyCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -45,7 +45,7 @@ class kpToolSelectionMoveCommand : public kpNamedCommand
{
public:
kpToolSelectionMoveCommand (const QString &name, kpCommandEnvironment *environ);
virtual ~kpToolSelectionMoveCommand ();
~kpToolSelectionMoveCommand () override;
kpAbstractSelection *originalSelectionClone () const;
......
......@@ -46,7 +46,7 @@ public:
const kpColor &backgroundColor,
const QString &name,
kpCommandEnvironment *environ);
virtual ~kpToolSelectionPullFromDocumentCommand ();
~kpToolSelectionPullFromDocumentCommand () override;
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
......
......@@ -58,7 +58,7 @@ Q_OBJECT
public:
kpToolSelectionResizeScaleCommand (kpCommandEnvironment *environ);
virtual ~kpToolSelectionResizeScaleCommand ();
~kpToolSelectionResizeScaleCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -45,7 +45,7 @@ public:
kpToolTextBackspaceCommand (const QString &name,
int row, int col, Action action,
kpCommandEnvironment *environ);
virtual ~kpToolTextBackspaceCommand ();
~kpToolTextBackspaceCommand () override;
void addBackspace ();
......
......@@ -40,7 +40,7 @@ public:
kpToolTextChangeStyleCommand (const QString &name,
const kpTextStyle &newTextStyle, const kpTextStyle &oldTextStyle,
kpCommandEnvironment *environ);
virtual ~kpToolTextChangeStyleCommand ();
~kpToolTextChangeStyleCommand () override;
kpCommandSize::SizeType size () const Q_DECL_OVERRIDE;
......
......@@ -45,7 +45,7 @@ public:
kpToolTextDeleteCommand (const QString &name,
int row, int col, Action action,
kpCommandEnvironment *environ);
virtual ~kpToolTextDeleteCommand ();
~kpToolTextDeleteCommand () override;
void addDelete ();
......
......@@ -45,7 +45,7 @@ public:
kpToolTextEnterCommand (const QString &name,
int row, int col, Action action,
kpCommandEnvironment *environ);
virtual ~kpToolTextEnterCommand ();
~kpToolTextEnterCommand () override;
void addEnter ();
......
......@@ -49,7 +49,7 @@ public:
const kpTextSelection &originalSelBorder,
const QString &name,
kpCommandEnvironment *environ);
virtual ~kpToolTextGiveContentCommand ();
~kpToolTextGiveContentCommand () override;
void execute () Q_DECL_OVERRIDE;
void unexecute () Q_DECL_OVERRIDE;
......
......@@ -54,7 +54,7 @@ public:
kpTransformDialogEnvironment *_env,
QWidget *parent,
int defaultSelectedEffect = 0);
virtual ~kpEffectsDialog ();
~kpEffectsDialog () override;
bool isNoOp () const Q_DECL_OVERRIDE;
kpEffectCommandBase *createCommand () const;
......
......@@ -55,7 +55,7 @@ Q_OBJECT
public:
kpDocumentMetaInfoDialog (const kpDocumentMetaInfo *docMetaInfo,
QWidget *parent);
virtual ~kpDocumentMetaInfoDialog ();
~kpDocumentMetaInfoDialog () override;
public:
bool isNoOp () const;
......
......@@ -65,7 +65,7 @@ public:
bool actOnSelection,
kpTransformDialogEnvironment *_env,
QWidget *parent);
virtual ~kpTransformPreviewDialog ();
~kpTransformPreviewDialog () override;
private:
void createDimensionsGroupBox ();
......
......@@ -50,7 +50,7 @@ public:
kpTransformRotateDialog (bool actOnSelection,
kpTransformDialogEnvironment *_env,
QWidget *parent);
virtual ~kpTransformRotateDialog ();
~kpTransformRotateDialog () override;
private:
static int s_lastWidth, s_lastHeight;
......
......@@ -41,7 +41,7 @@ Q_OBJECT
public:
kpTransformSkewDialog (bool actOnSelection,
kpTransformDialogEnvironment *_env, QWidget *parent);
virtual ~kpTransformSkewDialog ();
~kpTransformSkewDialog () override;
private:
static int s_lastWidth, s_lastHeight;
......
......@@ -48,7 +48,7 @@ Q_OBJECT
public:
kpColorSimilarityDialog (QWidget *parent);
virtual ~kpColorSimilarityDialog ();
~kpColorSimilarityDialog () override;
double colorSimilarity () const;
void setColorSimilarity (double similarity);
......
......@@ -49,7 +49,7 @@ Q_OBJECT
public:
kpDocumentSaveOptionsPreviewDialog (QWidget *parent);
virtual ~kpDocumentSaveOptionsPreviewDialog ();
~kpDocumentSaveOptionsPreviewDialog () override;
QSize preferredMinimumSize () const;
......
......@@ -70,7 +70,7 @@ public:
//
// ?
kpDocument (int w, int h, kpDocumentEnvironment *environ);
~kpDocument ();
~kpDocument () override;
kpDocumentEnvironment *environ () const;
void setEnviron (kpDocumentEnvironment *environ);
......
......@@ -49,7 +49,7 @@ public:
// classes we are trying to hide as that would defeat the point of
// the facade.
kpCommandEnvironment (kpMainWindow *mainWindow);
virtual ~kpCommandEnvironment ();
~kpCommandEnvironment () override;
void somethingBelowTheCursorChanged () const;
......
......@@ -49,7 +49,7 @@ public:
// classes we are trying to hide as that would defeat the point of
// the facade.
kpDocumentEnvironment (kpMainWindow *mainWindow);
virtual ~kpDocumentEnvironment ();
~kpDocumentEnvironment () override;
QWidget *dialogParent () const;
......
......@@ -72,7 +72,7 @@ protected:
// classes we are trying to hide as that would defeat the point of
// the facade.
kpEnvironmentBase (kpMainWindow *mainWindow);
virtual ~kpEnvironmentBase ();
~kpEnvironmentBase () override;
public:
kpDocument *document () const;
......
......@@ -55,7 +55,7 @@ public:
// classes we are trying to hide as that would defeat the point of
// the facade.
kpToolEnvironment (kpMainWindow *mainWindow);
virtual ~kpToolEnvironment ();
~kpToolEnvironment () override;
KActionCollection *actionCollection () const;
......
......@@ -49,7 +49,7 @@ public:
// classes we are trying to hide as that would defeat the point of
// the facade.
kpToolSelectionEnvironment (kpMainWindow *mainWindow);
virtual ~kpToolSelectionEnvironment ();
~kpToolSelectionEnvironment () override;
kpImageSelectionTransparency imageSelectionTransparency () const;
int settingImageSelectionTransparency () const;
......
......@@ -43,7 +43,7 @@ Q_OBJECT
public:
kpResizeSignallingLabel (const QString &string, QWidget *parent);
kpResizeSignallingLabel (QWidget *parent);
virtual ~kpResizeSignallingLabel ();
~kpResizeSignallingLabel () override;
signals:
void resized ();
......
......@@ -50,7 +50,7 @@ public:
const kpTransformAutoCropBorder &topBorder,
const kpTransformAutoCropBorder &botBorder,
kpCommandEnvironment *environ);
virtual ~kpTransformAutoCropCommand ();
~kpTransformAutoCropCommand () override;
enum NameOptions
{
......
......@@ -51,7 +51,7 @@ class SetDocumentToSelectionImageCommand : public kpCommand
{
public:
SetDocumentToSelectionImageCommand (kpCommandEnvironment *environ);
virtual ~SetDocumentToSelectionImageCommand ();
~SetDocumentToSelectionImageCommand () override;
/* (uninteresting child of macro cmd) */
QString name () const Q_DECL_OVERRIDE { return QString(); }
......
......@@ -48,7 +48,7 @@ Q_OBJECT
public:
kpThumbnail (kpMainWindow *parent);
virtual ~kpThumbnail ();
~kpThumbnail () override;
public:
kpThumbnailView *view () const;
......
......@@ -90,7 +90,7 @@ public:
// (Covariant return-type specialization of superclass pure virtual method)
kpAbstractImageSelection *clone () const Q_DECL_OVERRIDE = 0;
virtual ~kpAbstractImageSelection ();
~kpAbstractImageSelection () override;
//
......
......@@ -56,7 +56,7 @@ public:
kpEllipticalImageSelection *clone () const Q_DECL_OVERRIDE;
virtual ~kpEllipticalImageSelection ();
~kpEllipticalImageSelection () override;
//
......
......@@ -56,7 +56,7 @@ public:
kpFreeFormImageSelection *clone () const Q_DECL_OVERRIDE;
virtual ~kpFreeFormImageSelection ();
~kpFreeFormImageSelection () override;
//
......
......@@ -56,7 +56,7 @@ public:
kpRectangularImageSelection *clone () const Q_DECL_OVERRIDE;
virtual ~kpRectangularImageSelection ();
~kpRectangularImageSelection () override;
//
......
......@@ -84,7 +84,7 @@ public:
// implementation of operator=().
virtual kpAbstractSelection *clone () const = 0;
virtual ~kpAbstractSelection ();
~kpAbstractSelection () override;
//
......
......@@ -110,7 +110,7 @@ public:
// <newWidth> x <newHeight>.
kpTextSelection *resized (int newWidth, int newHeight) const;
virtual ~kpTextSelection ();
~kpTextSelection () override;
//
......
......@@ -79,7 +79,7 @@ public:
* Specifying <rows> and <columns> was made optional for KolourPaint.
*/
kpColorCellsBase( QWidget *parent, int rows = 0, int columns = 0 );
~kpColorCellsBase();
~kpColorCellsBase() override;
private:
/** Added for KolourPaint. */
......
......@@ -122,7 +122,7 @@ private:
void saveProperties (KConfigGroup &configGroup) Q_DECL_OVERRIDE;
public:
~kpMainWindow ();
~kpMainWindow () override;
public:
kpDocument *document () const;
......
......@@ -40,7 +40,7 @@ Q_OBJECT
public:
kpToolColorEraser (kpToolEnvironment *environ, QObject *parent);
virtual ~kpToolColorEraser ();
~kpToolColorEraser () override;
public:
......
......@@ -52,7 +52,7 @@ class kpToolFlowBase : public kpTool
int key,
kpToolEnvironment *environ, QObject *parent, const QString &name);
virtual ~kpToolFlowBase();
~kpToolFlowBase() override;
// Returns the dirty rectangle for drawing a brush(of size
// <brushWidth>x<brushHeight>) at <mousePoint>. <mousePoint> will end
......
......@@ -82,7 +82,7 @@ public:
int key,
kpToolEnvironment *environ,
QObject *parent, const QString &name);
virtual ~kpTool ();
~kpTool () override;
kpToolAction *action () const;
......
......@@ -44,7 +44,7 @@ Q_OBJECT
public:
kpToolColorPicker (kpToolEnvironment *environ, QObject *parent);
virtual ~kpToolColorPicker ();
~kpToolColorPicker () override;
// generally the user goes to pick a color but wants to return to using
// his/her previous drawing tool
......
......@@ -39,7 +39,7 @@ Q_OBJECT
public:
kpToolFloodFill (kpToolEnvironment *environ, QObject *parent);
virtual ~kpToolFloodFill ();
~kpToolFloodFill () override;
private:
QString haventBegunDrawUserMessage () const;
......
......@@ -39,7 +39,7 @@ Q_OBJECT
public:
</