From faf29063691c279562fd2156a75adf70953a9c3d Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 8 Apr 2016 12:55:14 +0200 Subject: Qt Designer: Fix Clang warnings about missing/inconsistent overrides. Add missing overrides and remove FormWindowBase::emitSelectionChanged() as it was hiding QDesignerFormWindowInterface::emitSelectionChanged(). Change-Id: I4d07e6d0012aed931b9cad88878f29d026f3b1e3 Reviewed-by: Jarek Kobus --- .../src/components/buddyeditor/buddyeditor.h | 4 +-- .../components/buddyeditor/buddyeditor_plugin.h | 2 +- .../src/components/buddyeditor/buddyeditor_tool.h | 4 +-- .../components/formeditor/default_actionprovider.h | 6 ++-- .../src/components/formeditor/default_container.h | 26 +++++++------- .../src/components/formeditor/formwindow.cpp | 4 +-- .../src/components/formeditor/formwindow.h | 41 +++++++++++---------- .../src/components/formeditor/formwindowmanager.h | 26 +++++++------- .../components/formeditor/itemview_propertysheet.h | 4 +-- .../components/formeditor/layout_propertysheet.h | 2 +- .../src/components/formeditor/qdesigner_resource.h | 6 ++-- .../components/formeditor/templateoptionspage.h | 4 +-- .../src/components/formeditor/tool_widgeteditor.h | 4 +-- .../components/objectinspector/objectinspector.h | 6 ++-- .../propertyeditor/designerpropertymanager.h | 3 +- .../src/components/propertyeditor/paletteeditor.h | 14 ++++---- .../src/components/propertyeditor/propertyeditor.h | 8 ++--- .../signalsloteditor/signalsloteditor_p.h | 6 ++-- .../signalsloteditor/signalsloteditor_tool.h | 6 ++-- .../tabordereditor/tabordereditor_plugin.h | 2 +- .../tabordereditor/tabordereditor_tool.h | 4 +-- src/designer/src/components/widgetbox/widgetbox.h | 6 ++-- src/designer/src/lib/shared/connectionedit_p.h | 2 +- src/designer/src/lib/shared/dialoggui_p.h | 12 +++---- src/designer/src/lib/shared/formwindowbase_p.h | 1 - src/designer/src/lib/shared/metadatabase_p.h | 2 +- .../src/lib/shared/qdesigner_introspection.cpp | 42 +++++++++++----------- src/designer/src/lib/shared/qdesigner_menu_p.h | 2 +- src/designer/src/lib/shared/qdesigner_menubar_p.h | 2 +- .../src/lib/shared/qdesigner_promotion_p.h | 2 +- .../src/lib/shared/qdesigner_qsettings_p.h | 2 +- src/designer/src/lib/shared/qdesigner_widget_p.h | 2 +- src/designer/src/lib/shared/qlayout_widget.cpp | 26 +++++++------- src/designer/src/lib/shared/qlayout_widget_p.h | 8 ++--- src/designer/src/lib/shared/spacer_widget_p.h | 6 ++-- src/designer/src/lib/shared/textpropertyeditor_p.h | 2 +- src/designer/src/lib/shared/zoomwidget_p.h | 4 +-- .../src/plugins/activeqt/qaxwidgetpropertysheet.h | 4 +-- src/designer/src/uitools/quiloader.cpp | 8 ++--- 39 files changed, 155 insertions(+), 160 deletions(-) diff --git a/src/designer/src/components/buddyeditor/buddyeditor.h b/src/designer/src/components/buddyeditor/buddyeditor.h index 789ca1961..6445bb7c1 100644 --- a/src/designer/src/components/buddyeditor/buddyeditor.h +++ b/src/designer/src/components/buddyeditor/buddyeditor.h @@ -57,10 +57,10 @@ public: QDesignerFormWindowInterface *formWindow() const; void setBackground(QWidget *background) Q_DECL_OVERRIDE; - virtual void deleteSelected(); + void deleteSelected() Q_DECL_OVERRIDE; public slots: - virtual void updateBackground(); + void updateBackground() Q_DECL_OVERRIDE; void widgetRemoved(QWidget *w) Q_DECL_OVERRIDE; void autoBuddy(); diff --git a/src/designer/src/components/buddyeditor/buddyeditor_plugin.h b/src/designer/src/components/buddyeditor/buddyeditor_plugin.h index 0ce4068db..0e534180f 100644 --- a/src/designer/src/components/buddyeditor/buddyeditor_plugin.h +++ b/src/designer/src/components/buddyeditor/buddyeditor_plugin.h @@ -61,7 +61,7 @@ public: bool isInitialized() const Q_DECL_OVERRIDE; void initialize(QDesignerFormEditorInterface *core) Q_DECL_OVERRIDE; - QAction *action() const; + QAction *action() const Q_DECL_OVERRIDE; QDesignerFormEditorInterface *core() const Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/buddyeditor/buddyeditor_tool.h b/src/designer/src/components/buddyeditor/buddyeditor_tool.h index e4b843f71..99d4659d3 100644 --- a/src/designer/src/components/buddyeditor/buddyeditor_tool.h +++ b/src/designer/src/components/buddyeditor/buddyeditor_tool.h @@ -63,8 +63,8 @@ public: QWidget *editor() const Q_DECL_OVERRIDE; QAction *action() const Q_DECL_OVERRIDE; - virtual void activated(); - virtual void deactivated(); + void activated() Q_DECL_OVERRIDE; + void deactivated() Q_DECL_OVERRIDE; bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event) Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/formeditor/default_actionprovider.h b/src/designer/src/components/formeditor/default_actionprovider.h index 6fac93ce2..63fe8cbcd 100644 --- a/src/designer/src/components/formeditor/default_actionprovider.h +++ b/src/designer/src/components/formeditor/default_actionprovider.h @@ -73,7 +73,7 @@ public: QRect actionGeometry(QAction *action) const Q_DECL_OVERRIDE; QAction *actionAt(const QPoint &pos) const Q_DECL_OVERRIDE; - Qt::Orientation orientation() const; + Qt::Orientation orientation() const Q_DECL_OVERRIDE; protected: QRect indicatorGeometry(const QPoint &pos, Qt::LayoutDirection layoutDirection) const Q_DECL_OVERRIDE; @@ -91,7 +91,7 @@ public: QRect actionGeometry(QAction *action) const Q_DECL_OVERRIDE; QAction *actionAt(const QPoint &pos) const Q_DECL_OVERRIDE; - Qt::Orientation orientation() const; + Qt::Orientation orientation() const Q_DECL_OVERRIDE; private: QMenuBar *m_widget; @@ -106,7 +106,7 @@ public: QRect actionGeometry(QAction *action) const Q_DECL_OVERRIDE; QAction *actionAt(const QPoint &pos) const Q_DECL_OVERRIDE; - Qt::Orientation orientation() const; + Qt::Orientation orientation() const Q_DECL_OVERRIDE; private: QMenu *m_widget; diff --git a/src/designer/src/components/formeditor/default_container.h b/src/designer/src/components/formeditor/default_container.h index 1a4a49c78..88e8801da 100644 --- a/src/designer/src/components/formeditor/default_container.h +++ b/src/designer/src/components/formeditor/default_container.h @@ -56,10 +56,10 @@ class QStackedWidgetContainer: public QObject, public QDesignerContainerExtensio public: explicit QStackedWidgetContainer(QStackedWidget *widget, QObject *parent = 0); - virtual int count() const { return m_widget->count(); } - virtual QWidget *widget(int index) const { return m_widget->widget(index); } + int count() const Q_DECL_OVERRIDE { return m_widget->count(); } + QWidget *widget(int index) const Q_DECL_OVERRIDE { return m_widget->widget(index); } - virtual int currentIndex() const { return m_widget->currentIndex(); } + int currentIndex() const Q_DECL_OVERRIDE { return m_widget->currentIndex(); } void setCurrentIndex(int index) Q_DECL_OVERRIDE; void addWidget(QWidget *widget) Q_DECL_OVERRIDE; @@ -78,10 +78,10 @@ class QTabWidgetContainer: public QObject, public QDesignerContainerExtension public: explicit QTabWidgetContainer(QTabWidget *widget, QObject *parent = 0); - virtual int count() const { return m_widget->count(); } - virtual QWidget *widget(int index) const { return m_widget->widget(index); } + int count() const Q_DECL_OVERRIDE { return m_widget->count(); } + QWidget *widget(int index) const Q_DECL_OVERRIDE { return m_widget->widget(index); } - virtual int currentIndex() const { return m_widget->currentIndex(); } + int currentIndex() const Q_DECL_OVERRIDE { return m_widget->currentIndex(); } void setCurrentIndex(int index) Q_DECL_OVERRIDE; void addWidget(QWidget *widget) Q_DECL_OVERRIDE; @@ -100,10 +100,10 @@ class QToolBoxContainer: public QObject, public QDesignerContainerExtension public: explicit QToolBoxContainer(QToolBox *widget, QObject *parent = 0); - virtual int count() const { return m_widget->count(); } - virtual QWidget *widget(int index) const { return m_widget->widget(index); } + int count() const Q_DECL_OVERRIDE { return m_widget->count(); } + QWidget *widget(int index) const Q_DECL_OVERRIDE { return m_widget->widget(index); } - virtual int currentIndex() const { return m_widget->currentIndex(); } + int currentIndex() const Q_DECL_OVERRIDE { return m_widget->currentIndex(); } void setCurrentIndex(int index) Q_DECL_OVERRIDE; void addWidget(QWidget *widget) Q_DECL_OVERRIDE; @@ -126,13 +126,13 @@ public: int count() const Q_DECL_OVERRIDE; QWidget *widget(int index) const Q_DECL_OVERRIDE; int currentIndex() const Q_DECL_OVERRIDE; - virtual void setCurrentIndex(int /*index*/) {} + void setCurrentIndex(int /*index*/) Q_DECL_OVERRIDE {} void addWidget(QWidget *widget) Q_DECL_OVERRIDE; void insertWidget(int index, QWidget *widget) Q_DECL_OVERRIDE; - virtual void remove(int /*index*/) {} + void remove(int /*index*/) Q_DECL_OVERRIDE {} - virtual bool canAddWidget() const { return false; } - virtual bool canRemove(int) const { return false; } + bool canAddWidget() const Q_DECL_OVERRIDE { return false; } + bool canRemove(int) const Q_DECL_OVERRIDE { return false; } private: const bool m_active; diff --git a/src/designer/src/components/formeditor/formwindow.cpp b/src/designer/src/components/formeditor/formwindow.cpp index e8a92142f..208dd007a 100644 --- a/src/designer/src/components/formeditor/formwindow.cpp +++ b/src/designer/src/components/formeditor/formwindow.cpp @@ -1504,8 +1504,8 @@ public: void init(QWidgetList &l, const ArrowKeyOperation &op); protected: - virtual PropertyHelper *createPropertyHelper(QObject *o, SpecialProperty sp, - QDesignerPropertySheetExtension *s, int i) const + PropertyHelper *createPropertyHelper(QObject *o, SpecialProperty sp, + QDesignerPropertySheetExtension *s, int i) const Q_DECL_OVERRIDE { return new ArrowKeyPropertyHelper(o, sp, s, i); } QVariant mergeValue(const QVariant &newValue) Q_DECL_OVERRIDE; }; diff --git a/src/designer/src/components/formeditor/formwindow.h b/src/designer/src/components/formeditor/formwindow.h index 01a8f2ded..802b27f70 100644 --- a/src/designer/src/components/formeditor/formwindow.h +++ b/src/designer/src/components/formeditor/formwindow.h @@ -126,7 +126,7 @@ public: void ensureUniqueObjectName(QObject *object) Q_DECL_OVERRIDE; QWidget *mainContainer() const Q_DECL_OVERRIDE; - void setMainContainer(QWidget *mainContainer); + void setMainContainer(QWidget *mainContainer) Q_DECL_OVERRIDE; bool isMainContainer(const QWidget *w) const; QWidget *currentWidget() const; @@ -134,9 +134,9 @@ public: bool hasInsertedChildren(QWidget *w) const; QList selectedWidgets() const; - void clearSelection(bool changePropertyDisplay=true); + void clearSelection(bool changePropertyDisplay = true) Q_DECL_OVERRIDE; bool isWidgetSelected(QWidget *w) const; - void selectWidget(QWidget *w, bool select=true); + void selectWidget(QWidget *w, bool select = true) Q_DECL_OVERRIDE; void selectWidgets(); void repaintSelection(); @@ -153,57 +153,56 @@ public: QWidget *createWidget(DomUI *ui, const QRect &rect, QWidget *target); - bool isManaged(QWidget *w) const; + bool isManaged(QWidget *w) const Q_DECL_OVERRIDE; - void manageWidget(QWidget *w); - void unmanageWidget(QWidget *w); + void manageWidget(QWidget *w) Q_DECL_OVERRIDE; + void unmanageWidget(QWidget *w) Q_DECL_OVERRIDE; QUndoStack *commandHistory() const Q_DECL_OVERRIDE; - void beginCommand(const QString &description); - void endCommand(); + void beginCommand(const QString &description) Q_DECL_OVERRIDE; + void endCommand() Q_DECL_OVERRIDE; bool blockSelectionChanged(bool blocked) Q_DECL_OVERRIDE; - virtual void emitSelectionChanged(); + void emitSelectionChanged() Q_DECL_OVERRIDE; bool unify(QObject *w, QString &s, bool changeIt); - bool isDirty() const; - void setDirty(bool dirty); + bool isDirty() const Q_DECL_OVERRIDE; + void setDirty(bool dirty) Q_DECL_OVERRIDE; static FormWindow *findFormWindow(QWidget *w); virtual QWidget *containerAt(const QPoint &pos); QWidget *widgetAt(const QPoint &pos) Q_DECL_OVERRIDE; - virtual void highlightWidget(QWidget *w, const QPoint &pos, - HighlightMode mode = Highlight); + void highlightWidget(QWidget *w, const QPoint &pos, HighlightMode mode = Highlight) Q_DECL_OVERRIDE; void updateOrderIndicators(); bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event); - QStringList resourceFiles() const; - void addResourceFile(const QString &path); - void removeResourceFile(const QString &path); + QStringList resourceFiles() const Q_DECL_OVERRIDE; + void addResourceFile(const QString &path) Q_DECL_OVERRIDE; + void removeResourceFile(const QString &path) Q_DECL_OVERRIDE; void resizeWidget(QWidget *widget, const QRect &geometry); bool dropDockWidget(QDesignerDnDItemInterface *item, const QPoint &global_mouse_pos); bool dropWidgets(const QList &item_list, QWidget *target, - const QPoint &global_mouse_pos); + const QPoint &global_mouse_pos) Q_DECL_OVERRIDE; QWidget *findContainer(QWidget *w, bool excludeLayout) const Q_DECL_OVERRIDE; // for WidgetSelection only. QWidget *designerWidget(QWidget *w) const; // Initialize and return a popup menu for a managed widget - QMenu *initializePopupMenu(QWidget *managedWidget); + QMenu *initializePopupMenu(QWidget *managedWidget) Q_DECL_OVERRIDE; #ifndef QT_NO_CLIPBOARD void paste(PasteMode pasteMode) Q_DECL_OVERRIDE; #endif - virtual QEditorFormBuilder *createFormBuilder(); + virtual QEditorFormBuilder *createFormBuilder() Q_DECL_OVERRIDE; - bool eventFilter(QObject *watched, QEvent *event); + bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE; signals: void contextMenuRequested(QMenu *menu, QWidget *widget); @@ -298,7 +297,7 @@ private: static int widgetDepth(const QWidget *w); static bool isChildOf(const QWidget *c, const QWidget *p); - void editWidgets(); + void editWidgets() Q_DECL_OVERRIDE; void updateWidgets(); diff --git a/src/designer/src/components/formeditor/formwindowmanager.h b/src/designer/src/components/formeditor/formwindowmanager.h index 307c658e8..9e182770f 100644 --- a/src/designer/src/components/formeditor/formwindowmanager.h +++ b/src/designer/src/components/formeditor/formwindowmanager.h @@ -70,28 +70,28 @@ public: QAction *action(Action action) const Q_DECL_OVERRIDE; QActionGroup *actionGroup(ActionGroup actionGroup) const Q_DECL_OVERRIDE; - QDesignerFormWindowInterface *activeFormWindow() const; + QDesignerFormWindowInterface *activeFormWindow() const Q_DECL_OVERRIDE; - int formWindowCount() const; - QDesignerFormWindowInterface *formWindow(int index) const; + int formWindowCount() const Q_DECL_OVERRIDE; + QDesignerFormWindowInterface *formWindow(int index) const Q_DECL_OVERRIDE; - QDesignerFormWindowInterface *createFormWindow(QWidget *parentWidget = 0, Qt::WindowFlags flags = 0); + QDesignerFormWindowInterface *createFormWindow(QWidget *parentWidget = 0, Qt::WindowFlags flags = 0) Q_DECL_OVERRIDE; - QPixmap createPreviewPixmap() const; + QPixmap createPreviewPixmap() const Q_DECL_OVERRIDE; - bool eventFilter(QObject *o, QEvent *e); + bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE; - void dragItems(const QList &item_list); + void dragItems(const QList &item_list) Q_DECL_OVERRIDE; QUndoGroup *undoGroup() const; - virtual PreviewManager *previewManager() const { return m_previewManager; } + PreviewManager *previewManager() const Q_DECL_OVERRIDE { return m_previewManager; } public slots: - void addFormWindow(QDesignerFormWindowInterface *formWindow); - void removeFormWindow(QDesignerFormWindowInterface *formWindow); - void setActiveFormWindow(QDesignerFormWindowInterface *formWindow); - void closeAllPreviews(); + void addFormWindow(QDesignerFormWindowInterface *formWindow) Q_DECL_OVERRIDE; + void removeFormWindow(QDesignerFormWindowInterface *formWindow) Q_DECL_OVERRIDE; + void setActiveFormWindow(QDesignerFormWindowInterface *formWindow) Q_DECL_OVERRIDE; + void closeAllPreviews() Q_DECL_OVERRIDE; void deviceProfilesChanged(); private slots: @@ -108,7 +108,7 @@ private slots: void slotActionBreakLayoutActivated(); void slotActionAdjustSizeActivated(); void slotActionSimplifyLayoutActivated(); - void showPreview(); + void showPreview() Q_DECL_OVERRIDE; void slotActionGroupPreviewInStyle(const QString &style, int deviceProfileIndex); void slotActionShowFormWindowSettingsDialog(); diff --git a/src/designer/src/components/formeditor/itemview_propertysheet.h b/src/designer/src/components/formeditor/itemview_propertysheet.h index 20ab7d81d..d2df4ca8d 100644 --- a/src/designer/src/components/formeditor/itemview_propertysheet.h +++ b/src/designer/src/components/formeditor/itemview_propertysheet.h @@ -58,8 +58,8 @@ public: QHash propertyNameMap() const; // QDesignerPropertySheet - QVariant property(int index) const; - void setProperty(int index, const QVariant &value); + QVariant property(int index) const Q_DECL_OVERRIDE; + void setProperty(int index, const QVariant &value) Q_DECL_OVERRIDE; void setChanged(int index, bool changed) Q_DECL_OVERRIDE; bool isChanged(int index) const Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/formeditor/layout_propertysheet.h b/src/designer/src/components/formeditor/layout_propertysheet.h index 4106639e1..3c4d974fd 100644 --- a/src/designer/src/components/formeditor/layout_propertysheet.h +++ b/src/designer/src/components/formeditor/layout_propertysheet.h @@ -57,7 +57,7 @@ public: void setProperty(int index, const QVariant &value) Q_DECL_OVERRIDE; QVariant property(int index) const Q_DECL_OVERRIDE; bool reset(int index) Q_DECL_OVERRIDE; - void setChanged(int index, bool changed); + void setChanged(int index, bool changed) Q_DECL_OVERRIDE; static void stretchAttributesToDom(QDesignerFormEditorInterface *core, QLayout *lt, DomLayout *domLayout); static void markChangedStretchProperties(QDesignerFormEditorInterface *core, QLayout *lt, const DomLayout *domLayout); diff --git a/src/designer/src/components/formeditor/qdesigner_resource.h b/src/designer/src/components/formeditor/qdesigner_resource.h index cb8be235c..8c428ed59 100644 --- a/src/designer/src/components/formeditor/qdesigner_resource.h +++ b/src/designer/src/components/formeditor/qdesigner_resource.h @@ -130,9 +130,9 @@ protected: DomWidget *saveWidget(QDesignerDockWidget *dockWidget, DomWidget *ui_parentWidget); DomWidget *saveWidget(QWizardPage *wizardPage, DomWidget *ui_parentWidget); - virtual DomCustomWidgets *saveCustomWidgets(); - virtual DomTabStops *saveTabStops(); - virtual DomResources *saveResources(); + DomCustomWidgets *saveCustomWidgets() Q_DECL_OVERRIDE; + DomTabStops *saveTabStops() Q_DECL_OVERRIDE; + DomResources *saveResources() Q_DECL_OVERRIDE; void layoutInfo(DomLayout *layout, QObject *parent, int *margin, int *spacing) Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/formeditor/templateoptionspage.h b/src/designer/src/components/formeditor/templateoptionspage.h index fa25ae23a..58c590ae3 100644 --- a/src/designer/src/components/formeditor/templateoptionspage.h +++ b/src/designer/src/components/formeditor/templateoptionspage.h @@ -86,8 +86,8 @@ public: QString name() const Q_DECL_OVERRIDE; QWidget *createPage(QWidget *parent) Q_DECL_OVERRIDE; - virtual void apply(); - virtual void finish(); + void apply() Q_DECL_OVERRIDE; + void finish() Q_DECL_OVERRIDE; private: QDesignerFormEditorInterface *m_core; diff --git a/src/designer/src/components/formeditor/tool_widgeteditor.h b/src/designer/src/components/formeditor/tool_widgeteditor.h index 68686f87b..0d6df363f 100644 --- a/src/designer/src/components/formeditor/tool_widgeteditor.h +++ b/src/designer/src/components/formeditor/tool_widgeteditor.h @@ -61,8 +61,8 @@ public: QWidget *editor() const Q_DECL_OVERRIDE; QAction *action() const Q_DECL_OVERRIDE; - virtual void activated(); - virtual void deactivated(); + void activated() Q_DECL_OVERRIDE; + void deactivated() Q_DECL_OVERRIDE; bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event) Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/objectinspector/objectinspector.h b/src/designer/src/components/objectinspector/objectinspector.h index 86e3dd7f2..fb893dc56 100644 --- a/src/designer/src/components/objectinspector/objectinspector.h +++ b/src/designer/src/components/objectinspector/objectinspector.h @@ -57,12 +57,12 @@ public: void getSelection(Selection &s) const Q_DECL_OVERRIDE; bool selectObject(QObject *o) Q_DECL_OVERRIDE; - virtual void clearSelection(); + void clearSelection() Q_DECL_OVERRIDE; - void setFormWindow(QDesignerFormWindowInterface *formWindow); + void setFormWindow(QDesignerFormWindowInterface *formWindow) Q_DECL_OVERRIDE; public slots: - virtual void mainContainerChanged(); + void mainContainerChanged() Q_DECL_OVERRIDE; private slots: void slotSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.h b/src/designer/src/components/propertyeditor/designerpropertymanager.h index 8c46505e3..0e05fef86 100644 --- a/src/designer/src/components/propertyeditor/designerpropertymanager.h +++ b/src/designer/src/components/propertyeditor/designerpropertymanager.h @@ -155,8 +155,7 @@ public: void setObject(QObject *object) { m_object = object; } public Q_SLOTS: - virtual void setAttribute(QtProperty *property, - const QString &attribute, const QVariant &value); + void setAttribute(QtProperty *property, const QString &attribute, const QVariant &value) Q_DECL_OVERRIDE; void setValue(QtProperty *property, const QVariant &value) Q_DECL_OVERRIDE; Q_SIGNALS: // sourceOfChange - a subproperty (or just property) which caused a change diff --git a/src/designer/src/components/propertyeditor/paletteeditor.h b/src/designer/src/components/propertyeditor/paletteeditor.h index ead06ee30..d9e6c3ec7 100644 --- a/src/designer/src/components/propertyeditor/paletteeditor.h +++ b/src/designer/src/components/propertyeditor/paletteeditor.h @@ -173,17 +173,17 @@ public: explicit ColorDelegate(QDesignerFormEditorInterface *core, QObject *parent = 0); QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const; + const QModelIndex &index) const Q_DECL_OVERRIDE; - void setEditorData(QWidget *ed, const QModelIndex &index) const; + void setEditorData(QWidget *ed, const QModelIndex &index) const Q_DECL_OVERRIDE; void setModelData(QWidget *ed, QAbstractItemModel *model, - const QModelIndex &index) const; + const QModelIndex &index) const Q_DECL_OVERRIDE; - void updateEditorGeometry(QWidget *ed, - const QStyleOptionViewItem &option, const QModelIndex &index) const; + void updateEditorGeometry(QWidget *ed, const QStyleOptionViewItem &option, + const QModelIndex &index) const Q_DECL_OVERRIDE; - virtual void paint(QPainter *painter, const QStyleOptionViewItem &opt, - const QModelIndex &index) const; + void paint(QPainter *painter, const QStyleOptionViewItem &opt, + const QModelIndex &index) const Q_DECL_OVERRIDE; QSize sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const Q_DECL_OVERRIDE; private: QDesignerFormEditorInterface *m_core; diff --git a/src/designer/src/components/propertyeditor/propertyeditor.h b/src/designer/src/components/propertyeditor/propertyeditor.h index 545a0ff4f..0fd74f55a 100644 --- a/src/designer/src/components/propertyeditor/propertyeditor.h +++ b/src/designer/src/components/propertyeditor/propertyeditor.h @@ -76,20 +76,20 @@ public: bool isReadOnly() const Q_DECL_OVERRIDE; void setReadOnly(bool readOnly) Q_DECL_OVERRIDE; void setPropertyValue(const QString &name, const QVariant &value, bool changed = true) Q_DECL_OVERRIDE; - virtual void updatePropertySheet(); + void updatePropertySheet() Q_DECL_OVERRIDE; void setObject(QObject *object) Q_DECL_OVERRIDE; - void reloadResourceProperties(); + void reloadResourceProperties() Q_DECL_OVERRIDE; - virtual QObject *object() const + QObject *object() const Q_DECL_OVERRIDE { return m_object; } QString currentPropertyName() const Q_DECL_OVERRIDE; protected: - bool event(QEvent *event); + bool event(QEvent *event) Q_DECL_OVERRIDE; private slots: void slotResetProperty(QtProperty *property); diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_p.h b/src/designer/src/components/signalsloteditor/signalsloteditor_p.h index 11514453f..bcf4c6287 100644 --- a/src/designer/src/components/signalsloteditor/signalsloteditor_p.h +++ b/src/designer/src/components/signalsloteditor/signalsloteditor_p.h @@ -97,16 +97,14 @@ public: explicit ConnectionModel(QObject *parent = 0); void setEditor(SignalSlotEditor *editor = 0); - virtual QModelIndex index(int row, int column, - const QModelIndex &parent = QModelIndex()) const; + QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE; int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; bool setData(const QModelIndex &index, const QVariant &data, int role = Qt::DisplayRole) Q_DECL_OVERRIDE; Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; - virtual QVariant headerData(int section, Qt::Orientation orientation, - int role = Qt::DisplayRole) const; + QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; QModelIndex connectionToIndex(Connection *con) const; Connection *indexToConnection(const QModelIndex &index) const; diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h b/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h index edbc074ed..68cc1c663 100644 --- a/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h +++ b/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h @@ -62,10 +62,10 @@ public: QWidget *editor() const Q_DECL_OVERRIDE; - QAction *action() const; + QAction *action() const Q_DECL_OVERRIDE; - virtual void activated(); - virtual void deactivated(); + void activated() Q_DECL_OVERRIDE; + void deactivated() Q_DECL_OVERRIDE; bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event) Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/tabordereditor/tabordereditor_plugin.h b/src/designer/src/components/tabordereditor/tabordereditor_plugin.h index 7003388dc..a84308b76 100644 --- a/src/designer/src/components/tabordereditor/tabordereditor_plugin.h +++ b/src/designer/src/components/tabordereditor/tabordereditor_plugin.h @@ -61,7 +61,7 @@ public: bool isInitialized() const Q_DECL_OVERRIDE; void initialize(QDesignerFormEditorInterface *core) Q_DECL_OVERRIDE; - QAction *action() const; + QAction *action() const Q_DECL_OVERRIDE; QDesignerFormEditorInterface *core() const Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/tabordereditor/tabordereditor_tool.h b/src/designer/src/components/tabordereditor/tabordereditor_tool.h index 958735e9a..848925456 100644 --- a/src/designer/src/components/tabordereditor/tabordereditor_tool.h +++ b/src/designer/src/components/tabordereditor/tabordereditor_tool.h @@ -63,8 +63,8 @@ public: QWidget *editor() const Q_DECL_OVERRIDE; QAction *action() const Q_DECL_OVERRIDE; - virtual void activated(); - virtual void deactivated(); + void activated() Q_DECL_OVERRIDE; + void deactivated() Q_DECL_OVERRIDE; bool handleEvent(QWidget *widget, QWidget *managedWidget, QEvent *event) Q_DECL_OVERRIDE; diff --git a/src/designer/src/components/widgetbox/widgetbox.h b/src/designer/src/components/widgetbox/widgetbox.h index 49f028d65..97945cc40 100644 --- a/src/designer/src/components/widgetbox/widgetbox.h +++ b/src/designer/src/components/widgetbox/widgetbox.h @@ -65,12 +65,12 @@ public: void addWidget(int cat_idx, const Widget &wgt) Q_DECL_OVERRIDE; void removeWidget(int cat_idx, int wgt_idx) Q_DECL_OVERRIDE; - void dropWidgets(const QList &item_list, const QPoint &global_mouse_pos); + void dropWidgets(const QList &item_list, const QPoint &global_mouse_pos) Q_DECL_OVERRIDE; void setFileName(const QString &file_name) Q_DECL_OVERRIDE; QString fileName() const Q_DECL_OVERRIDE; - virtual bool load(); - virtual bool save(); + bool load() Q_DECL_OVERRIDE; + bool save() Q_DECL_OVERRIDE; bool loadContents(const QString &contents) Q_DECL_OVERRIDE; QIcon iconForWidget(const QString &className, const QString &category = QString()) const Q_DECL_OVERRIDE; diff --git a/src/designer/src/lib/shared/connectionedit_p.h b/src/designer/src/lib/shared/connectionedit_p.h index 8152f7d5f..fe7244c80 100644 --- a/src/designer/src/lib/shared/connectionedit_p.h +++ b/src/designer/src/lib/shared/connectionedit_p.h @@ -178,7 +178,7 @@ public: void clear(); - void showEvent(QShowEvent * /*e*/) + void showEvent(QShowEvent * /*e*/) Q_DECL_OVERRIDE { updateBackground(); } diff --git a/src/designer/src/lib/shared/dialoggui_p.h b/src/designer/src/lib/shared/dialoggui_p.h index afa2dc5b6..12f280b36 100644 --- a/src/designer/src/lib/shared/dialoggui_p.h +++ b/src/designer/src/lib/shared/dialoggui_p.h @@ -60,22 +60,22 @@ public: DialogGui(); virtual ~DialogGui(); - virtual QMessageBox::StandardButton + QMessageBox::StandardButton message(QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons = QMessageBox::Ok, - QMessageBox::StandardButton defaultButton = QMessageBox::NoButton); + QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) Q_DECL_OVERRIDE; - virtual QMessageBox::StandardButton + QMessageBox::StandardButton message(QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, const QString &informativeText, QMessageBox::StandardButtons buttons = QMessageBox::Ok, - QMessageBox::StandardButton defaultButton = QMessageBox::NoButton); + QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) Q_DECL_OVERRIDE; - virtual QMessageBox::StandardButton + QMessageBox::StandardButton message(QWidget *parent, Message context, QMessageBox::Icon icon, const QString &title, const QString &text, const QString &informativeText, const QString &detailedText, QMessageBox::StandardButtons buttons = QMessageBox::Ok, - QMessageBox::StandardButton defaultButton = QMessageBox::NoButton); + QMessageBox::StandardButton defaultButton = QMessageBox::NoButton) Q_DECL_OVERRIDE; QString getExistingDirectory(QWidget *parent = 0, const QString &caption = QString(), const QString &dir = QString(), QFileDialog::Options options = QFileDialog::ShowDirsOnly) Q_DECL_OVERRIDE; QString getOpenFileName(QWidget *parent = 0, const QString &caption = QString(), const QString &dir = QString(), const QString &filter = QString(), QString *selectedFilter = 0, QFileDialog::Options options = 0) Q_DECL_OVERRIDE; diff --git a/src/designer/src/lib/shared/formwindowbase_p.h b/src/designer/src/lib/shared/formwindowbase_p.h index e511eaf2a..77f81a13f 100644 --- a/src/designer/src/lib/shared/formwindowbase_p.h +++ b/src/designer/src/lib/shared/formwindowbase_p.h @@ -135,7 +135,6 @@ public: virtual QEditorFormBuilder *createFormBuilder() = 0; virtual bool blockSelectionChanged(bool blocked) = 0; - virtual void emitSelectionChanged() = 0; DesignerPixmapCache *pixmapCache() const; DesignerIconCache *iconCache() const; diff --git a/src/designer/src/lib/shared/metadatabase_p.h b/src/designer/src/lib/shared/metadatabase_p.h index 007b50085..6a9327915 100644 --- a/src/designer/src/lib/shared/metadatabase_p.h +++ b/src/designer/src/lib/shared/metadatabase_p.h @@ -100,7 +100,7 @@ public: QDesignerFormEditorInterface *core() const Q_DECL_OVERRIDE; - virtual QDesignerMetaDataBaseItemInterface *item(QObject *object) const { return metaDataBaseItem(object); } + QDesignerMetaDataBaseItemInterface *item(QObject *object) const Q_DECL_OVERRIDE { return metaDataBaseItem(object); } virtual MetaDataBaseItem *metaDataBaseItem(QObject *object) const; void add(QObject *object) Q_DECL_OVERRIDE; void remove(QObject *object) Q_DECL_OVERRIDE; diff --git a/src/designer/src/lib/shared/qdesigner_introspection.cpp b/src/designer/src/lib/shared/qdesigner_introspection.cpp index 22f9d21be..73998a971 100644 --- a/src/designer/src/lib/shared/qdesigner_introspection.cpp +++ b/src/designer/src/lib/shared/qdesigner_introspection.cpp @@ -64,17 +64,17 @@ namespace { class QDesignerMetaEnum : public QDesignerMetaEnumInterface { public: QDesignerMetaEnum(const QMetaEnum &qEnum); - virtual bool isFlag() const { return m_enum.isFlag(); } - virtual QString key(int index) const { return charToQString(m_enum.key(index)); } - virtual int keyCount() const { return m_enum.keyCount(); } - virtual int keyToValue(const QString &key) const { return m_enum.keyToValue(key.toUtf8()); } - virtual int keysToValue(const QString &keys) const { return m_enum.keysToValue(keys.toUtf8()); } - virtual QString name() const { return m_name; } - virtual QString scope() const { return m_scope; } + bool isFlag() const Q_DECL_OVERRIDE { return m_enum.isFlag(); } + QString key(int index) const Q_DECL_OVERRIDE { return charToQString(m_enum.key(index)); } + int keyCount() const Q_DECL_OVERRIDE { return m_enum.keyCount(); } + int keyToValue(const QString &key) const Q_DECL_OVERRIDE { return m_enum.keyToValue(key.toUtf8()); } + int keysToValue(const QString &keys) const Q_DECL_OVERRIDE { return m_enum.keysToValue(keys.toUtf8()); } + QString name() const Q_DECL_OVERRIDE { return m_name; } + QString scope() const Q_DECL_OVERRIDE { return m_scope; } QString separator() const Q_DECL_OVERRIDE; - virtual int value(int index) const { return m_enum.value(index); } - virtual QString valueToKey(int value) const { return charToQString(m_enum.valueToKey(value)); } - virtual QString valueToKeys(int value) const { return charToQString(m_enum.valueToKeys(value)); } + int value(int index) const Q_DECL_OVERRIDE { return m_enum.value(index); } + QString valueToKey(int value) const Q_DECL_OVERRIDE { return charToQString(m_enum.valueToKey(value)); } + QString valueToKeys(int value) const Q_DECL_OVERRIDE { return charToQString(m_enum.valueToKeys(value)); } private: const QMetaEnum m_enum; @@ -101,22 +101,22 @@ namespace { QDesignerMetaProperty(const QMetaProperty &property); virtual ~QDesignerMetaProperty(); - virtual const QDesignerMetaEnumInterface *enumerator() const { return m_enumerator; } + const QDesignerMetaEnumInterface *enumerator() const Q_DECL_OVERRIDE { return m_enumerator; } - virtual Kind kind() const { return m_kind; } + Kind kind() const Q_DECL_OVERRIDE { return m_kind; } - virtual AccessFlags accessFlags() const { return m_access; } + AccessFlags accessFlags() const Q_DECL_OVERRIDE { return m_access; } Attributes attributes(const QObject *object = 0) const Q_DECL_OVERRIDE; - virtual QVariant::Type type() const { return m_property.type(); } - virtual QString name() const { return m_name; } - virtual QString typeName() const { return m_typeName; } - virtual int userType() const { return m_property.userType(); } - virtual bool hasSetter() const { return m_property.hasStdCppSet(); } + QVariant::Type type() const Q_DECL_OVERRIDE { return m_property.type(); } + QString name() const Q_DECL_OVERRIDE { return m_name; } + QString typeName() const Q_DECL_OVERRIDE { return m_typeName; } + int userType() const Q_DECL_OVERRIDE { return m_property.userType(); } + bool hasSetter() const Q_DECL_OVERRIDE { return m_property.hasStdCppSet(); } - virtual QVariant read(const QObject *object) const { return m_property.read(object); } - virtual bool reset(QObject *object) const { return m_property.reset(object); } - virtual bool write(QObject *object, const QVariant &value) const { return m_property.write(object, value); } + QVariant read(const QObject *object) const Q_DECL_OVERRIDE { return m_property.read(object); } + bool reset(QObject *object) const Q_DECL_OVERRIDE { return m_property.reset(object); } + bool write(QObject *object, const QVariant &value) const Q_DECL_OVERRIDE { return m_property.write(object, value); } private: const QMetaProperty m_property; diff --git a/src/designer/src/lib/shared/qdesigner_menu_p.h b/src/designer/src/lib/shared/qdesigner_menu_p.h index efd5bb400..a3a6dbf86 100644 --- a/src/designer/src/lib/shared/qdesigner_menu_p.h +++ b/src/designer/src/lib/shared/qdesigner_menu_p.h @@ -76,7 +76,7 @@ public: QDesignerMenu(QWidget *parent = 0); virtual ~QDesignerMenu(); - bool eventFilter(QObject *object, QEvent *event); + bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; QDesignerFormWindowInterface *formWindow() const; QDesignerActionProviderExtension *actionProvider(); diff --git a/src/designer/src/lib/shared/qdesigner_menubar_p.h b/src/designer/src/lib/shared/qdesigner_menubar_p.h index ef238c221..22d12243e 100644 --- a/src/designer/src/lib/shared/qdesigner_menubar_p.h +++ b/src/designer/src/lib/shared/qdesigner_menubar_p.h @@ -81,7 +81,7 @@ public: QDesignerMenuBar(QWidget *parent = 0); virtual ~QDesignerMenuBar(); - bool eventFilter(QObject *object, QEvent *event); + bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE; QDesignerFormWindowInterface *formWindow() const; QDesignerActionProviderExtension *actionProvider(); diff --git a/src/designer/src/lib/shared/qdesigner_promotion_p.h b/src/designer/src/lib/shared/qdesigner_promotion_p.h index 628f2d1ff..58d8a5fa2 100644 --- a/src/designer/src/lib/shared/qdesigner_promotion_p.h +++ b/src/designer/src/lib/shared/qdesigner_promotion_p.h @@ -67,7 +67,7 @@ namespace qdesigner_internal { virtual bool addPromotedClass(const QString &baseClass, const QString &className, const QString &includeFile, - QString *errorMessage); + QString *errorMessage) Q_DECL_OVERRIDE; bool removePromotedClass(const QString &className, QString *errorMessage) Q_DECL_OVERRIDE; diff --git a/src/designer/src/lib/shared/qdesigner_qsettings_p.h b/src/designer/src/lib/shared/qdesigner_qsettings_p.h index 2d9409318..75bca3e0c 100644 --- a/src/designer/src/lib/shared/qdesigner_qsettings_p.h +++ b/src/designer/src/lib/shared/qdesigner_qsettings_p.h @@ -60,7 +60,7 @@ public: QDesignerQSettings(); void beginGroup(const QString &prefix) Q_DECL_OVERRIDE; - virtual void endGroup(); + void endGroup() Q_DECL_OVERRIDE; bool contains(const QString &key) const Q_DECL_OVERRIDE; void setValue(const QString &key, const QVariant &value) Q_DECL_OVERRIDE; diff --git a/src/designer/src/lib/shared/qdesigner_widget_p.h b/src/designer/src/lib/shared/qdesigner_widget_p.h index 4ac60316b..3497ef1cc 100644 --- a/src/designer/src/lib/shared/qdesigner_widget_p.h +++ b/src/designer/src/lib/shared/qdesigner_widget_p.h @@ -68,7 +68,7 @@ public: void updatePixmap(); - virtual QSize minimumSizeHint() const + QSize minimumSizeHint() const Q_DECL_OVERRIDE { return QWidget::minimumSizeHint().expandedTo(QSize(16, 16)); } protected: diff --git a/src/designer/src/lib/shared/qlayout_widget.cpp b/src/designer/src/lib/shared/qlayout_widget.cpp index b520894c4..22a6b7599 100644 --- a/src/designer/src/lib/shared/qlayout_widget.cpp +++ b/src/designer/src/lib/shared/qlayout_widget.cpp @@ -474,8 +474,8 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const void pushState(const QDesignerFormEditorInterface *, const QWidget *) Q_DECL_OVERRIDE; void popState(const QDesignerFormEditorInterface *, QWidget *) Q_DECL_OVERRIDE; - virtual bool canSimplify(const QDesignerFormEditorInterface *, const QWidget *, const QRect &) const { return false; } - virtual void simplify(const QDesignerFormEditorInterface *, QWidget *, const QRect &) {} + bool canSimplify(const QDesignerFormEditorInterface *, const QWidget *, const QRect &) const Q_DECL_OVERRIDE { return false; } + void simplify(const QDesignerFormEditorInterface *, QWidget *, const QRect &) Q_DECL_OVERRIDE {} // Helper for restoring layout states typedef QVector LayoutItemVector; @@ -1567,11 +1567,11 @@ public: void insertWidget(QWidget *widget, const QPair &cell) Q_DECL_OVERRIDE; void removeWidget(QWidget *widget) Q_DECL_OVERRIDE; - virtual void simplify() {} - virtual void insertRow(int /*row*/) {} - virtual void insertColumn(int /*column*/) {} + void simplify() Q_DECL_OVERRIDE {} + void insertRow(int /*row*/) Q_DECL_OVERRIDE {} + void insertColumn(int /*column*/) Q_DECL_OVERRIDE {} - virtual int findItemAt(int /*at_row*/, int /*at_column*/) const { return -1; } + int findItemAt(int /*at_row*/, int /*at_column*/) const Q_DECL_OVERRIDE { return -1; } using QLayoutSupport::findItemAt; private: @@ -1697,8 +1697,8 @@ public: GridLikeLayoutSupportBase(QDesignerFormWindowInterface *formWindow, QWidget *widget, LayoutHelper *helper, QObject *parent = 0) : QLayoutSupport(formWindow, widget, helper, parent) {} - void insertWidget(QWidget *widget, const QPair &cell); - virtual void removeWidget(QWidget *widget) { helper()->removeWidget(layout(), widget); } + void insertWidget(QWidget *widget, const QPair &cell) Q_DECL_OVERRIDE; + void removeWidget(QWidget *widget) Q_DECL_OVERRIDE { helper()->removeWidget(layout(), widget); } int findItemAt(int row, int column) const Q_DECL_OVERRIDE; using QLayoutSupport::findItemAt; @@ -1711,7 +1711,7 @@ private: void setCurrentCellFromIndicatorOnEmptyCell(int index) Q_DECL_OVERRIDE; void setCurrentCellFromIndicator(Qt::Orientation indicatorOrientation, int index, int increment) Q_DECL_OVERRIDE; - virtual bool supportsIndicatorOrientation(Qt::Orientation) const { return true; } + bool supportsIndicatorOrientation(Qt::Orientation) const Q_DECL_OVERRIDE { return true; } QRect extendedGeometry(int index) const Q_DECL_OVERRIDE; @@ -1811,7 +1811,7 @@ public: QGridLayoutSupport(QDesignerFormWindowInterface *formWindow, QWidget *widget, QObject *parent = 0); - virtual void simplify(); + void simplify() Q_DECL_OVERRIDE; void insertRow(int row) Q_DECL_OVERRIDE; void insertColumn(int column) Q_DECL_OVERRIDE; @@ -1858,9 +1858,9 @@ class QFormLayoutSupport: public GridLikeLayoutSupportBase public: QFormLayoutSupport(QDesignerFormWindowInterface *formWindow, QWidget *widget, QObject *parent = 0); - virtual void simplify() {} - virtual void insertRow(int /*row*/) {} - virtual void insertColumn(int /*column*/) {} + void simplify() Q_DECL_OVERRIDE {} + void insertRow(int /*row*/) Q_DECL_OVERRIDE {} + void insertColumn(int /*column*/) Q_DECL_OVERRIDE {} private: void checkCellForInsertion(int * row, int *col) const Q_DECL_OVERRIDE; diff --git a/src/designer/src/lib/shared/qlayout_widget_p.h b/src/designer/src/lib/shared/qlayout_widget_p.h index 52f9672fa..c8553fd8a 100644 --- a/src/designer/src/lib/shared/qlayout_widget_p.h +++ b/src/designer/src/lib/shared/qlayout_widget_p.h @@ -181,11 +181,11 @@ public: LayoutHelper* helper() const { return m_helper; } // DecorationExtension - virtual int currentIndex() const { return m_currentIndex; } + int currentIndex() const Q_DECL_OVERRIDE { return m_currentIndex; } - virtual InsertMode currentInsertMode() const { return m_currentInsertMode; } + InsertMode currentInsertMode() const Q_DECL_OVERRIDE { return m_currentInsertMode; } - virtual QPair currentCell() const { return m_currentCell; } + QPair currentCell() const Q_DECL_OVERRIDE { return m_currentCell; } int findItemAt(const QPoint &pos) const Q_DECL_OVERRIDE; int indexOf(QWidget *widget) const Q_DECL_OVERRIDE; @@ -221,7 +221,7 @@ protected: virtual QRect extendedGeometry(int index) const = 0; virtual bool supportsIndicatorOrientation(Qt::Orientation indicatorOrientation) const = 0; - QRect itemInfo(int index) const; + QRect itemInfo(int index) const Q_DECL_OVERRIDE; QLayout *layout() const; QGridLayout *gridLayout() const; QWidget *widget() const { return m_widget; } diff --git a/src/designer/src/lib/shared/spacer_widget_p.h b/src/designer/src/lib/shared/spacer_widget_p.h index 780f866bc..a346c3863 100644 --- a/src/designer/src/lib/shared/spacer_widget_p.h +++ b/src/designer/src/lib/shared/spacer_widget_p.h @@ -69,7 +69,7 @@ class QDESIGNER_SHARED_EXPORT Spacer: public QWidget public: Spacer(QWidget *parent = 0); - QSize sizeHint() const; + QSize sizeHint() const Q_DECL_OVERRIDE; QSize sizeHintProperty() const; void setSizeHintProperty(const QSize &s); @@ -86,8 +86,8 @@ public: bool event(QEvent *e) Q_DECL_OVERRIDE; protected: - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent* e); + void paintEvent(QPaintEvent *e) Q_DECL_OVERRIDE; + void resizeEvent(QResizeEvent* e) Q_DECL_OVERRIDE; void updateMask(); private: diff --git a/src/designer/src/lib/shared/textpropertyeditor_p.h b/src/designer/src/lib/shared/textpropertyeditor_p.h index 40e0a5416..3e05d0b9e 100644 --- a/src/designer/src/lib/shared/textpropertyeditor_p.h +++ b/src/designer/src/lib/shared/textpropertyeditor_p.h @@ -122,7 +122,7 @@ namespace qdesigner_internal { void clear(); protected: - void resizeEvent(QResizeEvent * event ); + void resizeEvent(QResizeEvent * event ) Q_DECL_OVERRIDE; private slots: void slotTextChanged(const QString &text); diff --git a/src/designer/src/lib/shared/zoomwidget_p.h b/src/designer/src/lib/shared/zoomwidget_p.h index df1952fbc..339a11161 100644 --- a/src/designer/src/lib/shared/zoomwidget_p.h +++ b/src/designer/src/lib/shared/zoomwidget_p.h @@ -193,10 +193,10 @@ public slots: void dump() const; protected: - void resizeEvent(QResizeEvent * event); + void resizeEvent(QResizeEvent * event) Q_DECL_OVERRIDE; // Overwritten from ZoomView - virtual void applyZoom(); + void applyZoom() Q_DECL_OVERRIDE; // Overwrite to actually perform a resize. This is required if we are in a layout. Default does resize(). virtual void doResize(const QSize &s); diff --git a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h index 57857acf9..8b38649be 100644 --- a/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h +++ b/src/designer/src/plugins/activeqt/qaxwidgetpropertysheet.h @@ -61,8 +61,8 @@ public: QVariant property(int index) const Q_DECL_OVERRIDE; void setProperty(int index, const QVariant &value) Q_DECL_OVERRIDE; bool reset(int index) Q_DECL_OVERRIDE; - int indexOf(const QString &name) const; - bool dynamicPropertiesAllowed() const; + int indexOf(const QString &name) const Q_DECL_OVERRIDE; + bool dynamicPropertiesAllowed() const Q_DECL_OVERRIDE; static const char *controlPropertyName; diff --git a/src/designer/src/uitools/quiloader.cpp b/src/designer/src/uitools/quiloader.cpp index dbf891822..9dfbed584 100644 --- a/src/designer/src/uitools/quiloader.cpp +++ b/src/designer/src/uitools/quiloader.cpp @@ -339,7 +339,7 @@ public: return ParentClass::createActionGroup(parent, name); } - virtual QWidget *createWidget(const QString &className, QWidget *parent, const QString &name) + QWidget *createWidget(const QString &className, QWidget *parent, const QString &name) Q_DECL_OVERRIDE { if (QWidget *widget = loader->createWidget(className, parent, name)) { widget->setObjectName(name); @@ -349,7 +349,7 @@ public: return 0; } - virtual QLayout *createLayout(const QString &className, QObject *parent, const QString &name) + QLayout *createLayout(const QString &className, QObject *parent, const QString &name) Q_DECL_OVERRIDE { if (QLayout *layout = loader->createLayout(className, parent, name)) { layout->setObjectName(name); @@ -359,7 +359,7 @@ public: return 0; } - virtual QActionGroup *createActionGroup(QObject *parent, const QString &name) + QActionGroup *createActionGroup(QObject *parent, const QString &name) Q_DECL_OVERRIDE { if (QActionGroup *actionGroup = loader->createActionGroup(parent, name)) { actionGroup->setObjectName(name); @@ -369,7 +369,7 @@ public: return 0; } - virtual QAction *createAction(QObject *parent, const QString &name) + QAction *createAction(QObject *parent, const QString &name) Q_DECL_OVERRIDE { if (QAction *action = loader->createAction(parent, name)) { action->setObjectName(name); -- cgit v1.2.3