diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-10 10:52:32 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-10 10:33:57 +0000 |
commit | 1389ef74c0927a4b293ec9bac9203052ad8077f5 (patch) | |
tree | 3af8ae05cf1632533954727b6e871bb26ab1adb9 | |
parent | 72d761ac303c97197de0ed965652859e35dc8e32 (diff) | |
download | qttools-1389ef74c0927a4b293ec9bac9203052ad8077f5.tar.gz qttools-1389ef74c0927a4b293ec9bac9203052ad8077f5.tar.bz2 qttools-1389ef74c0927a4b293ec9bac9203052ad8077f5.zip |
Qt Designer Examples: Introduce Q_DECL_OVERRIDE.
Change-Id: I08b4227e4609caef74576ea4e05d33c7142f2665
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
12 files changed, 63 insertions, 63 deletions
diff --git a/examples/designer/containerextension/multipagewidget.h b/examples/designer/containerextension/multipagewidget.h index 4ea8f94a..85011151 100644 --- a/examples/designer/containerextension/multipagewidget.h +++ b/examples/designer/containerextension/multipagewidget.h @@ -59,7 +59,7 @@ class MultiPageWidget : public QWidget public: MultiPageWidget(QWidget *parent = 0); - QSize sizeHint() const; + QSize sizeHint() const Q_DECL_OVERRIDE; int count() const; int currentIndex() const; diff --git a/examples/designer/containerextension/multipagewidgetcontainerextension.h b/examples/designer/containerextension/multipagewidgetcontainerextension.h index 19b8afe3..1dcc88c1 100644 --- a/examples/designer/containerextension/multipagewidgetcontainerextension.h +++ b/examples/designer/containerextension/multipagewidgetcontainerextension.h @@ -58,13 +58,13 @@ class MultiPageWidgetContainerExtension: public QObject, public: MultiPageWidgetContainerExtension(MultiPageWidget *widget, QObject *parent); - void addWidget(QWidget *widget); - int count() const; - int currentIndex() const; - void insertWidget(int index, QWidget *widget); - void remove(int index); - void setCurrentIndex(int index); - QWidget *widget(int index) const; + void addWidget(QWidget *widget) Q_DECL_OVERRIDE; + int count() const Q_DECL_OVERRIDE; + int currentIndex() const Q_DECL_OVERRIDE; + void insertWidget(int index, QWidget *widget) Q_DECL_OVERRIDE; + void remove(int index) Q_DECL_OVERRIDE; + void setCurrentIndex(int index) Q_DECL_OVERRIDE; + QWidget *widget(int index) const Q_DECL_OVERRIDE; private: MultiPageWidget *myWidget; diff --git a/examples/designer/containerextension/multipagewidgetextensionfactory.h b/examples/designer/containerextension/multipagewidgetextensionfactory.h index da263711..2ece4e14 100644 --- a/examples/designer/containerextension/multipagewidgetextensionfactory.h +++ b/examples/designer/containerextension/multipagewidgetextensionfactory.h @@ -56,7 +56,7 @@ public: MultiPageWidgetExtensionFactory(QExtensionManager *parent = 0); protected: - QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; + QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const Q_DECL_OVERRIDE; }; //! [0] diff --git a/examples/designer/containerextension/multipagewidgetplugin.h b/examples/designer/containerextension/multipagewidgetplugin.h index 0b84c599..2099819f 100644 --- a/examples/designer/containerextension/multipagewidgetplugin.h +++ b/examples/designer/containerextension/multipagewidgetplugin.h @@ -59,17 +59,17 @@ class MultiPageWidgetPlugin: public QObject, public QDesignerCustomWidgetInterfa public: MultiPageWidgetPlugin(QObject *parent = 0); - QString name() const; - QString group() const; - QString toolTip() const; - QString whatsThis() const; - QString includeFile() const; - QIcon icon() const; - bool isContainer() const; - QWidget *createWidget(QWidget *parent); - bool isInitialized() const; - void initialize(QDesignerFormEditorInterface *formEditor); - QString domXml() const; + QString name() const Q_DECL_OVERRIDE; + QString group() const Q_DECL_OVERRIDE; + QString toolTip() const Q_DECL_OVERRIDE; + QString whatsThis() const Q_DECL_OVERRIDE; + QString includeFile() const Q_DECL_OVERRIDE; + QIcon icon() const Q_DECL_OVERRIDE; + bool isContainer() const Q_DECL_OVERRIDE; + QWidget *createWidget(QWidget *parent) Q_DECL_OVERRIDE; + bool isInitialized() const Q_DECL_OVERRIDE; + void initialize(QDesignerFormEditorInterface *formEditor) Q_DECL_OVERRIDE; + QString domXml() const Q_DECL_OVERRIDE; private slots: void currentIndexChanged(int index); diff --git a/examples/designer/customwidgetplugin/analogclock.h b/examples/designer/customwidgetplugin/analogclock.h index 111f6035..fd4056c0 100644 --- a/examples/designer/customwidgetplugin/analogclock.h +++ b/examples/designer/customwidgetplugin/analogclock.h @@ -52,7 +52,7 @@ public: AnalogClock(QWidget *parent = 0); protected: - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; }; #endif diff --git a/examples/designer/customwidgetplugin/customwidgetplugin.h b/examples/designer/customwidgetplugin/customwidgetplugin.h index 1d31c8f6..d1a09ed7 100644 --- a/examples/designer/customwidgetplugin/customwidgetplugin.h +++ b/examples/designer/customwidgetplugin/customwidgetplugin.h @@ -52,17 +52,17 @@ class AnalogClockPlugin : public QObject, public QDesignerCustomWidgetInterface public: AnalogClockPlugin(QObject *parent = 0); - bool isContainer() const; - bool isInitialized() const; - QIcon icon() const; - QString domXml() const; - QString group() const; - QString includeFile() const; - QString name() const; - QString toolTip() const; - QString whatsThis() const; - QWidget *createWidget(QWidget *parent); - void initialize(QDesignerFormEditorInterface *core); + bool isContainer() const Q_DECL_OVERRIDE; + bool isInitialized() const Q_DECL_OVERRIDE; + QIcon icon() const Q_DECL_OVERRIDE; + QString domXml() const Q_DECL_OVERRIDE; + QString group() const Q_DECL_OVERRIDE; + QString includeFile() const Q_DECL_OVERRIDE; + QString name() const Q_DECL_OVERRIDE; + QString toolTip() const Q_DECL_OVERRIDE; + QString whatsThis() const Q_DECL_OVERRIDE; + QWidget *createWidget(QWidget *parent) Q_DECL_OVERRIDE; + void initialize(QDesignerFormEditorInterface *core) Q_DECL_OVERRIDE; private: bool initialized; diff --git a/examples/designer/taskmenuextension/tictactoe.h b/examples/designer/taskmenuextension/tictactoe.h index 0482ca42..14a6b6a9 100644 --- a/examples/designer/taskmenuextension/tictactoe.h +++ b/examples/designer/taskmenuextension/tictactoe.h @@ -57,15 +57,15 @@ class TicTacToe : public QWidget public: TicTacToe(QWidget *parent = 0); - QSize minimumSizeHint() const; - QSize sizeHint() const; + QSize minimumSizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const Q_DECL_OVERRIDE; void setState(const QString &newState); QString state() const; void clearBoard(); protected: - void mousePressEvent(QMouseEvent *event); - void paintEvent(QPaintEvent *event); + void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; private: enum { Empty = '-', Cross = 'X', Nought = 'O' }; diff --git a/examples/designer/taskmenuextension/tictactoedialog.h b/examples/designer/taskmenuextension/tictactoedialog.h index 83e171f4..34182364 100644 --- a/examples/designer/taskmenuextension/tictactoedialog.h +++ b/examples/designer/taskmenuextension/tictactoedialog.h @@ -56,7 +56,7 @@ class TicTacToeDialog : public QDialog public: explicit TicTacToeDialog(TicTacToe *plugin = 0, QWidget *parent = 0); - QSize sizeHint() const; + QSize sizeHint() const Q_DECL_OVERRIDE; private slots: void resetState(); diff --git a/examples/designer/taskmenuextension/tictactoeplugin.h b/examples/designer/taskmenuextension/tictactoeplugin.h index 9b71b5ac..6ed8b765 100644 --- a/examples/designer/taskmenuextension/tictactoeplugin.h +++ b/examples/designer/taskmenuextension/tictactoeplugin.h @@ -60,17 +60,17 @@ class TicTacToePlugin : public QObject, public QDesignerCustomWidgetInterface public: TicTacToePlugin(QObject *parent = 0); - QString name() const; - QString group() const; - QString toolTip() const; - QString whatsThis() const; - QString includeFile() const; - QIcon icon() const; - bool isContainer() const; - QWidget *createWidget(QWidget *parent); - bool isInitialized() const; - void initialize(QDesignerFormEditorInterface *formEditor); - QString domXml() const; + QString name() const Q_DECL_OVERRIDE; + QString group() const Q_DECL_OVERRIDE; + QString toolTip() const Q_DECL_OVERRIDE; + QString whatsThis() const Q_DECL_OVERRIDE; + QString includeFile() const Q_DECL_OVERRIDE; + QIcon icon() const Q_DECL_OVERRIDE; + bool isContainer() const Q_DECL_OVERRIDE; + QWidget *createWidget(QWidget *parent) Q_DECL_OVERRIDE; + bool isInitialized() const Q_DECL_OVERRIDE; + void initialize(QDesignerFormEditorInterface *formEditor) Q_DECL_OVERRIDE; + QString domXml() const Q_DECL_OVERRIDE; private: bool initialized; diff --git a/examples/designer/taskmenuextension/tictactoetaskmenu.h b/examples/designer/taskmenuextension/tictactoetaskmenu.h index 7ea65717..0f41cf8b 100644 --- a/examples/designer/taskmenuextension/tictactoetaskmenu.h +++ b/examples/designer/taskmenuextension/tictactoetaskmenu.h @@ -59,8 +59,8 @@ class TicTacToeTaskMenu : public QObject, public QDesignerTaskMenuExtension public: TicTacToeTaskMenu(TicTacToe *tic, QObject *parent); - QAction *preferredEditAction() const; - QList<QAction *> taskActions() const; + QAction *preferredEditAction() const Q_DECL_OVERRIDE; + QList<QAction *> taskActions() const Q_DECL_OVERRIDE; private slots: void editState(); @@ -80,7 +80,7 @@ public: TicTacToeTaskMenuFactory(QExtensionManager *parent = 0); protected: - QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; + QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const Q_DECL_OVERRIDE; }; //! [1] diff --git a/examples/designer/worldtimeclockplugin/worldtimeclock.h b/examples/designer/worldtimeclockplugin/worldtimeclock.h index 0756c91f..497c51b4 100644 --- a/examples/designer/worldtimeclockplugin/worldtimeclock.h +++ b/examples/designer/worldtimeclockplugin/worldtimeclock.h @@ -61,7 +61,7 @@ signals: void updated(QTime currentTime); protected: - void paintEvent(QPaintEvent *event); + void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; private: int timeZoneOffset; diff --git a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h index 018985ee..a4bb2422 100644 --- a/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h +++ b/examples/designer/worldtimeclockplugin/worldtimeclockplugin.h @@ -56,17 +56,17 @@ class WorldTimeClockPlugin : public QObject, public: WorldTimeClockPlugin(QObject *parent = 0); - bool isContainer() const; - bool isInitialized() const; - QIcon icon() const; - QString domXml() const; - QString group() const; - QString includeFile() const; - QString name() const; - QString toolTip() const; - QString whatsThis() const; - QWidget *createWidget(QWidget *parent); - void initialize(QDesignerFormEditorInterface *core); + bool isContainer() const Q_DECL_OVERRIDE; + bool isInitialized() const Q_DECL_OVERRIDE; + QIcon icon() const Q_DECL_OVERRIDE; + QString domXml() const Q_DECL_OVERRIDE; + QString group() const Q_DECL_OVERRIDE; + QString includeFile() const Q_DECL_OVERRIDE; + QString name() const Q_DECL_OVERRIDE; + QString toolTip() const Q_DECL_OVERRIDE; + QString whatsThis() const Q_DECL_OVERRIDE; + QWidget *createWidget(QWidget *parent) Q_DECL_OVERRIDE; + void initialize(QDesignerFormEditorInterface *core) Q_DECL_OVERRIDE; private: bool initialized; |