summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-31 11:44:54 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-07-31 20:31:31 +0000
commit1c95d379f2d4f53ca8e4d33b27d37b7dab6d7596 (patch)
treebd593bad43cdda9987bfeadf557d01366b4e98d6 /src
parentb0fd9623651ca32187e4f79ad299ef43ce8347a0 (diff)
Qt Designer: Fix clang-tidy warnings about class definitions
- Use ' = default' for trivial constructors/destructors - replace virtual by override or add override where applicable - Return *this from assignment operators of custom iterators - Replace trivial constructors by member initialization for simple structs - Add Q_DISABLE_COPY Change-Id: I67fb07cb82ccba93a41d58a8a0782628c9c681d9 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/designer/src/components/buddyeditor/buddyeditor_plugin.cpp4
-rw-r--r--src/designer/src/components/buddyeditor/buddyeditor_plugin.h2
-rw-r--r--src/designer/src/components/buddyeditor/buddyeditor_tool.cpp4
-rw-r--r--src/designer/src/components/buddyeditor/buddyeditor_tool.h2
-rw-r--r--src/designer/src/components/formeditor/embeddedoptionspage.h8
-rw-r--r--src/designer/src/components/formeditor/formeditor.cpp4
-rw-r--r--src/designer/src/components/formeditor/formeditor.h2
-rw-r--r--src/designer/src/components/formeditor/formeditor_optionspage.h8
-rw-r--r--src/designer/src/components/formeditor/formwindow.cpp19
-rw-r--r--src/designer/src/components/formeditor/formwindow.h2
-rw-r--r--src/designer/src/components/formeditor/formwindow_widgetstack.cpp4
-rw-r--r--src/designer/src/components/formeditor/formwindow_widgetstack.h2
-rw-r--r--src/designer/src/components/formeditor/formwindowcursor.cpp4
-rw-r--r--src/designer/src/components/formeditor/formwindowcursor.h2
-rw-r--r--src/designer/src/components/formeditor/formwindowmanager.h2
-rw-r--r--src/designer/src/components/formeditor/formwindowsettings.h4
-rw-r--r--src/designer/src/components/formeditor/layout_propertysheet.cpp4
-rw-r--r--src/designer/src/components/formeditor/layout_propertysheet.h2
-rw-r--r--src/designer/src/components/formeditor/line_propertysheet.cpp4
-rw-r--r--src/designer/src/components/formeditor/line_propertysheet.h2
-rw-r--r--src/designer/src/components/formeditor/qdesigner_resource.cpp6
-rw-r--r--src/designer/src/components/formeditor/qdesigner_resource.h2
-rw-r--r--src/designer/src/components/formeditor/qlayoutwidget_propertysheet.cpp4
-rw-r--r--src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h2
-rw-r--r--src/designer/src/components/formeditor/spacer_propertysheet.cpp4
-rw-r--r--src/designer/src/components/formeditor/spacer_propertysheet.h2
-rw-r--r--src/designer/src/components/formeditor/tool_widgeteditor.cpp4
-rw-r--r--src/designer/src/components/formeditor/tool_widgeteditor.h2
-rw-r--r--src/designer/src/components/formeditor/widgetselection.h8
-rw-r--r--src/designer/src/components/objectinspector/objectinspector.cpp1
-rw-r--r--src/designer/src/components/objectinspector/objectinspector.h2
-rw-r--r--src/designer/src/components/propertyeditor/brushpropertymanager.cpp4
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp6
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditor.cpp4
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditor.h2
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditorbutton.cpp4
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditorbutton.h2
-rw-r--r--src/designer/src/components/propertyeditor/previewframe.cpp2
-rw-r--r--src/designer/src/components/propertyeditor/previewwidget.cpp4
-rw-r--r--src/designer/src/components/propertyeditor/previewwidget.h2
-rw-r--r--src/designer/src/components/propertyeditor/propertyeditor.cpp19
-rw-r--r--src/designer/src/components/propertyeditor/propertyeditor.h2
-rw-r--r--src/designer/src/components/propertyeditor/qlonglongvalidator.cpp10
-rw-r--r--src/designer/src/components/propertyeditor/stringlisteditorbutton.cpp4
-rw-r--r--src/designer/src/components/propertyeditor/stringlisteditorbutton.h2
-rw-r--r--src/designer/src/components/signalsloteditor/signalslot_utils.cpp9
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditor_p.h2
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp4
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h2
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp4
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditor_tool.h2
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp6
-rw-r--r--src/designer/src/components/tabordereditor/tabordereditor_plugin.h2
-rw-r--r--src/designer/src/components/tabordereditor/tabordereditor_tool.cpp4
-rw-r--r--src/designer/src/components/tabordereditor/tabordereditor_tool.h2
-rw-r--r--src/designer/src/components/taskmenu/button_taskmenu.cpp16
-rw-r--r--src/designer/src/components/taskmenu/button_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/combobox_taskmenu.cpp4
-rw-r--r--src/designer/src/components/taskmenu/combobox_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp4
-rw-r--r--src/designer/src/components/taskmenu/containerwidget_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/inplace_widget_helper.h2
-rw-r--r--src/designer/src/components/taskmenu/itemlisteditor.cpp2
-rw-r--r--src/designer/src/components/taskmenu/listwidget_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/tablewidget_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/taskmenu_component.cpp4
-rw-r--r--src/designer/src/components/taskmenu/taskmenu_component.h2
-rw-r--r--src/designer/src/components/taskmenu/textedit_taskmenu.cpp4
-rw-r--r--src/designer/src/components/taskmenu/textedit_taskmenu.h2
-rw-r--r--src/designer/src/components/taskmenu/treewidget_taskmenu.h2
-rw-r--r--src/designer/src/components/widgetbox/widgetbox.cpp4
-rw-r--r--src/designer/src/components/widgetbox/widgetbox.h2
-rw-r--r--src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp2
-rw-r--r--src/designer/src/designer/newform.h2
-rw-r--r--src/designer/src/designer/qdesigner.h2
-rw-r--r--src/designer/src/designer/qdesigner_actions.h2
-rw-r--r--src/designer/src/designer/qdesigner_appearanceoptions.h8
-rw-r--r--src/designer/src/designer/qdesigner_formwindow.h2
-rw-r--r--src/designer/src/designer/qdesigner_server.cpp4
-rw-r--r--src/designer/src/designer/qdesigner_server.h4
-rw-r--r--src/designer/src/designer/qdesigner_workbench.h2
-rw-r--r--src/designer/src/designer/saveformastemplate.cpp4
-rw-r--r--src/designer/src/designer/saveformastemplate.h4
-rw-r--r--src/designer/src/lib/shared/actioneditor.cpp4
-rw-r--r--src/designer/src/lib/shared/actioneditor_p.h2
-rw-r--r--src/designer/src/lib/shared/actionprovider_p.h2
-rw-r--r--src/designer/src/lib/shared/codedialog_p.h2
-rw-r--r--src/designer/src/lib/shared/connectionedit_p.h6
-rw-r--r--src/designer/src/lib/shared/deviceprofile.cpp4
-rw-r--r--src/designer/src/lib/shared/dialoggui_p.h2
-rw-r--r--src/designer/src/lib/shared/formwindowbase_p.h2
-rw-r--r--src/designer/src/lib/shared/iconselector.cpp15
-rw-r--r--src/designer/src/lib/shared/iconselector_p.h6
-rw-r--r--src/designer/src/lib/shared/layout.cpp17
-rw-r--r--src/designer/src/lib/shared/layout_p.h2
-rw-r--r--src/designer/src/lib/shared/metadatabase.cpp4
-rw-r--r--src/designer/src/lib/shared/metadatabase_p.h4
-rw-r--r--src/designer/src/lib/shared/morphmenu.cpp8
-rw-r--r--src/designer/src/lib/shared/newactiondialog_p.h2
-rw-r--r--src/designer/src/lib/shared/newformwidget_p.h2
-rw-r--r--src/designer/src/lib/shared/orderdialog_p.h2
-rw-r--r--src/designer/src/lib/shared/pluginmanager_p.h2
-rw-r--r--src/designer/src/lib/shared/previewconfigurationwidget_p.h2
-rw-r--r--src/designer/src/lib/shared/previewmanager.cpp4
-rw-r--r--src/designer/src/lib/shared/previewmanager_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_command.cpp72
-rw-r--r--src/designer/src/lib/shared/qdesigner_dnditem_p.h4
-rw-r--r--src/designer/src/lib/shared/qdesigner_dockwidget.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_dockwidget_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_formwindowmanager_p.h4
-rw-r--r--src/designer/src/lib/shared/qdesigner_introspection.cpp77
-rw-r--r--src/designer/src/lib/shared/qdesigner_introspection_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_membersheet_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_menu.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_menu_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_menubar.cpp9
-rw-r--r--src/designer/src/lib/shared/qdesigner_menubar_p.h4
-rw-r--r--src/designer/src/lib/shared/qdesigner_promotion_p.h8
-rw-r--r--src/designer/src/lib/shared/qdesigner_propertysheet_p.h6
-rw-r--r--src/designer/src/lib/shared/qdesigner_stackedbox_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_tabwidget.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_taskmenu_p.h2
-rw-r--r--src/designer/src/lib/shared/qdesigner_utils.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_widget.cpp4
-rw-r--r--src/designer/src/lib/shared/qdesigner_widget_p.h6
-rw-r--r--src/designer/src/lib/shared/qdesigner_widgetbox.cpp4
-rw-r--r--src/designer/src/lib/shared/qlayout_widget.cpp4
-rw-r--r--src/designer/src/lib/shared/qlayout_widget_p.h2
-rw-r--r--src/designer/src/lib/shared/qsimpleresource.cpp5
-rw-r--r--src/designer/src/lib/shared/qsimpleresource_p.h2
-rw-r--r--src/designer/src/lib/shared/qtresourceeditordialog.cpp8
-rw-r--r--src/designer/src/lib/shared/qtresourceeditordialog_p.h4
-rw-r--r--src/designer/src/lib/shared/qtresourcemodel.cpp4
-rw-r--r--src/designer/src/lib/shared/qtresourceview_p.h2
-rw-r--r--src/designer/src/lib/shared/richtexteditor.cpp4
-rw-r--r--src/designer/src/lib/shared/signalslotdialog.cpp6
-rw-r--r--src/designer/src/lib/shared/signalslotdialog_p.h2
-rw-r--r--src/designer/src/lib/shared/widgetdatabase.cpp4
-rw-r--r--src/designer/src/lib/shared/widgetdatabase_p.h2
-rw-r--r--src/designer/src/lib/shared/widgetfactory.cpp4
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp4
-rw-r--r--src/designer/src/lib/uilib/formbuilder.h2
-rw-r--r--src/designer/src/lib/uilib/resourcebuilder.cpp10
-rw-r--r--src/designer/src/lib/uilib/textbuilder.cpp10
-rw-r--r--src/designer/src/uitools/quiloader.cpp2
-rw-r--r--src/designer/src/uitools/quiloader.h2
-rw-r--r--src/shared/deviceskin/deviceskin.h8
-rw-r--r--src/shared/findwidget/abstractfindwidget.cpp4
-rw-r--r--src/shared/findwidget/abstractfindwidget.h6
-rw-r--r--src/shared/findwidget/itemviewfindwidget.h5
-rw-r--r--src/shared/findwidget/texteditfindwidget.h5
151 files changed, 309 insertions, 444 deletions
diff --git a/src/designer/src/components/buddyeditor/buddyeditor_plugin.cpp b/src/designer/src/components/buddyeditor/buddyeditor_plugin.cpp
index 14851be88..3c1479ba8 100644
--- a/src/designer/src/components/buddyeditor/buddyeditor_plugin.cpp
+++ b/src/designer/src/components/buddyeditor/buddyeditor_plugin.cpp
@@ -44,9 +44,7 @@ BuddyEditorPlugin::BuddyEditorPlugin()
{
}
-BuddyEditorPlugin::~BuddyEditorPlugin()
-{
-}
+BuddyEditorPlugin::~BuddyEditorPlugin() = default;
bool BuddyEditorPlugin::isInitialized() const
{
diff --git a/src/designer/src/components/buddyeditor/buddyeditor_plugin.h b/src/designer/src/components/buddyeditor/buddyeditor_plugin.h
index 8f5a2f2eb..316d5f0d7 100644
--- a/src/designer/src/components/buddyeditor/buddyeditor_plugin.h
+++ b/src/designer/src/components/buddyeditor/buddyeditor_plugin.h
@@ -52,7 +52,7 @@ class QT_BUDDYEDITOR_EXPORT BuddyEditorPlugin: public QObject, public QDesignerF
Q_INTERFACES(QDesignerFormEditorPluginInterface)
public:
BuddyEditorPlugin();
- virtual ~BuddyEditorPlugin();
+ ~BuddyEditorPlugin() override;
bool isInitialized() const override;
void initialize(QDesignerFormEditorInterface *core) override;
diff --git a/src/designer/src/components/buddyeditor/buddyeditor_tool.cpp b/src/designer/src/components/buddyeditor/buddyeditor_tool.cpp
index 6da93feae..fa156fbd3 100644
--- a/src/designer/src/components/buddyeditor/buddyeditor_tool.cpp
+++ b/src/designer/src/components/buddyeditor/buddyeditor_tool.cpp
@@ -44,9 +44,7 @@ BuddyEditorTool::BuddyEditorTool(QDesignerFormWindowInterface *formWindow, QObje
{
}
-BuddyEditorTool::~BuddyEditorTool()
-{
-}
+BuddyEditorTool::~BuddyEditorTool() = default;
QDesignerFormEditorInterface *BuddyEditorTool::core() const
{
diff --git a/src/designer/src/components/buddyeditor/buddyeditor_tool.h b/src/designer/src/components/buddyeditor/buddyeditor_tool.h
index d66d17ba9..1cfe8393a 100644
--- a/src/designer/src/components/buddyeditor/buddyeditor_tool.h
+++ b/src/designer/src/components/buddyeditor/buddyeditor_tool.h
@@ -50,7 +50,7 @@ class QT_BUDDYEDITOR_EXPORT BuddyEditorTool: public QDesignerFormWindowToolInter
Q_OBJECT
public:
explicit BuddyEditorTool(QDesignerFormWindowInterface *formWindow, QObject *parent = 0);
- virtual ~BuddyEditorTool();
+ ~BuddyEditorTool() override;
QDesignerFormEditorInterface *core() const override;
QDesignerFormWindowInterface *formWindow() const override;
diff --git a/src/designer/src/components/formeditor/embeddedoptionspage.h b/src/designer/src/components/formeditor/embeddedoptionspage.h
index b51cecd4b..f0d8b96ff 100644
--- a/src/designer/src/components/formeditor/embeddedoptionspage.h
+++ b/src/designer/src/components/formeditor/embeddedoptionspage.h
@@ -75,10 +75,10 @@ class EmbeddedOptionsPage : public QDesignerOptionsPageInterface
public:
explicit EmbeddedOptionsPage(QDesignerFormEditorInterface *core);
- QString name() const;
- QWidget *createPage(QWidget *parent);
- virtual void finish();
- virtual void apply();
+ QString name() const override;
+ QWidget *createPage(QWidget *parent) override;
+ void finish() override;
+ void apply() override;
private:
QDesignerFormEditorInterface *m_core;
diff --git a/src/designer/src/components/formeditor/formeditor.cpp b/src/designer/src/components/formeditor/formeditor.cpp
index f562f4aa3..e29a94bbc 100644
--- a/src/designer/src/components/formeditor/formeditor.cpp
+++ b/src/designer/src/components/formeditor/formeditor.cpp
@@ -147,9 +147,7 @@ FormEditor::FormEditor(QObject *parent)
setSettingsManager(new QDesignerQSettings());
}
-FormEditor::~FormEditor()
-{
-}
+FormEditor::~FormEditor() = default;
void FormEditor::slotQrcFileChangedExternally(const QString &path)
{
diff --git a/src/designer/src/components/formeditor/formeditor.h b/src/designer/src/components/formeditor/formeditor.h
index df06f9202..1edbfe384 100644
--- a/src/designer/src/components/formeditor/formeditor.h
+++ b/src/designer/src/components/formeditor/formeditor.h
@@ -44,7 +44,7 @@ class QT_FORMEDITOR_EXPORT FormEditor: public QDesignerFormEditorInterface
Q_OBJECT
public:
FormEditor(QObject *parent = 0);
- virtual ~FormEditor();
+ ~FormEditor() override;
public slots:
void slotQrcFileChangedExternally(const QString &path);
};
diff --git a/src/designer/src/components/formeditor/formeditor_optionspage.h b/src/designer/src/components/formeditor/formeditor_optionspage.h
index 1ef5138a1..160d7340a 100644
--- a/src/designer/src/components/formeditor/formeditor_optionspage.h
+++ b/src/designer/src/components/formeditor/formeditor_optionspage.h
@@ -48,10 +48,10 @@ class FormEditorOptionsPage : public QDesignerOptionsPageInterface
public:
explicit FormEditorOptionsPage(QDesignerFormEditorInterface *core);
- QString name() const;
- QWidget *createPage(QWidget *parent);
- virtual void apply();
- virtual void finish();
+ QString name() const override;
+ QWidget *createPage(QWidget *parent) override;
+ void apply() override;
+ void finish() override;
private:
QDesignerFormEditorInterface *m_core;
diff --git a/src/designer/src/components/formeditor/formwindow.cpp b/src/designer/src/components/formeditor/formwindow.cpp
index d791666c6..316c16cab 100644
--- a/src/designer/src/components/formeditor/formwindow.cpp
+++ b/src/designer/src/components/formeditor/formwindow.cpp
@@ -102,6 +102,7 @@ QT_BEGIN_NAMESPACE
namespace {
class BlockSelection
{
+ Q_DISABLE_COPY(BlockSelection)
public:
BlockSelection(qdesigner_internal::FormWindow *fw)
: m_formWindow(fw),
@@ -130,6 +131,7 @@ namespace qdesigner_internal {
class FormWindow::Selection
{
+ Q_DISABLE_COPY(Selection)
public:
Selection();
~Selection();
@@ -167,9 +169,7 @@ private:
SelectionHash m_usedSelections;
};
-FormWindow::Selection::Selection()
-{
-}
+FormWindow::Selection::Selection() = default;
FormWindow::Selection::~Selection()
{
@@ -1417,14 +1417,13 @@ int FormWindow::calcValue(int val, bool forward, bool snap, int snapOffset) cons
// ArrowKeyOperation: Stores a keyboard move or resize (Shift pressed)
// operation.
-struct ArrowKeyOperation {
- ArrowKeyOperation() : resize(false), distance(0), arrowKey(Qt::Key_Left) {}
-
- QRect apply(const QRect &in) const;
+struct ArrowKeyOperation
+{
+ QRect apply(const QRect &rect) const;
- bool resize; // Resize: Shift-Key->drag bottom/right corner, else just move
- int distance;
- int arrowKey;
+ bool resize = false; // Resize: Shift-Key->drag bottom/right corner, else just move
+ int distance = 0;
+ int arrowKey = Qt::Key_Left;
};
} // namespace
diff --git a/src/designer/src/components/formeditor/formwindow.h b/src/designer/src/components/formeditor/formwindow.h
index 065e90244..9cfaadb2c 100644
--- a/src/designer/src/components/formeditor/formwindow.h
+++ b/src/designer/src/components/formeditor/formwindow.h
@@ -78,7 +78,7 @@ public:
};
explicit FormWindow(FormEditor *core, QWidget *parent = 0, Qt::WindowFlags flags = 0);
- virtual ~FormWindow();
+ ~FormWindow() override;
QDesignerFormEditorInterface *core() const override;
diff --git a/src/designer/src/components/formeditor/formwindow_widgetstack.cpp b/src/designer/src/components/formeditor/formwindow_widgetstack.cpp
index 12cbced5b..a7e77eecf 100644
--- a/src/designer/src/components/formeditor/formwindow_widgetstack.cpp
+++ b/src/designer/src/components/formeditor/formwindow_widgetstack.cpp
@@ -63,9 +63,7 @@ FormWindowWidgetStack::FormWindowWidgetStack(QObject *parent) :
m_formContainer->setAutoFillBackground(true);
}
-FormWindowWidgetStack::~FormWindowWidgetStack()
-{
-}
+FormWindowWidgetStack::~FormWindowWidgetStack() = default;
int FormWindowWidgetStack::count() const
{
diff --git a/src/designer/src/components/formeditor/formwindow_widgetstack.h b/src/designer/src/components/formeditor/formwindow_widgetstack.h
index c798fb061..de535e0ca 100644
--- a/src/designer/src/components/formeditor/formwindow_widgetstack.h
+++ b/src/designer/src/components/formeditor/formwindow_widgetstack.h
@@ -47,7 +47,7 @@ class QT_FORMEDITOR_EXPORT FormWindowWidgetStack: public QObject
Q_OBJECT
public:
FormWindowWidgetStack(QObject *parent = 0);
- virtual ~FormWindowWidgetStack();
+ ~FormWindowWidgetStack() override;
QLayout *layout() const;
diff --git a/src/designer/src/components/formeditor/formwindowcursor.cpp b/src/designer/src/components/formeditor/formwindowcursor.cpp
index 2c316f627..0e83de8e8 100644
--- a/src/designer/src/components/formeditor/formwindowcursor.cpp
+++ b/src/designer/src/components/formeditor/formwindowcursor.cpp
@@ -48,9 +48,7 @@ FormWindowCursor::FormWindowCursor(FormWindow *fw, QObject *parent)
connect(fw, &QDesignerFormWindowInterface::changed, this, &FormWindowCursor::update);
}
-FormWindowCursor::~FormWindowCursor()
-{
-}
+FormWindowCursor::~FormWindowCursor() = default;
QDesignerFormWindowInterface *FormWindowCursor::formWindow() const
{
diff --git a/src/designer/src/components/formeditor/formwindowcursor.h b/src/designer/src/components/formeditor/formwindowcursor.h
index c0cdc30c9..4ac73798c 100644
--- a/src/designer/src/components/formeditor/formwindowcursor.h
+++ b/src/designer/src/components/formeditor/formwindowcursor.h
@@ -44,7 +44,7 @@ class QT_FORMEDITOR_EXPORT FormWindowCursor: public QObject, public QDesignerFor
Q_OBJECT
public:
explicit FormWindowCursor(FormWindow *fw, QObject *parent = 0);
- virtual ~FormWindowCursor();
+ ~FormWindowCursor() override;
QDesignerFormWindowInterface *formWindow() const override;
diff --git a/src/designer/src/components/formeditor/formwindowmanager.h b/src/designer/src/components/formeditor/formwindowmanager.h
index 1106ed0ae..c6f19d210 100644
--- a/src/designer/src/components/formeditor/formwindowmanager.h
+++ b/src/designer/src/components/formeditor/formwindowmanager.h
@@ -58,7 +58,7 @@ class QT_FORMEDITOR_EXPORT FormWindowManager
Q_OBJECT
public:
explicit FormWindowManager(QDesignerFormEditorInterface *core, QObject *parent = 0);
- virtual ~FormWindowManager();
+ ~FormWindowManager() override;
QDesignerFormEditorInterface *core() const override;
diff --git a/src/designer/src/components/formeditor/formwindowsettings.h b/src/designer/src/components/formeditor/formwindowsettings.h
index 5b4618e58..04bac0be4 100644
--- a/src/designer/src/components/formeditor/formwindowsettings.h
+++ b/src/designer/src/components/formeditor/formwindowsettings.h
@@ -53,9 +53,9 @@ class FormWindowSettings: public QDialog
Q_OBJECT
public:
explicit FormWindowSettings(QDesignerFormWindowInterface *formWindow);
- virtual ~FormWindowSettings();
+ ~FormWindowSettings() override;
- virtual void accept();
+ void accept() override;
private:
FormWindowData data() const;
diff --git a/src/designer/src/components/formeditor/layout_propertysheet.cpp b/src/designer/src/components/formeditor/layout_propertysheet.cpp
index bf88972a2..e0e456d32 100644
--- a/src/designer/src/components/formeditor/layout_propertysheet.cpp
+++ b/src/designer/src/components/formeditor/layout_propertysheet.cpp
@@ -237,9 +237,7 @@ LayoutPropertySheet::LayoutPropertySheet(QLayout *l, QObject *parent)
#endif
}
-LayoutPropertySheet::~LayoutPropertySheet()
-{
-}
+LayoutPropertySheet::~LayoutPropertySheet() = default;
void LayoutPropertySheet::setProperty(int index, const QVariant &value)
{
diff --git a/src/designer/src/components/formeditor/layout_propertysheet.h b/src/designer/src/components/formeditor/layout_propertysheet.h
index 89e370d3b..27682ad66 100644
--- a/src/designer/src/components/formeditor/layout_propertysheet.h
+++ b/src/designer/src/components/formeditor/layout_propertysheet.h
@@ -47,7 +47,7 @@ class LayoutPropertySheet: public QDesignerPropertySheet
Q_INTERFACES(QDesignerPropertySheetExtension)
public:
explicit LayoutPropertySheet(QLayout *object, QObject *parent = 0);
- virtual ~LayoutPropertySheet();
+ ~LayoutPropertySheet() override;
void setProperty(int index, const QVariant &value) override;
QVariant property(int index) const override;
diff --git a/src/designer/src/components/formeditor/line_propertysheet.cpp b/src/designer/src/components/formeditor/line_propertysheet.cpp
index 6d7afca93..3ad332015 100644
--- a/src/designer/src/components/formeditor/line_propertysheet.cpp
+++ b/src/designer/src/components/formeditor/line_propertysheet.cpp
@@ -46,9 +46,7 @@ LinePropertySheet::LinePropertySheet(Line *object, QObject *parent)
clearFakeProperties();
}
-LinePropertySheet::~LinePropertySheet()
-{
-}
+LinePropertySheet::~LinePropertySheet() = default;
bool LinePropertySheet::isVisible(int index) const
{
diff --git a/src/designer/src/components/formeditor/line_propertysheet.h b/src/designer/src/components/formeditor/line_propertysheet.h
index f5ff443ed..1268153ee 100644
--- a/src/designer/src/components/formeditor/line_propertysheet.h
+++ b/src/designer/src/components/formeditor/line_propertysheet.h
@@ -43,7 +43,7 @@ class LinePropertySheet: public QDesignerPropertySheet
Q_INTERFACES(QDesignerPropertySheetExtension)
public:
explicit LinePropertySheet(Line *object, QObject *parent = 0);
- virtual ~LinePropertySheet();
+ ~LinePropertySheet() override;
void setProperty(int index, const QVariant &value) override;
bool isVisible(int index) const override;
diff --git a/src/designer/src/components/formeditor/qdesigner_resource.cpp b/src/designer/src/components/formeditor/qdesigner_resource.cpp
index 4dd6439e4..e79f1897b 100644
--- a/src/designer/src/components/formeditor/qdesigner_resource.cpp
+++ b/src/designer/src/components/formeditor/qdesigner_resource.cpp
@@ -364,7 +364,7 @@ inline void translationParametersFromDom(const DomElement *e, PropertySheetTrans
class QDesignerTextBuilder : public QTextBuilder
{
public:
- QDesignerTextBuilder() {}
+ QDesignerTextBuilder() = default;
QVariant loadText(const DomProperty *icon) const override;
@@ -457,9 +457,7 @@ QDesignerResource::QDesignerResource(FormWindow *formWindow) :
}
}
-QDesignerResource::~QDesignerResource()
-{
-}
+QDesignerResource::~QDesignerResource() = default;
DomUI *QDesignerResource::readUi(QIODevice *dev)
{
diff --git a/src/designer/src/components/formeditor/qdesigner_resource.h b/src/designer/src/components/formeditor/qdesigner_resource.h
index 6368f9424..0df515355 100644
--- a/src/designer/src/components/formeditor/qdesigner_resource.h
+++ b/src/designer/src/components/formeditor/qdesigner_resource.h
@@ -63,7 +63,7 @@ class QT_FORMEDITOR_EXPORT QDesignerResource : public QEditorFormBuilder
{
public:
explicit QDesignerResource(FormWindow *fw);
- virtual ~QDesignerResource();
+ ~QDesignerResource() override;
void save(QIODevice *dev, QWidget *widget) override;
diff --git a/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.cpp b/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.cpp
index 351a00e8f..517bec0cf 100644
--- a/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.cpp
+++ b/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.cpp
@@ -45,9 +45,7 @@ QLayoutWidgetPropertySheet::QLayoutWidgetPropertySheet(QLayoutWidget *object, QO
clearFakeProperties();
}
-QLayoutWidgetPropertySheet::~QLayoutWidgetPropertySheet()
-{
-}
+QLayoutWidgetPropertySheet::~QLayoutWidgetPropertySheet() = default;
bool QLayoutWidgetPropertySheet::isVisible(int index) const
{
diff --git a/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h b/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h
index 1bc374cf7..b57e6a7cd 100644
--- a/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h
+++ b/src/designer/src/components/formeditor/qlayoutwidget_propertysheet.h
@@ -43,7 +43,7 @@ class QLayoutWidgetPropertySheet: public QDesignerPropertySheet
Q_INTERFACES(QDesignerPropertySheetExtension)
public:
explicit QLayoutWidgetPropertySheet(QLayoutWidget *object, QObject *parent = 0);
- virtual ~QLayoutWidgetPropertySheet();
+ ~QLayoutWidgetPropertySheet() override;
void setProperty(int index, const QVariant &value) override;
bool isVisible(int index) const override;
diff --git a/src/designer/src/components/formeditor/spacer_propertysheet.cpp b/src/designer/src/components/formeditor/spacer_propertysheet.cpp
index fb1bd8cb9..eed26383a 100644
--- a/src/designer/src/components/formeditor/spacer_propertysheet.cpp
+++ b/src/designer/src/components/formeditor/spacer_propertysheet.cpp
@@ -45,9 +45,7 @@ SpacerPropertySheet::SpacerPropertySheet(Spacer *object, QObject *parent)
clearFakeProperties();
}
-SpacerPropertySheet::~SpacerPropertySheet()
-{
-}
+SpacerPropertySheet::~SpacerPropertySheet() = default;
bool SpacerPropertySheet::isVisible(int index) const
{
diff --git a/src/designer/src/components/formeditor/spacer_propertysheet.h b/src/designer/src/components/formeditor/spacer_propertysheet.h
index 351fa1c38..8395df208 100644
--- a/src/designer/src/components/formeditor/spacer_propertysheet.h
+++ b/src/designer/src/components/formeditor/spacer_propertysheet.h
@@ -43,7 +43,7 @@ class SpacerPropertySheet: public QDesignerPropertySheet
Q_INTERFACES(QDesignerPropertySheetExtension)
public:
explicit SpacerPropertySheet(Spacer *object, QObject *parent = 0);
- virtual ~SpacerPropertySheet();
+ ~SpacerPropertySheet() override;
void setProperty(int index, const QVariant &value) override;
bool isVisible(int index) const override;
diff --git a/src/designer/src/components/formeditor/tool_widgeteditor.cpp b/src/designer/src/components/formeditor/tool_widgeteditor.cpp
index e65145381..0f41f74bf 100644
--- a/src/designer/src/components/formeditor/tool_widgeteditor.cpp
+++ b/src/designer/src/components/formeditor/tool_widgeteditor.cpp
@@ -61,9 +61,7 @@ QAction *WidgetEditorTool::action() const
return m_action;
}
-WidgetEditorTool::~WidgetEditorTool()
-{
-}
+WidgetEditorTool::~WidgetEditorTool() = default;
QDesignerFormEditorInterface *WidgetEditorTool::core() const
{
diff --git a/src/designer/src/components/formeditor/tool_widgeteditor.h b/src/designer/src/components/formeditor/tool_widgeteditor.h
index e93028d93..d2b3a1df4 100644
--- a/src/designer/src/components/formeditor/tool_widgeteditor.h
+++ b/src/designer/src/components/formeditor/tool_widgeteditor.h
@@ -49,7 +49,7 @@ class WidgetEditorTool: public QDesignerFormWindowToolInterface
Q_OBJECT
public:
explicit WidgetEditorTool(FormWindow *formWindow);
- virtual ~WidgetEditorTool();
+ ~WidgetEditorTool() override;
QDesignerFormEditorInterface *core() const override;
QDesignerFormWindowInterface *formWindow() const override;
diff --git a/src/designer/src/components/formeditor/widgetselection.h b/src/designer/src/components/formeditor/widgetselection.h
index b32d5afe7..eef2593b3 100644
--- a/src/designer/src/components/formeditor/widgetselection.h
+++ b/src/designer/src/components/formeditor/widgetselection.h
@@ -74,10 +74,10 @@ public:
QDesignerFormEditorInterface *core() const;
protected:
- void paintEvent(QPaintEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ void paintEvent(QPaintEvent *e) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
private:
void changeGridLayoutItemSpan();
diff --git a/src/designer/src/components/objectinspector/objectinspector.cpp b/src/designer/src/components/objectinspector/objectinspector.cpp
index d48035f56..4143629f3 100644
--- a/src/designer/src/components/objectinspector/objectinspector.cpp
+++ b/src/designer/src/components/objectinspector/objectinspector.cpp
@@ -186,6 +186,7 @@ void ObjectInspectorTreeView::keyPressEvent(QKeyEvent *event)
// ------------ ObjectInspectorPrivate
class ObjectInspector::ObjectInspectorPrivate {
+ Q_DISABLE_COPY(ObjectInspectorPrivate)
public:
ObjectInspectorPrivate(QDesignerFormEditorInterface *core);
~ObjectInspectorPrivate();
diff --git a/src/designer/src/components/objectinspector/objectinspector.h b/src/designer/src/components/objectinspector/objectinspector.h
index a5aa5220e..23406313f 100644
--- a/src/designer/src/components/objectinspector/objectinspector.h
+++ b/src/designer/src/components/objectinspector/objectinspector.h
@@ -46,7 +46,7 @@ class QT_OBJECTINSPECTOR_EXPORT ObjectInspector: public QDesignerObjectInspector
Q_OBJECT
public:
explicit ObjectInspector(QDesignerFormEditorInterface *core, QWidget *parent = 0);
- virtual ~ObjectInspector();
+ ~ObjectInspector() override;
QDesignerFormEditorInterface *core() const override;
diff --git a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
index c62424b19..9adbfe612 100644
--- a/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/brushpropertymanager.cpp
@@ -57,9 +57,7 @@ QT_BEGIN_NAMESPACE
namespace qdesigner_internal {
-BrushPropertyManager::BrushPropertyManager()
-{
-}
+BrushPropertyManager::BrushPropertyManager() = default;
int BrushPropertyManager::brushStyleToIndex(Qt::BrushStyle st)
{
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 98c308173..193209b3a 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -546,7 +546,7 @@ signals:
void themeChanged(const QString &theme);
protected:
- void contextMenuEvent(QContextMenuEvent *event);
+ void contextMenuEvent(QContextMenuEvent *event) override;
private slots:
void defaultActionActivated();
@@ -2212,9 +2212,7 @@ DesignerEditorFactory::DesignerEditorFactory(QDesignerFormEditorInterface *core,
this, &DesignerEditorFactory::resetProperty);
}
-DesignerEditorFactory::~DesignerEditorFactory()
-{
-}
+DesignerEditorFactory::~DesignerEditorFactory() = default;
void DesignerEditorFactory::setSpacing(int spacing)
{
diff --git a/src/designer/src/components/propertyeditor/paletteeditor.cpp b/src/designer/src/components/propertyeditor/paletteeditor.cpp
index 5fb1327cb..929ce1801 100644
--- a/src/designer/src/components/propertyeditor/paletteeditor.cpp
+++ b/src/designer/src/components/propertyeditor/paletteeditor.cpp
@@ -73,9 +73,7 @@ PaletteEditor::PaletteEditor(QDesignerFormEditorInterface *core, QWidget *parent
ui.paletteView->setColumnHidden(3, true);
}
-PaletteEditor::~PaletteEditor()
-{
-}
+PaletteEditor::~PaletteEditor() = default;
QPalette PaletteEditor::palette() const
{
diff --git a/src/designer/src/components/propertyeditor/paletteeditor.h b/src/designer/src/components/propertyeditor/paletteeditor.h
index fe171e94d..77785bc69 100644
--- a/src/designer/src/components/propertyeditor/paletteeditor.h
+++ b/src/designer/src/components/propertyeditor/paletteeditor.h
@@ -45,7 +45,7 @@ class PaletteEditor: public QDialog
{
Q_OBJECT
public:
- virtual ~PaletteEditor();
+ ~PaletteEditor() override;
static QPalette getPalette(QDesignerFormEditorInterface *core,
QWidget* parent, const QPalette &init = QPalette(),
diff --git a/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp b/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp
index f8bff2a2a..a31260d9f 100644
--- a/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp
+++ b/src/designer/src/components/propertyeditor/paletteeditorbutton.cpp
@@ -47,9 +47,7 @@ PaletteEditorButton::PaletteEditorButton(QDesignerFormEditorInterface *core, con
connect(this, &QAbstractButton::clicked, this, &PaletteEditorButton::showPaletteEditor);
}
-PaletteEditorButton::~PaletteEditorButton()
-{
-}
+PaletteEditorButton::~PaletteEditorButton() = default;
void PaletteEditorButton::setPalette(const QPalette &palette)
{
diff --git a/src/designer/src/components/propertyeditor/paletteeditorbutton.h b/src/designer/src/components/propertyeditor/paletteeditorbutton.h
index 3b7fa2f2c..64c461316 100644
--- a/src/designer/src/components/propertyeditor/paletteeditorbutton.h
+++ b/src/designer/src/components/propertyeditor/paletteeditorbutton.h
@@ -45,7 +45,7 @@ class QT_PROPERTYEDITOR_EXPORT PaletteEditorButton: public QToolButton
Q_OBJECT
public:
PaletteEditorButton(QDesignerFormEditorInterface *core, const QPalette &palette, QWidget *parent = 0);
- virtual ~PaletteEditorButton();
+ ~PaletteEditorButton() override;
void setSuperPalette(const QPalette &palette);
inline QPalette palette() const
diff --git a/src/designer/src/components/propertyeditor/previewframe.cpp b/src/designer/src/components/propertyeditor/previewframe.cpp
index 18b4a620e..c31ed4733 100644
--- a/src/designer/src/components/propertyeditor/previewframe.cpp
+++ b/src/designer/src/components/propertyeditor/previewframe.cpp
@@ -44,7 +44,7 @@ namespace qdesigner_internal {
public:
PreviewMdiArea(QWidget *parent = 0) : QMdiArea(parent) {}
protected:
- bool viewportEvent ( QEvent * event );
+ bool viewportEvent(QEvent *event) override;
};
bool PreviewMdiArea::viewportEvent (QEvent * event) {
diff --git a/src/designer/src/components/propertyeditor/previewwidget.cpp b/src/designer/src/components/propertyeditor/previewwidget.cpp
index 5b30d84f6..cc5a3af31 100644
--- a/src/designer/src/components/propertyeditor/previewwidget.cpp
+++ b/src/designer/src/components/propertyeditor/previewwidget.cpp
@@ -38,9 +38,7 @@ PreviewWidget::PreviewWidget(QWidget *parent)
ui.setupUi(this);
}
-PreviewWidget::~PreviewWidget()
-{
-}
+PreviewWidget::~PreviewWidget() = default;
QT_END_NAMESPACE
diff --git a/src/designer/src/components/propertyeditor/previewwidget.h b/src/designer/src/components/propertyeditor/previewwidget.h
index ce32317d0..36e5ef9fe 100644
--- a/src/designer/src/components/propertyeditor/previewwidget.h
+++ b/src/designer/src/components/propertyeditor/previewwidget.h
@@ -40,7 +40,7 @@ class PreviewWidget: public QWidget
Q_OBJECT
public:
explicit PreviewWidget(QWidget *parent);
- virtual ~PreviewWidget();
+ ~PreviewWidget() override;
private:
Ui::PreviewWidget ui;
diff --git a/src/designer/src/components/propertyeditor/propertyeditor.cpp b/src/designer/src/components/propertyeditor/propertyeditor.cpp
index 02b72f308..ed1ae80c3 100644
--- a/src/designer/src/components/propertyeditor/propertyeditor.cpp
+++ b/src/designer/src/components/propertyeditor/propertyeditor.cpp
@@ -90,14 +90,10 @@ namespace qdesigner_internal {
class ElidingLabel : public QWidget
{
public:
- ElidingLabel(const QString &text = QString(), QWidget *parent = 0)
- : QWidget(parent),
- m_text(text),
- m_mode(Qt::ElideRight) {
- setContentsMargins(3, 2, 3, 2);
- }
- QSize sizeHint() const;
- void paintEvent(QPaintEvent *e);
+ explicit ElidingLabel(const QString &text = QString(),
+ QWidget *parent = nullptr) : QWidget(parent), m_text(text)
+ { setContentsMargins(3, 2, 3, 2); }
+
void setText(const QString &text) {
m_text = text;
updateGeometry();
@@ -106,9 +102,14 @@ public:
m_mode = mode;
updateGeometry();
}
+
+protected:
+ QSize sizeHint() const override;
+ void paintEvent(QPaintEvent *e) override;
+
private:
QString m_text;
- Qt::TextElideMode m_mode;
+ Qt::TextElideMode m_mode = Qt::ElideRight;
};
QSize ElidingLabel::sizeHint() const
diff --git a/src/designer/src/components/propertyeditor/propertyeditor.h b/src/designer/src/components/propertyeditor/propertyeditor.h
index 8c8d9688b..819e65108 100644
--- a/src/designer/src/components/propertyeditor/propertyeditor.h
+++ b/src/designer/src/components/propertyeditor/propertyeditor.h
@@ -64,7 +64,7 @@ class QT_PROPERTYEDITOR_EXPORT PropertyEditor: public QDesignerPropertyEditor
Q_OBJECT
public:
explicit PropertyEditor(QDesignerFormEditorInterface *core, QWidget *parent = 0, Qt::WindowFlags flags = 0);
- virtual ~PropertyEditor();
+ ~PropertyEditor() override;
QDesignerFormEditorInterface *core() const override;
diff --git a/src/designer/src/components/propertyeditor/qlonglongvalidator.cpp b/src/designer/src/components/propertyeditor/qlonglongvalidator.cpp
index a0e8c9c6d..1a9c1c8aa 100644
--- a/src/designer/src/components/propertyeditor/qlonglongvalidator.cpp
+++ b/src/designer/src/components/propertyeditor/qlonglongvalidator.cpp
@@ -45,10 +45,7 @@ QLongLongValidator::QLongLongValidator(qlonglong minimum, qlonglong maximum,
{
}
-QLongLongValidator::~QLongLongValidator()
-{
- // nothing
-}
+QLongLongValidator::~QLongLongValidator() = default;
QValidator::State QLongLongValidator::validate(QString & input, int &) const
{
@@ -100,10 +97,7 @@ QULongLongValidator::QULongLongValidator(qulonglong minimum, qulonglong maximum,
{
}
-QULongLongValidator::~QULongLongValidator()
-{
- // nothing
-}
+QULongLongValidator::~QULongLongValidator() = default;
QValidator::State QULongLongValidator::validate(QString & input, int &) const
{
diff --git a/src/designer/src/components/propertyeditor/stringlisteditorbutton.cpp b/src/designer/src/components/propertyeditor/stringlisteditorbutton.cpp
index 844560ad5..29487f119 100644
--- a/src/designer/src/components/propertyeditor/stringlisteditorbutton.cpp
+++ b/src/designer/src/components/propertyeditor/stringlisteditorbutton.cpp
@@ -46,9 +46,7 @@ StringListEditorButton::StringListEditorButton(
connect(this, &QAbstractButton::clicked, this, &StringListEditorButton::showStringListEditor);
}
-StringListEditorButton::~StringListEditorButton()
-{
-}
+StringListEditorButton::~StringListEditorButton() = default;
void StringListEditorButton::setStringList(const QStringList &stringList)
{
diff --git a/src/designer/src/components/propertyeditor/stringlisteditorbutton.h b/src/designer/src/components/propertyeditor/stringlisteditorbutton.h
index 072b123ca..4a823b726 100644
--- a/src/designer/src/components/propertyeditor/stringlisteditorbutton.h
+++ b/src/designer/src/components/propertyeditor/stringlisteditorbutton.h
@@ -43,7 +43,7 @@ class QT_PROPERTYEDITOR_EXPORT StringListEditorButton: public QToolButton
Q_OBJECT
public:
explicit StringListEditorButton(const QStringList &stringList, QWidget *parent = 0);
- virtual ~StringListEditorButton();
+ ~StringListEditorButton() override;
inline QStringList stringList() const
{ return m_stringList; }
diff --git a/src/designer/src/components/signalsloteditor/signalslot_utils.cpp b/src/designer/src/components/signalsloteditor/signalslot_utils.cpp
index df3072db2..6c19a756e 100644
--- a/src/designer/src/components/signalsloteditor/signalslot_utils.cpp
+++ b/src/designer/src/components/signalsloteditor/signalslot_utils.cpp
@@ -167,7 +167,7 @@ namespace {
ReverseClassesMemberIterator &operator*() { return *this; }
ReverseClassesMemberIterator &operator++() { return *this; }
- void operator=(const ClassNameSignaturePair &classNameSignature);
+ ReverseClassesMemberIterator &operator=(const ClassNameSignaturePair &classNameSignature);
private:
qdesigner_internal::ClassesMemberFunctions *m_result;
@@ -181,7 +181,7 @@ namespace {
{
}
- void ReverseClassesMemberIterator::operator=(const ClassNameSignaturePair &classNameSignature)
+ ReverseClassesMemberIterator &ReverseClassesMemberIterator::operator=(const ClassNameSignaturePair &classNameSignature)
{
// prepend a new entry if class changes
if (!m_memberList || classNameSignature.first != m_lastClassName) {
@@ -190,6 +190,7 @@ namespace {
m_memberList = &(m_result->front().m_memberList);
}
m_memberList->push_back(classNameSignature.second);
+ return *this;
}
// Output iterator for a pair of pair of <classname, signature>
@@ -200,8 +201,10 @@ namespace {
SignatureIterator &operator*() { return *this; }
SignatureIterator &operator++() { return *this; }
- void operator=(const ClassNameSignaturePair &classNameSignature) {
+ SignatureIterator &operator=(const ClassNameSignaturePair &classNameSignature)
+ {
m_result->insert(classNameSignature.second, classNameSignature.first);
+ return *this;
}
private:
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_p.h b/src/designer/src/components/signalsloteditor/signalsloteditor_p.h
index 6b4a89798..b2274a8dd 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditor_p.h
+++ b/src/designer/src/components/signalsloteditor/signalsloteditor_p.h
@@ -73,7 +73,7 @@ public:
DomConnection *toUi() const;
- virtual void updateVisibility();
+ void updateVisibility() override;
enum State { Valid, ObjectDeleted, InvalidMethod, NotAncestor };
State isValid(const QWidget *background) const;
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp b/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp
index fbc92e72f..eb78db640 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp
+++ b/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.cpp
@@ -43,9 +43,7 @@ SignalSlotEditorPlugin::SignalSlotEditorPlugin()
{
}
-SignalSlotEditorPlugin::~SignalSlotEditorPlugin()
-{
-}
+SignalSlotEditorPlugin::~SignalSlotEditorPlugin() = default;
bool SignalSlotEditorPlugin::isInitialized() const
{
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h b/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h
index ddb3d4344..4b27b5102 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h
+++ b/src/designer/src/components/signalsloteditor/signalsloteditor_plugin.h
@@ -51,7 +51,7 @@ class QT_SIGNALSLOTEDITOR_EXPORT SignalSlotEditorPlugin: public QObject, public
Q_INTERFACES(QDesignerFormEditorPluginInterface)
public:
SignalSlotEditorPlugin();
- virtual ~SignalSlotEditorPlugin();
+ ~SignalSlotEditorPlugin() override;
bool isInitialized() const override;
void initialize(QDesignerFormEditorInterface *core) override;
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp b/src/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp
index e030f8199..29f00a453 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp
+++ b/src/designer/src/components/signalsloteditor/signalsloteditor_tool.cpp
@@ -46,9 +46,7 @@ SignalSlotEditorTool::SignalSlotEditorTool(QDesignerFormWindowInterface *formWin
{
}
-SignalSlotEditorTool::~SignalSlotEditorTool()
-{
-}
+SignalSlotEditorTool::~SignalSlotEditorTool() = default;
QDesignerFormEditorInterface *SignalSlotEditorTool::core() const
{
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h b/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h
index 264143bde..c0ba92316 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h
+++ b/src/designer/src/components/signalsloteditor/signalsloteditor_tool.h
@@ -50,7 +50,7 @@ class QT_SIGNALSLOTEDITOR_EXPORT SignalSlotEditorTool: public QDesignerFormWindo
Q_OBJECT
public:
explicit SignalSlotEditorTool(QDesignerFormWindowInterface *formWindow, QObject *parent = 0);
- virtual ~SignalSlotEditorTool();
+ ~SignalSlotEditorTool() override;
QDesignerFormEditorInterface *core() const override;
QDesignerFormWindowInterface *formWindow() const override;
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index 86410d19b..41c539141 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -574,9 +574,9 @@ public:
void setForm(QDesignerFormWindowInterface *form);
- virtual QWidget *createEditor(QWidget *parent,
- const QStyleOptionViewItem &option,
- const QModelIndex &index) const;
+ QWidget *createEditor(QWidget *parent,
+ const QStyleOptionViewItem &option,
+ const QModelIndex &index) const override;
private slots:
void emitCommitData();
diff --git a/src/designer/src/components/tabordereditor/tabordereditor_plugin.h b/src/designer/src/components/tabordereditor/tabordereditor_plugin.h
index e31a89266..9322a4480 100644
--- a/src/designer/src/components/tabordereditor/tabordereditor_plugin.h
+++ b/src/designer/src/components/tabordereditor/tabordereditor_plugin.h
@@ -52,7 +52,7 @@ class QT_TABORDEREDITOR_EXPORT TabOrderEditorPlugin: public QObject, public QDes
Q_INTERFACES(QDesignerFormEditorPluginInterface)
public:
TabOrderEditorPlugin();
- virtual ~TabOrderEditorPlugin();
+ ~TabOrderEditorPlugin() override;
bool isInitialized() const override;
void initialize(QDesignerFormEditorInterface *core) override;
diff --git a/src/designer/src/components/tabordereditor/tabordereditor_tool.cpp b/src/designer/src/components/tabordereditor/tabordereditor_tool.cpp
index e803ada28..7a5489c0c 100644
--- a/src/designer/src/components/tabordereditor/tabordereditor_tool.cpp
+++ b/src/designer/src/components/tabordereditor/tabordereditor_tool.cpp
@@ -45,9 +45,7 @@ TabOrderEditorTool::TabOrderEditorTool(QDesignerFormWindowInterface *formWindow,
{
}
-TabOrderEditorTool::~TabOrderEditorTool()
-{
-}
+TabOrderEditorTool::~TabOrderEditorTool() = default;
QDesignerFormEditorInterface *TabOrderEditorTool::core() const
{
diff --git a/src/designer/src/components/tabordereditor/tabordereditor_tool.h b/src/designer/src/components/tabordereditor/tabordereditor_tool.h
index 8e7fe6d08..43b41feaf 100644
--- a/src/designer/src/components/tabordereditor/tabordereditor_tool.h
+++ b/src/designer/src/components/tabordereditor/tabordereditor_tool.h
@@ -50,7 +50,7 @@ class QT_TABORDEREDITOR_EXPORT TabOrderEditorTool: public QDesignerFormWindowToo
Q_OBJECT
public:
explicit TabOrderEditorTool(QDesignerFormWindowInterface *formWindow, QObject *parent = 0);
- virtual ~TabOrderEditorTool();
+ ~TabOrderEditorTool() override;
QDesignerFormEditorInterface *core() const override;
QDesignerFormWindowInterface *formWindow() const override;
diff --git a/src/designer/src/components/taskmenu/button_taskmenu.cpp b/src/designer/src/components/taskmenu/button_taskmenu.cpp
index ab0243e63..899c1c474 100644
--- a/src/designer/src/components/taskmenu/button_taskmenu.cpp
+++ b/src/designer/src/components/taskmenu/button_taskmenu.cpp
@@ -200,8 +200,8 @@ public:
CreateButtonGroupCommand(QDesignerFormWindowInterface *formWindow);
bool init(const ButtonList &bl);
- virtual void undo() { breakButtonGroup(); }
- virtual void redo() { createButtonGroup(); }
+ void undo() override { breakButtonGroup(); }
+ void redo() override { createButtonGroup(); }
};
CreateButtonGroupCommand::CreateButtonGroupCommand(QDesignerFormWindowInterface *formWindow) :
@@ -227,8 +227,8 @@ public:
BreakButtonGroupCommand(QDesignerFormWindowInterface *formWindow);
bool init(QButtonGroup *group);
- virtual void undo() { createButtonGroup(); }
- virtual void redo() { breakButtonGroup(); }
+ void undo() override { createButtonGroup(); }
+ void redo() override { breakButtonGroup(); }
};
BreakButtonGroupCommand::BreakButtonGroupCommand(QDesignerFormWindowInterface *formWindow) :
@@ -253,8 +253,8 @@ public:
AddButtonsToGroupCommand(QDesignerFormWindowInterface *formWindow);
void init(const ButtonList &bl, QButtonGroup *group);
- virtual void undo() { removeButtonsFromGroup(); }
- virtual void redo() { addButtonsToGroup(); }
+ void undo() override { removeButtonsFromGroup(); }
+ void redo() override { addButtonsToGroup(); }
};
AddButtonsToGroupCommand::AddButtonsToGroupCommand(QDesignerFormWindowInterface *formWindow) :
@@ -275,8 +275,8 @@ public:
RemoveButtonsFromGroupCommand(QDesignerFormWindowInterface *formWindow);
bool init(const ButtonList &bl);
- virtual void undo() { addButtonsToGroup(); }
- virtual void redo() { removeButtonsFromGroup(); }
+ void undo() override { addButtonsToGroup(); }
+ void redo() override { removeButtonsFromGroup(); }
};
RemoveButtonsFromGroupCommand::RemoveButtonsFromGroupCommand(QDesignerFormWindowInterface *formWindow) :
diff --git a/src/designer/src/components/taskmenu/button_taskmenu.h b/src/designer/src/components/taskmenu/button_taskmenu.h
index 8f37439b9..f15e6b0e3 100644
--- a/src/designer/src/components/taskmenu/button_taskmenu.h
+++ b/src/designer/src/components/taskmenu/button_taskmenu.h
@@ -99,7 +99,7 @@ class ButtonTaskMenu: public QDesignerTaskMenu
Q_DISABLE_COPY(ButtonTaskMenu)
public:
explicit ButtonTaskMenu(QAbstractButton *button, QObject *parent = 0);
- virtual ~ButtonTaskMenu();
+ ~ButtonTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/taskmenu/combobox_taskmenu.cpp b/src/designer/src/components/taskmenu/combobox_taskmenu.cpp
index c9b6b0e4e..89b180a65 100644
--- a/src/designer/src/components/taskmenu/combobox_taskmenu.cpp
+++ b/src/designer/src/components/taskmenu/combobox_taskmenu.cpp
@@ -61,9 +61,7 @@ ComboBoxTaskMenu::ComboBoxTaskMenu(QComboBox *button, QObject *parent)
m_taskActions.append(sep);
}
-ComboBoxTaskMenu::~ComboBoxTaskMenu()
-{
-}
+ComboBoxTaskMenu::~ComboBoxTaskMenu() = default;
QAction *ComboBoxTaskMenu::preferredEditAction() const
{
diff --git a/src/designer/src/components/taskmenu/combobox_taskmenu.h b/src/designer/src/components/taskmenu/combobox_taskmenu.h
index e84cfa995..b8eefd5ef 100644
--- a/src/designer/src/components/taskmenu/combobox_taskmenu.h
+++ b/src/designer/src/components/taskmenu/combobox_taskmenu.h
@@ -48,7 +48,7 @@ class ComboBoxTaskMenu: public QDesignerTaskMenu
public:
explicit ComboBoxTaskMenu(QComboBox *button,
QObject *parent = 0);
- virtual ~ComboBoxTaskMenu();
+ ~ComboBoxTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp b/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp
index f01c76f83..b5ba82e0e 100644
--- a/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp
+++ b/src/designer/src/components/taskmenu/containerwidget_taskmenu.cpp
@@ -109,9 +109,7 @@ ContainerWidgetTaskMenu::ContainerWidgetTaskMenu(QWidget *widget, ContainerType
}
}
-ContainerWidgetTaskMenu::~ContainerWidgetTaskMenu()
-{
-}
+ContainerWidgetTaskMenu::~ContainerWidgetTaskMenu() = default;
QAction *ContainerWidgetTaskMenu::preferredEditAction() const
{
diff --git a/src/designer/src/components/taskmenu/containerwidget_taskmenu.h b/src/designer/src/components/taskmenu/containerwidget_taskmenu.h
index be4720319..7074137d1 100644
--- a/src/designer/src/components/taskmenu/containerwidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/containerwidget_taskmenu.h
@@ -57,7 +57,7 @@ class ContainerWidgetTaskMenu: public QDesignerTaskMenu
Q_OBJECT
public:
explicit ContainerWidgetTaskMenu(QWidget *widget, ContainerType type, QObject *parent = 0);
- virtual ~ContainerWidgetTaskMenu();
+ ~ContainerWidgetTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/taskmenu/inplace_widget_helper.h b/src/designer/src/components/taskmenu/inplace_widget_helper.h
index a6bb5a36f..f74d39830 100644
--- a/src/designer/src/components/taskmenu/inplace_widget_helper.h
+++ b/src/designer/src/components/taskmenu/inplace_widget_helper.h
@@ -55,7 +55,7 @@ namespace qdesigner_internal {
Q_OBJECT
public:
InPlaceWidgetHelper(QWidget *editorWidget, QWidget *parentWidget, QDesignerFormWindowInterface *fw);
- virtual ~InPlaceWidgetHelper();
+ ~InPlaceWidgetHelper() override;
bool eventFilter(QObject *object, QEvent *event) override;
diff --git a/src/designer/src/components/taskmenu/itemlisteditor.cpp b/src/designer/src/components/taskmenu/itemlisteditor.cpp
index 3d9dc0f29..94ec1e1cc 100644
--- a/src/designer/src/components/taskmenu/itemlisteditor.cpp
+++ b/src/designer/src/components/taskmenu/itemlisteditor.cpp
@@ -56,7 +56,7 @@ public:
m_width += fontMetrics().width(QStringLiteral("/this/is/some/random/path"));
}
- virtual QSize sizeHint() const
+ QSize sizeHint() const override
{
return QSize(m_width, 1);
}
diff --git a/src/designer/src/components/taskmenu/listwidget_taskmenu.h b/src/designer/src/components/taskmenu/listwidget_taskmenu.h
index dc19840ef..6e853673f 100644
--- a/src/designer/src/components/taskmenu/listwidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/listwidget_taskmenu.h
@@ -47,7 +47,7 @@ class ListWidgetTaskMenu: public QDesignerTaskMenu
Q_OBJECT
public:
explicit ListWidgetTaskMenu(QListWidget *button, QObject *parent = 0);
- virtual ~ListWidgetTaskMenu();
+ ~ListWidgetTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/taskmenu/tablewidget_taskmenu.h b/src/designer/src/components/taskmenu/tablewidget_taskmenu.h
index 9d892391c..636ab4f0d 100644
--- a/src/designer/src/components/taskmenu/tablewidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/tablewidget_taskmenu.h
@@ -47,7 +47,7 @@ class TableWidgetTaskMenu: public QDesignerTaskMenu
Q_OBJECT
public:
explicit TableWidgetTaskMenu(QTableWidget *button, QObject *parent = 0);
- virtual ~TableWidgetTaskMenu();
+ ~TableWidgetTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/taskmenu/taskmenu_component.cpp b/src/designer/src/components/taskmenu/taskmenu_component.cpp
index b67d4d196..5cd4e3030 100644
--- a/src/designer/src/components/taskmenu/taskmenu_component.cpp
+++ b/src/designer/src/components/taskmenu/taskmenu_component.cpp
@@ -80,9 +80,7 @@ TaskMenuComponent::TaskMenuComponent(QDesignerFormEditorInterface *core, QObject
mgr->registerExtensions(new ComboBoxTaskMenuFactory(taskMenuId, mgr), taskMenuId);
}
-TaskMenuComponent::~TaskMenuComponent()
-{
-}
+TaskMenuComponent::~TaskMenuComponent() = default;
QDesignerFormEditorInterface *TaskMenuComponent::core() const
{
diff --git a/src/designer/src/components/taskmenu/taskmenu_component.h b/src/designer/src/components/taskmenu/taskmenu_component.h
index b4bf2ee15..adc794cb9 100644
--- a/src/designer/src/components/taskmenu/taskmenu_component.h
+++ b/src/designer/src/components/taskmenu/taskmenu_component.h
@@ -45,7 +45,7 @@ class QT_TASKMENU_EXPORT TaskMenuComponent: public QObject
Q_OBJECT
public:
explicit TaskMenuComponent(QDesignerFormEditorInterface *core, QObject *parent = 0);
- virtual ~TaskMenuComponent();
+ ~TaskMenuComponent() override;
QDesignerFormEditorInterface *core() const;
diff --git a/src/designer/src/components/taskmenu/textedit_taskmenu.cpp b/src/designer/src/components/taskmenu/textedit_taskmenu.cpp
index 6b233e80c..ca5d5d526 100644
--- a/src/designer/src/components/taskmenu/textedit_taskmenu.cpp
+++ b/src/designer/src/components/taskmenu/textedit_taskmenu.cpp
@@ -69,9 +69,7 @@ void TextEditTaskMenu::initialize()
m_taskActions.append(sep);
}
-TextEditTaskMenu::~TextEditTaskMenu()
-{
-}
+TextEditTaskMenu::~TextEditTaskMenu() = default;
QAction *TextEditTaskMenu::preferredEditAction() const
{
diff --git a/src/designer/src/components/taskmenu/textedit_taskmenu.h b/src/designer/src/components/taskmenu/textedit_taskmenu.h
index 498cd6b9e..98b9402d6 100644
--- a/src/designer/src/components/taskmenu/textedit_taskmenu.h
+++ b/src/designer/src/components/taskmenu/textedit_taskmenu.h
@@ -48,7 +48,7 @@ public:
explicit TextEditTaskMenu(QTextEdit *button, QObject *parent = 0);
explicit TextEditTaskMenu(QPlainTextEdit *button, QObject *parent = 0);
- virtual ~TextEditTaskMenu();
+ ~TextEditTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/taskmenu/treewidget_taskmenu.h b/src/designer/src/components/taskmenu/treewidget_taskmenu.h
index ab7548e5c..3622f420e 100644
--- a/src/designer/src/components/taskmenu/treewidget_taskmenu.h
+++ b/src/designer/src/components/taskmenu/treewidget_taskmenu.h
@@ -47,7 +47,7 @@ class TreeWidgetTaskMenu: public QDesignerTaskMenu
Q_OBJECT
public:
explicit TreeWidgetTaskMenu(QTreeWidget *button, QObject *parent = 0);
- virtual ~TreeWidgetTaskMenu();
+ ~TreeWidgetTaskMenu() override;
QAction *preferredEditAction() const override;
QList<QAction*> taskActions() const override;
diff --git a/src/designer/src/components/widgetbox/widgetbox.cpp b/src/designer/src/components/widgetbox/widgetbox.cpp
index a2c67ece1..38452f9dc 100644
--- a/src/designer/src/components/widgetbox/widgetbox.cpp
+++ b/src/designer/src/components/widgetbox/widgetbox.cpp
@@ -117,9 +117,7 @@ WidgetBox::WidgetBox(QDesignerFormEditorInterface *core, QWidget *parent, Qt::Wi
setAcceptDrops (true);
}
-WidgetBox::~WidgetBox()
-{
-}
+WidgetBox::~WidgetBox() = default;
QDesignerFormEditorInterface *WidgetBox::core() const
{
diff --git a/src/designer/src/components/widgetbox/widgetbox.h b/src/designer/src/components/widgetbox/widgetbox.h
index a17eebd2f..a9389e154 100644
--- a/src/designer/src/components/widgetbox/widgetbox.h
+++ b/src/designer/src/components/widgetbox/widgetbox.h
@@ -46,7 +46,7 @@ class QT_WIDGETBOX_EXPORT WidgetBox : public QDesignerWidgetBox
Q_OBJECT
public:
explicit WidgetBox(QDesignerFormEditorInterface *core, QWidget *parent = 0, Qt::WindowFlags flags = 0);
- virtual ~WidgetBox();
+ ~WidgetBox() override;
QDesignerFormEditorInterface *core() const;
diff --git a/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp b/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
index 87b48b340..e27c82d63 100644
--- a/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
+++ b/src/designer/src/components/widgetbox/widgetboxcategorylistview.cpp
@@ -339,7 +339,7 @@ public:
explicit WidgetBoxCategoryEntryDelegate(QWidget *parent = 0) : QItemDelegate(parent) {}
QWidget *createEditor(QWidget *parent,
const QStyleOptionViewItem &option,
- const QModelIndex &index) const;
+ const QModelIndex &index) const override;
};
QWidget *WidgetBoxCategoryEntryDelegate::createEditor(QWidget *parent,
diff --git a/src/designer/src/designer/newform.h b/src/designer/src/designer/newform.h
index 6d38ffa8e..50b30cbcd 100644
--- a/src/designer/src/designer/newform.h
+++ b/src/designer/src/designer/newform.h
@@ -59,7 +59,7 @@ public:
// Use that file name instead of a temporary one
const QString &fileName = QString());
- virtual ~NewForm();
+ ~NewForm() override;
// Convenience for implementing file dialogs with preview
static QImage grabForm(QDesignerFormEditorInterface *core,
diff --git a/src/designer/src/designer/qdesigner.h b/src/designer/src/designer/qdesigner.h
index 908010727..258e1e5ff 100644
--- a/src/designer/src/designer/qdesigner.h
+++ b/src/designer/src/designer/qdesigner.h
@@ -57,7 +57,7 @@ public:
};
QDesigner(int &argc, char **argv);
- virtual ~QDesigner();
+ ~QDesigner() override;
ParseArgumentsResult parseCommandLineArguments();
diff --git a/src/designer/src/designer/qdesigner_actions.h b/src/designer/src/designer/qdesigner_actions.h
index 7fc0d260c..0daad568f 100644
--- a/src/designer/src/designer/qdesigner_actions.h
+++ b/src/designer/src/designer/qdesigner_actions.h
@@ -65,7 +65,7 @@ class QDesignerActions: public QObject
Q_OBJECT
public:
explicit QDesignerActions(QDesignerWorkbench *mainWindow);
- virtual ~QDesignerActions();
+ ~QDesignerActions() override;
QDesignerWorkbench *workbench() const;
QDesignerFormEditorInterface *core() const;
diff --git a/src/designer/src/designer/qdesigner_appearanceoptions.h b/src/designer/src/designer/qdesigner_appearanceoptions.h
index 14ea0d8e1..04f5ec3cf 100644
--- a/src/designer/src/designer/qdesigner_appearanceoptions.h
+++ b/src/designer/src/designer/qdesigner_appearanceoptions.h
@@ -100,10 +100,10 @@ class QDesignerAppearanceOptionsPage : public QObject, public QDesignerOptionsPa
public:
QDesignerAppearanceOptionsPage(QDesignerFormEditorInterface *core);
- QString name() const;
- QWidget *createPage(QWidget *parent);
- virtual void apply();
- virtual void finish();
+ QString name() const override;
+ QWidget *createPage(QWidget *parent) override;
+ void apply() override;
+ void finish() override;
signals:
void settingsChanged();
diff --git a/src/designer/src/designer/qdesigner_formwindow.h b/src/designer/src/designer/qdesigner_formwindow.h
index f1525ab0d..e5dfb13b7 100644
--- a/src/designer/src/designer/qdesigner_formwindow.h
+++ b/src/designer/src/designer/qdesigner_formwindow.h
@@ -46,7 +46,7 @@ public:
void firstShow();
- virtual ~QDesignerFormWindow();
+ ~QDesignerFormWindow() override;
QAction *action() const;
QDesignerWorkbench *workbench() const;
diff --git a/src/designer/src/designer/qdesigner_server.cpp b/src/designer/src/designer/qdesigner_server.cpp
index dc1098e8f..42026a5f0 100644
--- a/src/designer/src/designer/qdesigner_server.cpp
+++ b/src/designer/src/designer/qdesigner_server.cpp
@@ -53,9 +53,7 @@ QDesignerServer::QDesignerServer(QObject *parent)
}
}
-QDesignerServer::~QDesignerServer()
-{
-}
+QDesignerServer::~QDesignerServer() = default;
quint16 QDesignerServer::serverPort() const
{
diff --git a/src/designer/src/designer/qdesigner_server.h b/src/designer/src/designer/qdesigner_server.h
index 8c1649c94..2ad451b50 100644
--- a/src/designer/src/designer/qdesigner_server.h
+++ b/src/designer/src/designer/qdesigner_server.h
@@ -41,7 +41,7 @@ class QDesignerServer: public QObject
Q_OBJECT
public:
explicit QDesignerServer(QObject *parent = 0);
- virtual ~QDesignerServer();
+ ~QDesignerServer() override;
quint16 serverPort() const;
@@ -62,7 +62,7 @@ class QDesignerClient: public QObject
Q_OBJECT
public:
explicit QDesignerClient(quint16 port, QObject *parent = 0);
- virtual ~QDesignerClient();
+ ~QDesignerClient() override;
private slots:
void readFromSocket();
diff --git a/src/designer/src/designer/qdesigner_workbench.h b/src/designer/src/designer/qdesigner_workbench.h
index c5b4d8497..826611a95 100644
--- a/src/designer/src/designer/qdesigner_workbench.h
+++ b/src/designer/src/designer/qdesigner_workbench.h
@@ -70,7 +70,7 @@ class QDesignerWorkbench: public QObject
public:
QDesignerWorkbench();
- virtual ~QDesignerWorkbench();
+ ~QDesignerWorkbench() override;
UIMode mode() const;
diff --git a/src/designer/src/designer/saveformastemplate.cpp b/src/designer/src/designer/saveformastemplate.cpp
index aad8603e1..e83ca48c2 100644
--- a/src/designer/src/designer/saveformastemplate.cpp
+++ b/src/designer/src/designer/saveformastemplate.cpp
@@ -66,9 +66,7 @@ SaveFormAsTemplate::SaveFormAsTemplate(QDesignerFormEditorInterface *core,
this, &SaveFormAsTemplate::checkToAddPath);
}
-SaveFormAsTemplate::~SaveFormAsTemplate()
-{
-}
+SaveFormAsTemplate::~SaveFormAsTemplate() = default;
void SaveFormAsTemplate::accept()
{
diff --git a/src/designer/src/designer/saveformastemplate.h b/src/designer/src/designer/saveformastemplate.h
index 382ac6e19..14bf4ecfa 100644
--- a/src/designer/src/designer/saveformastemplate.h
+++ b/src/designer/src/designer/saveformastemplate.h
@@ -43,10 +43,10 @@ public:
explicit SaveFormAsTemplate(QDesignerFormEditorInterface *m_core,
QDesignerFormWindowInterface *formWindow,
QWidget *parent = 0);
- virtual ~SaveFormAsTemplate();
+ ~SaveFormAsTemplate() override;
private slots:
- void accept();
+ void accept() override;
void updateOKButton(const QString &str);
void checkToAddPath(int itemIndex);
diff --git a/src/designer/src/lib/shared/actioneditor.cpp b/src/designer/src/lib/shared/actioneditor.cpp
index 64e337c5f..7c1062c91 100644
--- a/src/designer/src/lib/shared/actioneditor.cpp
+++ b/src/designer/src/lib/shared/actioneditor.cpp
@@ -89,7 +89,7 @@ public:
ActionGroupDelegate(QObject *parent)
: QItemDelegate(parent) {}
- virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+ void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
{
if (option.state & QStyle::State_Selected)
painter->fillRect(option.rect, option.palette.highlight());
@@ -97,7 +97,7 @@ public:
QItemDelegate::paint(painter, option, index);
}
- virtual void drawFocus(QPainter * /*painter*/, const QStyleOptionViewItem &/*option*/, const QRect &/*rect*/) const {}
+ void drawFocus(QPainter *, const QStyleOptionViewItem &, const QRect &) const override {}
};
//-------- ActionEditor
diff --git a/src/designer/src/lib/shared/actioneditor_p.h b/src/designer/src/lib/shared/actioneditor_p.h
index 5de16da63..e651ab52b 100644
--- a/src/designer/src/lib/shared/actioneditor_p.h
+++ b/src/designer/src/lib/shared/actioneditor_p.h
@@ -68,7 +68,7 @@ class QDESIGNER_SHARED_EXPORT ActionEditor: public QDesignerActionEditorInterfac
Q_OBJECT
public:
explicit ActionEditor(QDesignerFormEditorInterface *core, QWidget *parent = 0, Qt::WindowFlags flags = 0);
- virtual ~ActionEditor();
+ ~ActionEditor() override;
QDesignerFormWindowInterface *formWindow() const;
void setFormWindow(QDesignerFormWindowInterface *formWindow) override;
diff --git a/src/designer/src/lib/shared/actionprovider_p.h b/src/designer/src/lib/shared/actionprovider_p.h
index e463af396..085162a8e 100644
--- a/src/designer/src/lib/shared/actionprovider_p.h
+++ b/src/designer/src/lib/shared/actionprovider_p.h
@@ -52,7 +52,7 @@ class QAction;
class QDesignerActionProviderExtension
{
public:
- virtual ~QDesignerActionProviderExtension() {}
+ virtual ~QDesignerActionProviderExtension() = default;
virtual QRect actionGeometry(QAction *action) const = 0;
virtual QAction *actionAt(const QPoint &pos) const = 0;
diff --git a/src/designer/src/lib/shared/codedialog_p.h b/src/designer/src/lib/shared/codedialog_p.h
index 1e2811f95..1707a034b 100644
--- a/src/designer/src/lib/shared/codedialog_p.h
+++ b/src/designer/src/lib/shared/codedialog_p.h
@@ -54,7 +54,7 @@ class QDESIGNER_SHARED_EXPORT CodeDialog : public QDialog
Q_OBJECT
explicit CodeDialog(QWidget *parent = 0);
public:
- virtual ~CodeDialog();
+ ~CodeDialog() override;
static bool generateCode(const QDesignerFormWindowInterface *fw,
QString *code,
diff --git a/src/designer/src/lib/shared/connectionedit_p.h b/src/designer/src/lib/shared/connectionedit_p.h
index 8de320b4a..a3f1b8bf4 100644
--- a/src/designer/src/lib/shared/connectionedit_p.h
+++ b/src/designer/src/lib/shared/connectionedit_p.h
@@ -89,7 +89,7 @@ class QDESIGNER_SHARED_EXPORT Connection : public CETypes
public:
explicit Connection(ConnectionEdit *edit);
explicit Connection(ConnectionEdit *edit, QObject *source, QObject *target);
- virtual ~Connection() {}
+ virtual ~Connection() = default;
QObject *object(EndPoint::Type type) const
{
@@ -155,7 +155,7 @@ class QDESIGNER_SHARED_EXPORT ConnectionEdit : public QWidget, public CETypes
Q_OBJECT
public:
ConnectionEdit(QWidget *parent, QDesignerFormWindowInterface *form);
- virtual ~ConnectionEdit();
+ ~ConnectionEdit() override;
inline const QPointer<QWidget> &background() const { return m_bg_widget; }
@@ -276,7 +276,7 @@ public:
explicit CECommand(ConnectionEdit *edit)
: m_edit(edit) {}
- virtual bool mergeWith(const QUndoCommand *) { return false; }
+ bool mergeWith(const QUndoCommand *) override { return false; }
ConnectionEdit *edit() const { return m_edit; }
diff --git a/src/designer/src/lib/shared/deviceprofile.cpp b/src/designer/src/lib/shared/deviceprofile.cpp
index eba349bb4..07655980b 100644
--- a/src/designer/src/lib/shared/deviceprofile.cpp
+++ b/src/designer/src/lib/shared/deviceprofile.cpp
@@ -130,9 +130,7 @@ DeviceProfile& DeviceProfile::operator=(const DeviceProfile &o)
return *this;
}
-DeviceProfile::~DeviceProfile()
-{
-}
+DeviceProfile::~DeviceProfile() = default;
void DeviceProfile::clear()
{
diff --git a/src/designer/src/lib/shared/dialoggui_p.h b/src/designer/src/lib/shared/dialoggui_p.h
index a33068ecc..8a9ce1b17 100644
--- a/src/designer/src/lib/shared/dialoggui_p.h
+++ b/src/designer/src/lib/shared/dialoggui_p.h
@@ -53,7 +53,7 @@ class QDESIGNER_SHARED_EXPORT DialogGui : public QDesignerDialogGuiInterface
{
public:
DialogGui();
- virtual ~DialogGui();
+ ~DialogGui() override;
QMessageBox::StandardButton
message(QWidget *parent, Message context, QMessageBox::Icon icon,
diff --git a/src/designer/src/lib/shared/formwindowbase_p.h b/src/designer/src/lib/shared/formwindowbase_p.h
index 3d02718d4..6c7f03de3 100644
--- a/src/designer/src/lib/shared/formwindowbase_p.h
+++ b/src/designer/src/lib/shared/formwindowbase_p.h
@@ -71,7 +71,7 @@ public:
enum HighlightMode { Restore, Highlight };
explicit FormWindowBase(QDesignerFormEditorInterface *core, QWidget *parent = 0, Qt::WindowFlags flags = 0);
- virtual ~FormWindowBase();
+ ~FormWindowBase() override;
QVariantMap formData();
void setFormData(const QVariantMap &vm);
diff --git a/src/designer/src/lib/shared/iconselector.cpp b/src/designer/src/lib/shared/iconselector.cpp
index fbccf70b8..303a2e2a6 100644
--- a/src/designer/src/lib/shared/iconselector.cpp
+++ b/src/designer/src/lib/shared/iconselector.cpp
@@ -143,9 +143,7 @@ LanguageResourceDialog::LanguageResourceDialog(QDesignerResourceBrowserInterface
d_ptr->init( this);
}
-LanguageResourceDialog::~LanguageResourceDialog()
-{
-}
+LanguageResourceDialog::~LanguageResourceDialog() = default;
void LanguageResourceDialog::setCurrentPath(const QString &filePath)
{
@@ -482,9 +480,7 @@ IconSelector::IconSelector(QWidget *parent) :
d_ptr->slotUpdate();
}
-IconSelector::~IconSelector()
-{
-}
+IconSelector::~IconSelector() = default;
void IconSelector::setIcon(const PropertySheetIconValue &icon)
{
@@ -528,7 +524,8 @@ class BlankSuppressingValidator : public QValidator {
public:
explicit BlankSuppressingValidator(QObject * parent = 0) : QValidator(parent) {}
- virtual State validate(QString &input, int &pos) const {
+ State validate(QString &input, int &pos) const override
+ {
const int blankPos = input.indexOf(QLatin1Char(' '));
if (blankPos != -1) {
pos = blankPos;
@@ -587,9 +584,7 @@ IconThemeEditor::IconThemeEditor(QWidget *parent, bool wantResetButton) :
setFocusProxy(d->m_themeLineEdit);
}
-IconThemeEditor::~IconThemeEditor()
-{
-}
+IconThemeEditor::~IconThemeEditor() = default;
void IconThemeEditor::reset()
{
diff --git a/src/designer/src/lib/shared/iconselector_p.h b/src/designer/src/lib/shared/iconselector_p.h
index 4e9645a07..59bcaf95f 100644
--- a/src/designer/src/lib/shared/iconselector_p.h
+++ b/src/designer/src/lib/shared/iconselector_p.h
@@ -70,7 +70,7 @@ class QDESIGNER_SHARED_EXPORT LanguageResourceDialog : public QDialog
explicit LanguageResourceDialog(QDesignerResourceBrowserInterface *rb, QWidget *parent = 0);
public:
- virtual ~LanguageResourceDialog();
+ ~LanguageResourceDialog() override;
// Factory: Returns 0 if the language extension does not provide a resource browser.
static LanguageResourceDialog* create(QDesignerFormEditorInterface *core, QWidget *parent);
@@ -91,7 +91,7 @@ class QDESIGNER_SHARED_EXPORT IconSelector: public QWidget
Q_OBJECT
public:
IconSelector(QWidget *parent = 0);
- virtual ~IconSelector();
+ ~IconSelector() override;
void setFormEditor(QDesignerFormEditorInterface *core); // required for dialog gui.
void setIconCache(DesignerIconCache *iconCache);
@@ -131,7 +131,7 @@ class QDESIGNER_SHARED_EXPORT IconThemeEditor : public QWidget
Q_PROPERTY(QString theme READ theme WRITE setTheme DESIGNABLE true)
public:
explicit IconThemeEditor(QWidget *parent = 0, bool wantResetButton = true);
- virtual ~IconThemeEditor();
+ ~IconThemeEditor() override;
QString theme() const;
void setTheme(const QString &theme);
diff --git a/src/designer/src/lib/shared/layout.cpp b/src/designer/src/lib/shared/layout.cpp
index 780a22dbf..fef4872f1 100644
--- a/src/designer/src/lib/shared/layout.cpp
+++ b/src/designer/src/lib/shared/layout.cpp
@@ -120,9 +120,7 @@ Layout::Layout(const QWidgetList &wl, QWidget *p, QDesignerFormWindowInterface *
m_oldGeometry = m_layoutBase->geometry();
}
-Layout::~Layout()
-{
-}
+Layout::~Layout() = default;
/*! The widget list we got in the constructor might contain too much
widgets (like widgets with different parents, already laid out
@@ -480,8 +478,8 @@ public:
BoxLayout(const QWidgetList &wl, QWidget *p, QDesignerFormWindowInterface *fw, QWidget *lb,
Qt::Orientation orientation);
- virtual void doLayout();
- virtual void sort();
+ void doLayout() override;
+ void sort() override;
private:
const Qt::Orientation m_orientation;
@@ -533,8 +531,8 @@ public:
SplitterLayout(const QWidgetList &wl, QWidget *p, QDesignerFormWindowInterface *fw, QWidget *lb,
Qt::Orientation orientation);
- virtual void doLayout();
- virtual void sort();
+ void doLayout() override;
+ void sort() override;
private:
const Qt::Orientation m_orientation;
@@ -581,6 +579,7 @@ void SplitterLayout::doLayout()
class Grid
{
+ Q_DISABLE_COPY(Grid);
public:
enum Mode {
GridLayout, // Arbitrary size/supports span
@@ -1064,8 +1063,8 @@ class GridLayout : public Layout
public:
GridLayout(const QWidgetList &wl, QWidget *p, QDesignerFormWindowInterface *fw, QWidget *lb);
- virtual void doLayout();
- virtual void sort() { setWidgets(buildGrid(widgets())); }
+ void doLayout() override;
+ void sort() override { setWidgets(buildGrid(widgets())); }
protected:
QWidgetList buildGrid(const QWidgetList &);
diff --git a/src/designer/src/lib/shared/layout_p.h b/src/designer/src/lib/shared/layout_p.h
index a64ac46c5..2b97fb823 100644
--- a/src/designer/src/lib/shared/layout_p.h
+++ b/src/designer/src/lib/shared/layout_p.h
@@ -69,7 +69,7 @@ public:
QDesignerFormWindowInterface *fw,
QWidget *layoutBase, LayoutInfo::Type layoutType);
- virtual ~Layout();
+ ~Layout() override;
virtual void sort() = 0;
virtual void doLayout() = 0;
diff --git a/src/designer/src/lib/shared/metadatabase.cpp b/src/designer/src/lib/shared/metadatabase.cpp
index a31a1e98b..16a0066bb 100644
--- a/src/designer/src/lib/shared/metadatabase.cpp
+++ b/src/designer/src/lib/shared/metadatabase.cpp
@@ -51,9 +51,7 @@ MetaDataBaseItem::MetaDataBaseItem(QObject *object)
{
}
-MetaDataBaseItem::~MetaDataBaseItem()
-{
-}
+MetaDataBaseItem::~MetaDataBaseItem() = default;
QString MetaDataBaseItem::name() const
{
diff --git a/src/designer/src/lib/shared/metadatabase_p.h b/src/designer/src/lib/shared/metadatabase_p.h
index 0c5e98b1b..a27d74fed 100644
--- a/src/designer/src/lib/shared/metadatabase_p.h
+++ b/src/designer/src/lib/shared/metadatabase_p.h
@@ -56,7 +56,7 @@ class QDESIGNER_SHARED_EXPORT MetaDataBaseItem: public QDesignerMetaDataBaseItem
{
public:
explicit MetaDataBaseItem(QObject *object);
- virtual ~MetaDataBaseItem();
+ ~MetaDataBaseItem() override;
QString name() const override;
void setName(const QString &name) override;
@@ -90,7 +90,7 @@ class QDESIGNER_SHARED_EXPORT MetaDataBase: public QDesignerMetaDataBaseInterfac
Q_OBJECT
public:
explicit MetaDataBase(QDesignerFormEditorInterface *core, QObject *parent = 0);
- virtual ~MetaDataBase();
+ ~MetaDataBase() override;
QDesignerFormEditorInterface *core() const override;
diff --git a/src/designer/src/lib/shared/morphmenu.cpp b/src/designer/src/lib/shared/morphmenu.cpp
index bac700ed8..d21a5fa1e 100644
--- a/src/designer/src/lib/shared/morphmenu.cpp
+++ b/src/designer/src/lib/shared/morphmenu.cpp
@@ -260,12 +260,12 @@ class MorphWidgetCommand : public QDesignerFormWindowCommand
public:
explicit MorphWidgetCommand(QDesignerFormWindowInterface *formWindow);
- ~MorphWidgetCommand();
+ ~MorphWidgetCommand() override;
// Convenience to add a morph command sequence macro
static bool addMorphMacro(QDesignerFormWindowInterface *formWindow, QWidget *w, const QString &newClass);
- bool init(QWidget *widget, const QString &newClass);
+ bool init(QWidget *widget, const QString &newClassName);
QString newWidgetName() const { return m_afterWidget->objectName(); }
@@ -318,9 +318,7 @@ MorphWidgetCommand::MorphWidgetCommand(QDesignerFormWindowInterface *formWindow)
{
}
-MorphWidgetCommand::~MorphWidgetCommand()
-{
-}
+MorphWidgetCommand::~MorphWidgetCommand() = default;
bool MorphWidgetCommand::init(QWidget *widget, const QString &newClassName)
{
diff --git a/src/designer/src/lib/shared/newactiondialog_p.h b/src/designer/src/lib/shared/newactiondialog_p.h
index 9f1e81a36..8eddcbe72 100644
--- a/src/designer/src/lib/shared/newactiondialog_p.h
+++ b/src/designer/src/lib/shared/newactiondialog_p.h
@@ -81,7 +81,7 @@ class NewActionDialog: public QDialog
Q_OBJECT
public:
explicit NewActionDialog(ActionEditor *parent);
- virtual ~NewActionDialog();
+ ~NewActionDialog() override;
ActionData actionData() const;
void setActionData(const ActionData &d);
diff --git a/src/designer/src/lib/shared/newformwidget_p.h b/src/designer/src/lib/shared/newformwidget_p.h
index e382bf3a2..b0a588461 100644
--- a/src/designer/src/lib/shared/newformwidget_p.h
+++ b/src/designer/src/lib/shared/newformwidget_p.h
@@ -74,7 +74,7 @@ public:
typedef QList<qdesigner_internal::DeviceProfile> DeviceProfileList;
explicit NewFormWidget(QDesignerFormEditorInterface *core, QWidget *parentWidget);
- virtual ~NewFormWidget();
+ ~NewFormWidget() override;
bool hasCurrentTemplate() const override;
QString currentTemplate(QString *errorMessage = 0) override;
diff --git a/src/designer/src/lib/shared/orderdialog_p.h b/src/designer/src/lib/shared/orderdialog_p.h
index 7ff0f5e55..5c28be6e5 100644
--- a/src/designer/src/lib/shared/orderdialog_p.h
+++ b/src/designer/src/lib/shared/orderdialog_p.h
@@ -60,7 +60,7 @@ class QDESIGNER_SHARED_EXPORT OrderDialog: public QDialog
Q_OBJECT
public:
OrderDialog(QWidget *parent);
- virtual ~OrderDialog();
+ ~OrderDialog() override;
static QWidgetList pagesOfContainer(const QDesignerFormEditorInterface *core, QWidget *container);
diff --git a/src/designer/src/lib/shared/pluginmanager_p.h b/src/designer/src/lib/shared/pluginmanager_p.h
index 3c44a3c29..249748e93 100644
--- a/src/designer/src/lib/shared/pluginmanager_p.h
+++ b/src/designer/src/lib/shared/pluginmanager_p.h
@@ -102,7 +102,7 @@ public:
typedef QList<QDesignerCustomWidgetInterface*> CustomWidgetList;
explicit QDesignerPluginManager(QDesignerFormEditorInterface *core);
- virtual ~QDesignerPluginManager();
+ ~QDesignerPluginManager() override;
QDesignerFormEditorInterface *core() const;
diff --git a/src/designer/src/lib/shared/previewconfigurationwidget_p.h b/src/designer/src/lib/shared/previewconfigurationwidget_p.h
index 367890574..621f46a51 100644
--- a/src/designer/src/lib/shared/previewconfigurationwidget_p.h
+++ b/src/designer/src/lib/shared/previewconfigurationwidget_p.h
@@ -60,7 +60,7 @@ class QDESIGNER_SHARED_EXPORT PreviewConfigurationWidget : public QGroupBox
public:
explicit PreviewConfigurationWidget(QDesignerFormEditorInterface *core,
QWidget *parent = 0);
- virtual ~PreviewConfigurationWidget();
+ ~PreviewConfigurationWidget() override;
void saveState();
private slots:
diff --git a/src/designer/src/lib/shared/previewmanager.cpp b/src/designer/src/lib/shared/previewmanager.cpp
index 932a5ebf1..bdfc2a127 100644
--- a/src/designer/src/lib/shared/previewmanager.cpp
+++ b/src/designer/src/lib/shared/previewmanager.cpp
@@ -457,9 +457,7 @@ PreviewConfiguration &PreviewConfiguration::operator=(const PreviewConfiguration
return *this;
}
-PreviewConfiguration::~PreviewConfiguration()
-{
-}
+PreviewConfiguration::~PreviewConfiguration() = default;
void PreviewConfiguration::clear()
{
diff --git a/src/designer/src/lib/shared/previewmanager_p.h b/src/designer/src/lib/shared/previewmanager_p.h
index 20df2c4f6..83c4ae7c0 100644
--- a/src/designer/src/lib/shared/previewmanager_p.h
+++ b/src/designer/src/lib/shared/previewmanager_p.h
@@ -115,7 +115,7 @@ public:
MultipleFormNonModalPreview };
explicit PreviewManager(PreviewMode mode, QObject *parent);
- virtual ~PreviewManager();
+ ~PreviewManager() override;
// Show preview. Raise existing preview window if there is one with a matching
// configuration, else create a new preview.
diff --git a/src/designer/src/lib/shared/qdesigner_command.cpp b/src/designer/src/lib/shared/qdesigner_command.cpp
index a21f126c9..212d9e0af 100644
--- a/src/designer/src/lib/shared/qdesigner_command.cpp
+++ b/src/designer/src/lib/shared/qdesigner_command.cpp
@@ -682,9 +682,7 @@ void DemoteFromCustomWidgetCommand::undo()
}
// ---------- CursorSelectionState
-CursorSelectionState::CursorSelectionState()
-{
-}
+CursorSelectionState::CursorSelectionState() = default;
void CursorSelectionState::save(const QDesignerFormWindowInterface *formWindow)
{
@@ -971,9 +969,7 @@ ToolBoxCommand::ToolBoxCommand(QDesignerFormWindowInterface *formWindow) :
{
}
-ToolBoxCommand::~ToolBoxCommand()
-{
-}
+ToolBoxCommand::~ToolBoxCommand() = default;
void ToolBoxCommand::init(QToolBox *toolBox)
{
@@ -1020,9 +1016,7 @@ MoveToolBoxPageCommand::MoveToolBoxPageCommand(QDesignerFormWindowInterface *for
{
}
-MoveToolBoxPageCommand::~MoveToolBoxPageCommand()
-{
-}
+MoveToolBoxPageCommand::~MoveToolBoxPageCommand() = default;
void MoveToolBoxPageCommand::init(QToolBox *toolBox, QWidget *page, int newIndex)
{
@@ -1054,9 +1048,7 @@ DeleteToolBoxPageCommand::DeleteToolBoxPageCommand(QDesignerFormWindowInterface
{
}
-DeleteToolBoxPageCommand::~DeleteToolBoxPageCommand()
-{
-}
+DeleteToolBoxPageCommand::~DeleteToolBoxPageCommand() = default;
void DeleteToolBoxPageCommand::init(QToolBox *toolBox)
{
@@ -1082,9 +1074,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand(QDesignerFormWindowInterface *formW
{
}
-AddToolBoxPageCommand::~AddToolBoxPageCommand()
-{
-}
+AddToolBoxPageCommand::~AddToolBoxPageCommand() = default;
void AddToolBoxPageCommand::init(QToolBox *toolBox)
{
@@ -1129,9 +1119,7 @@ TabWidgetCommand::TabWidgetCommand(QDesignerFormWindowInterface *formWindow) :
{
}
-TabWidgetCommand::~TabWidgetCommand()
-{
-}
+TabWidgetCommand::~TabWidgetCommand() = default;
void TabWidgetCommand::init(QTabWidget *tabWidget)
{
@@ -1177,9 +1165,7 @@ DeleteTabPageCommand::DeleteTabPageCommand(QDesignerFormWindowInterface *formWin
{
}
-DeleteTabPageCommand::~DeleteTabPageCommand()
-{
-}
+DeleteTabPageCommand::~DeleteTabPageCommand() = default;
void DeleteTabPageCommand::init(QTabWidget *tabWidget)
{
@@ -1205,9 +1191,7 @@ AddTabPageCommand::AddTabPageCommand(QDesignerFormWindowInterface *formWindow)
{
}
-AddTabPageCommand::~AddTabPageCommand()
-{
-}
+AddTabPageCommand::~AddTabPageCommand() = default;
void AddTabPageCommand::init(QTabWidget *tabWidget)
{
@@ -1253,9 +1237,7 @@ MoveTabPageCommand::MoveTabPageCommand(QDesignerFormWindowInterface *formWindow)
{
}
-MoveTabPageCommand::~MoveTabPageCommand()
-{
-}
+MoveTabPageCommand::~MoveTabPageCommand() = default;
void MoveTabPageCommand::init(QTabWidget *tabWidget, QWidget *page,
const QIcon &icon, const QString &label,
@@ -1292,9 +1274,7 @@ StackedWidgetCommand::StackedWidgetCommand(QDesignerFormWindowInterface *formWin
{
}
-StackedWidgetCommand::~StackedWidgetCommand()
-{
-}
+StackedWidgetCommand::~StackedWidgetCommand() = default;
void StackedWidgetCommand::init(QStackedWidget *stackedWidget)
{
@@ -1333,9 +1313,7 @@ MoveStackedWidgetCommand::MoveStackedWidgetCommand(QDesignerFormWindowInterface
{
}
-MoveStackedWidgetCommand::~MoveStackedWidgetCommand()
-{
-}
+MoveStackedWidgetCommand::~MoveStackedWidgetCommand() = default;
void MoveStackedWidgetCommand::init(QStackedWidget *stackedWidget, QWidget *page, int newIndex)
{
@@ -1365,9 +1343,7 @@ DeleteStackedWidgetPageCommand::DeleteStackedWidgetPageCommand(QDesignerFormWind
{
}
-DeleteStackedWidgetPageCommand::~DeleteStackedWidgetPageCommand()
-{
-}
+DeleteStackedWidgetPageCommand::~DeleteStackedWidgetPageCommand() = default;
void DeleteStackedWidgetPageCommand::init(QStackedWidget *stackedWidget)
{
@@ -1393,9 +1369,7 @@ AddStackedWidgetPageCommand::AddStackedWidgetPageCommand(QDesignerFormWindowInte
{
}
-AddStackedWidgetPageCommand::~AddStackedWidgetPageCommand()
-{
-}
+AddStackedWidgetPageCommand::~AddStackedWidgetPageCommand() = default;
void AddStackedWidgetPageCommand::init(QStackedWidget *stackedWidget)
{
@@ -1687,9 +1661,7 @@ DockWidgetCommand::DockWidgetCommand(const QString &description, QDesignerFormWi
{
}
-DockWidgetCommand::~DockWidgetCommand()
-{
-}
+DockWidgetCommand::~DockWidgetCommand() = default;
void DockWidgetCommand::init(QDockWidget *dockWidget)
{
@@ -1973,9 +1945,7 @@ ContainerWidgetCommand::ContainerWidgetCommand(QDesignerFormWindowInterface *for
{
}
-ContainerWidgetCommand::~ContainerWidgetCommand()
-{
-}
+ContainerWidgetCommand::~ContainerWidgetCommand() = default;
QDesignerContainerExtension *ContainerWidgetCommand::containerExtension() const
{
@@ -2028,9 +1998,7 @@ DeleteContainerWidgetPageCommand::DeleteContainerWidgetPageCommand(QDesignerForm
{
}
-DeleteContainerWidgetPageCommand::~DeleteContainerWidgetPageCommand()
-{
-}
+DeleteContainerWidgetPageCommand::~DeleteContainerWidgetPageCommand() = default;
void DeleteContainerWidgetPageCommand::init(QWidget *containerWidget, ContainerType ct)
{
@@ -2064,9 +2032,7 @@ AddContainerWidgetPageCommand::AddContainerWidgetPageCommand(QDesignerFormWindow
{
}
-AddContainerWidgetPageCommand::~AddContainerWidgetPageCommand()
-{
-}
+AddContainerWidgetPageCommand::~AddContainerWidgetPageCommand() = default;
void AddContainerWidgetPageCommand::init(QWidget *containerWidget, ContainerType ct, InsertionMode mode)
{
@@ -2117,9 +2083,7 @@ ChangeCurrentPageCommand::ChangeCurrentPageCommand(QDesignerFormWindowInterface
{
}
-ChangeCurrentPageCommand::~ChangeCurrentPageCommand()
-{
-}
+ChangeCurrentPageCommand::~ChangeCurrentPageCommand() = default;
QDesignerContainerExtension *ChangeCurrentPageCommand::containerExtension() const
{
diff --git a/src/designer/src/lib/shared/qdesigner_dnditem_p.h b/src/designer/src/lib/shared/qdesigner_dnditem_p.h
index 43b955956..8f5e20068 100644
--- a/src/designer/src/lib/shared/qdesigner_dnditem_p.h
+++ b/src/designer/src/lib/shared/qdesigner_dnditem_p.h
@@ -59,7 +59,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerDnDItem: public QDesignerDnDItemInterface
{
public:
explicit QDesignerDnDItem(DropType type, QWidget *source = 0);
- virtual ~QDesignerDnDItem();
+ ~QDesignerDnDItem() override;
DomUI *domUi() const override;
QWidget *decoration() const override;
@@ -93,7 +93,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerMimeData : public QMimeData {
public:
typedef QList<QDesignerDnDItemInterface *> QDesignerDnDItems;
- virtual ~QDesignerMimeData();
+ ~QDesignerMimeData() override;
const QDesignerDnDItems &items() const { return m_items; }
diff --git a/src/designer/src/lib/shared/qdesigner_dockwidget.cpp b/src/designer/src/lib/shared/qdesigner_dockwidget.cpp
index aead225a8..8619c22be 100644
--- a/src/designer/src/lib/shared/qdesigner_dockwidget.cpp
+++ b/src/designer/src/lib/shared/qdesigner_dockwidget.cpp
@@ -45,9 +45,7 @@ QDesignerDockWidget::QDesignerDockWidget(QWidget *parent)
{
}
-QDesignerDockWidget::~QDesignerDockWidget()
-{
-}
+QDesignerDockWidget::~QDesignerDockWidget() = default;
bool QDesignerDockWidget::docked() const
{
diff --git a/src/designer/src/lib/shared/qdesigner_dockwidget_p.h b/src/designer/src/lib/shared/qdesigner_dockwidget_p.h
index 1fa17d772..59cf72ab5 100644
--- a/src/designer/src/lib/shared/qdesigner_dockwidget_p.h
+++ b/src/designer/src/lib/shared/qdesigner_dockwidget_p.h
@@ -54,7 +54,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerDockWidget: public QDockWidget
Q_PROPERTY(bool docked READ docked WRITE setDocked DESIGNABLE inMainWindow STORED false)
public:
QDesignerDockWidget(QWidget *parent = 0);
- virtual ~QDesignerDockWidget();
+ ~QDesignerDockWidget() override;
bool docked() const;
void setDocked(bool b);
diff --git a/src/designer/src/lib/shared/qdesigner_formwindowmanager_p.h b/src/designer/src/lib/shared/qdesigner_formwindowmanager_p.h
index bb8840c2c..4aed283f6 100644
--- a/src/designer/src/lib/shared/qdesigner_formwindowmanager_p.h
+++ b/src/designer/src/lib/shared/qdesigner_formwindowmanager_p.h
@@ -58,11 +58,11 @@ class QDESIGNER_SHARED_EXPORT QDesignerFormWindowManager
Q_OBJECT
public:
explicit QDesignerFormWindowManager(QObject *parent = 0);
- virtual ~QDesignerFormWindowManager();
+ ~QDesignerFormWindowManager() override;
virtual PreviewManager *previewManager() const = 0;
- virtual void showPluginDialog();
+ void showPluginDialog() override;
private:
void *m_unused;
diff --git a/src/designer/src/lib/shared/qdesigner_introspection.cpp b/src/designer/src/lib/shared/qdesigner_introspection.cpp
index 59c108a2e..7d08ae5ce 100644
--- a/src/designer/src/lib/shared/qdesigner_introspection.cpp
+++ b/src/designer/src/lib/shared/qdesigner_introspection.cpp
@@ -93,7 +93,7 @@ namespace {
class QDesignerMetaProperty : public QDesignerMetaPropertyInterface {
public:
QDesignerMetaProperty(const QMetaProperty &property);
- virtual ~QDesignerMetaProperty();
+ ~QDesignerMetaProperty() override;
const QDesignerMetaEnumInterface *enumerator() const override { return m_enumerator; }
@@ -185,14 +185,14 @@ namespace {
public:
QDesignerMetaMethod(const QMetaMethod &method);
- virtual Access access() const { return m_access; }
- virtual MethodType methodType() const { return m_methodType; }
- virtual QStringList parameterNames() const { return m_parameterNames; }
- virtual QStringList parameterTypes() const { return m_parameterTypes; }
- virtual QString signature() const { return m_signature; }
- virtual QString normalizedSignature() const { return m_normalizedSignature; }
- virtual QString tag() const { return m_tag; }
- virtual QString typeName() const { return m_typeName; }
+ Access access() const override { return m_access; }
+ MethodType methodType() const override { return m_methodType; }
+ QStringList parameterNames() const override { return m_parameterNames; }
+ QStringList parameterTypes() const override { return m_parameterTypes; }
+ QString signature() const override { return m_signature; }
+ QString normalizedSignature() const override { return m_normalizedSignature; }
+ QString tag() const override { return m_tag; }
+ QString typeName() const override { return m_typeName; }
private:
Access m_access;
@@ -246,29 +246,38 @@ namespace {
class QDesignerMetaObject : public QDesignerMetaObjectInterface {
public:
QDesignerMetaObject(const qdesigner_internal::QDesignerIntrospection *introspection, const QMetaObject *metaObject);
- virtual ~QDesignerMetaObject();
-
- virtual QString className() const { return m_className; }
- virtual const QDesignerMetaEnumInterface *enumerator(int index) const { return m_enumerators[index]; }
- virtual int enumeratorCount() const { return m_enumerators.size(); }
- virtual int enumeratorOffset() const { return m_metaObject->enumeratorOffset(); }
-
- virtual int indexOfEnumerator(const QString &name) const { return m_metaObject->indexOfEnumerator(name.toUtf8()); }
- virtual int indexOfMethod(const QString &method) const { return m_metaObject->indexOfMethod(method.toUtf8()); }
- virtual int indexOfProperty(const QString &name) const { return m_metaObject->indexOfProperty(name.toUtf8()); }
- virtual int indexOfSignal(const QString &signal) const { return m_metaObject->indexOfSignal(signal.toUtf8()); }
- virtual int indexOfSlot(const QString &slot) const { return m_metaObject->indexOfSlot(slot.toUtf8()); }
-
- virtual const QDesignerMetaMethodInterface *method(int index) const { return m_methods[index]; }
- virtual int methodCount() const { return m_methods.size(); }
- virtual int methodOffset() const { return m_metaObject->methodOffset(); }
-
- virtual const QDesignerMetaPropertyInterface *property(int index) const { return m_properties[index]; }
- virtual int propertyCount() const { return m_properties.size(); }
- virtual int propertyOffset() const { return m_metaObject->propertyOffset(); }
-
- const QDesignerMetaObjectInterface *superClass() const;
- virtual const QDesignerMetaPropertyInterface *userProperty() const { return m_userProperty; }
+ ~QDesignerMetaObject() override;
+
+ QString className() const override { return m_className; }
+ const QDesignerMetaEnumInterface *enumerator(int index) const override
+ { return m_enumerators[index]; }
+ int enumeratorCount() const override { return m_enumerators.size(); }
+ int enumeratorOffset() const override { return m_metaObject->enumeratorOffset(); }
+
+ int indexOfEnumerator(const QString &name) const override
+ { return m_metaObject->indexOfEnumerator(name.toUtf8()); }
+ int indexOfMethod(const QString &method) const override
+ { return m_metaObject->indexOfMethod(method.toUtf8()); }
+ int indexOfProperty(const QString &name) const override
+ { return m_metaObject->indexOfProperty(name.toUtf8()); }
+ int indexOfSignal(const QString &signal) const override
+ { return m_metaObject->indexOfSignal(signal.toUtf8()); }
+ int indexOfSlot(const QString &slot) const override
+ { return m_metaObject->indexOfSlot(slot.toUtf8()); }
+
+ const QDesignerMetaMethodInterface *method(int index) const override
+ { return m_methods[index]; }
+ int methodCount() const override { return m_methods.size(); }
+ int methodOffset() const override { return m_metaObject->methodOffset(); }
+
+ const QDesignerMetaPropertyInterface *property(int index) const override
+ { return m_properties[index]; }
+ int propertyCount() const override { return m_properties.size(); }
+ int propertyOffset() const override { return m_metaObject->propertyOffset(); }
+
+ const QDesignerMetaObjectInterface *superClass() const override;
+ const QDesignerMetaPropertyInterface *userProperty() const override
+ { return m_userProperty; }
private:
const QString m_className;
@@ -332,9 +341,7 @@ namespace {
namespace qdesigner_internal {
- QDesignerIntrospection::QDesignerIntrospection()
- {
- }
+ QDesignerIntrospection::QDesignerIntrospection() = default;
QDesignerIntrospection::~QDesignerIntrospection()
{
diff --git a/src/designer/src/lib/shared/qdesigner_introspection_p.h b/src/designer/src/lib/shared/qdesigner_introspection_p.h
index 77f676ddd..3fec4bc47 100644
--- a/src/designer/src/lib/shared/qdesigner_introspection_p.h
+++ b/src/designer/src/lib/shared/qdesigner_introspection_p.h
@@ -54,7 +54,7 @@ namespace qdesigner_internal {
class QDESIGNER_SHARED_EXPORT QDesignerIntrospection : public QDesignerIntrospectionInterface {
public:
QDesignerIntrospection();
- virtual ~QDesignerIntrospection();
+ ~QDesignerIntrospection() override;
const QDesignerMetaObjectInterface* metaObject(const QObject *object) const override;
diff --git a/src/designer/src/lib/shared/qdesigner_membersheet_p.h b/src/designer/src/lib/shared/qdesigner_membersheet_p.h
index 83ee77655..85f4ea742 100644
--- a/src/designer/src/lib/shared/qdesigner_membersheet_p.h
+++ b/src/designer/src/lib/shared/qdesigner_membersheet_p.h
@@ -57,7 +57,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerMemberSheet: public QObject, public QDesi
public:
explicit QDesignerMemberSheet(QObject *object, QObject *parent = 0);
- virtual ~QDesignerMemberSheet();
+ ~QDesignerMemberSheet() override;
int indexOf(const QString &name) const override;
diff --git a/src/designer/src/lib/shared/qdesigner_menu.cpp b/src/designer/src/lib/shared/qdesigner_menu.cpp
index d5cd187ca..46d97ba7a 100644
--- a/src/designer/src/lib/shared/qdesigner_menu.cpp
+++ b/src/designer/src/lib/shared/qdesigner_menu.cpp
@@ -110,9 +110,7 @@ QDesignerMenu::QDesignerMenu(QWidget *parent) :
installEventFilter(this);
}
-QDesignerMenu::~QDesignerMenu()
-{
-}
+QDesignerMenu::~QDesignerMenu() = default;
void QDesignerMenu::slotAdjustSizeNow()
{
diff --git a/src/designer/src/lib/shared/qdesigner_menu_p.h b/src/designer/src/lib/shared/qdesigner_menu_p.h
index c03f165fd..e0a4a6267 100644
--- a/src/designer/src/lib/shared/qdesigner_menu_p.h
+++ b/src/designer/src/lib/shared/qdesigner_menu_p.h
@@ -69,7 +69,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerMenu: public QMenu
Q_OBJECT
public:
QDesignerMenu(QWidget *parent = 0);
- virtual ~QDesignerMenu();
+ ~QDesignerMenu() override;
bool eventFilter(QObject *object, QEvent *event) override;
diff --git a/src/designer/src/lib/shared/qdesigner_menubar.cpp b/src/designer/src/lib/shared/qdesigner_menubar.cpp
index c70c56118..ba0bda71e 100644
--- a/src/designer/src/lib/shared/qdesigner_menubar.cpp
+++ b/src/designer/src/lib/shared/qdesigner_menubar.cpp
@@ -69,10 +69,7 @@ SpecialMenuAction::SpecialMenuAction(QObject *parent)
{
}
-SpecialMenuAction::~SpecialMenuAction()
-{
-}
-
+SpecialMenuAction::~SpecialMenuAction() = default;
} // namespace qdesigner_internal
@@ -107,9 +104,7 @@ QDesignerMenuBar::QDesignerMenuBar(QWidget *parent) :
installEventFilter(this);
}
-QDesignerMenuBar::~QDesignerMenuBar()
-{
-}
+QDesignerMenuBar::~QDesignerMenuBar() = default;
void QDesignerMenuBar::paintEvent(QPaintEvent *event)
{
diff --git a/src/designer/src/lib/shared/qdesigner_menubar_p.h b/src/designer/src/lib/shared/qdesigner_menubar_p.h
index 08340e12e..e171a94e0 100644
--- a/src/designer/src/lib/shared/qdesigner_menubar_p.h
+++ b/src/designer/src/lib/shared/qdesigner_menubar_p.h
@@ -64,7 +64,7 @@ class SpecialMenuAction: public QAction
Q_OBJECT
public:
SpecialMenuAction(QObject *parent = 0);
- virtual ~SpecialMenuAction();
+ ~SpecialMenuAction() override;
};
} // namespace qdesigner_internal
@@ -74,7 +74,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerMenuBar: public QMenuBar
Q_OBJECT
public:
QDesignerMenuBar(QWidget *parent = 0);
- virtual ~QDesignerMenuBar();
+ ~QDesignerMenuBar() override;
bool eventFilter(QObject *object, QEvent *event) override;
diff --git a/src/designer/src/lib/shared/qdesigner_promotion_p.h b/src/designer/src/lib/shared/qdesigner_promotion_p.h
index 53a862795..3448fd999 100644
--- a/src/designer/src/lib/shared/qdesigner_promotion_p.h
+++ b/src/designer/src/lib/shared/qdesigner_promotion_p.h
@@ -59,10 +59,10 @@ namespace qdesigner_internal {
QSet<QString> referencedPromotedClassNames() const override;
- virtual bool addPromotedClass(const QString &baseClass,
- const QString &className,
- const QString &includeFile,
- QString *errorMessage) override;
+ bool addPromotedClass(const QString &baseClass,
+ const QString &className,
+ const QString &includeFile,
+ QString *errorMessage) override;
bool removePromotedClass(const QString &className, QString *errorMessage) override;
diff --git a/src/designer/src/lib/shared/qdesigner_propertysheet_p.h b/src/designer/src/lib/shared/qdesigner_propertysheet_p.h
index 87c5e879e..b7c2113a4 100644
--- a/src/designer/src/lib/shared/qdesigner_propertysheet_p.h
+++ b/src/designer/src/lib/shared/qdesigner_propertysheet_p.h
@@ -70,7 +70,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerPropertySheet: public QObject, public QDe
Q_INTERFACES(QDesignerPropertySheetExtension QDesignerDynamicPropertySheetExtension)
public:
explicit QDesignerPropertySheet(QObject *object, QObject *parent = 0);
- virtual ~QDesignerPropertySheet();
+ ~QDesignerPropertySheet() override;
int indexOf(const QString &name) const override;
@@ -191,9 +191,9 @@ class QDESIGNER_SHARED_EXPORT QDesignerAbstractPropertySheetFactory: public QExt
Q_INTERFACES(QAbstractExtensionFactory)
public:
explicit QDesignerAbstractPropertySheetFactory(QExtensionManager *parent = 0);
- virtual ~QDesignerAbstractPropertySheetFactory();
+ ~QDesignerAbstractPropertySheetFactory() override;
- QObject *extension(QObject *object, const QString &iid) const;
+ QObject *extension(QObject *object, const QString &iid) const override;
private slots:
void objectDestroyed(QObject *object);
diff --git a/src/designer/src/lib/shared/qdesigner_stackedbox_p.h b/src/designer/src/lib/shared/qdesigner_stackedbox_p.h
index 991bb86c1..22d4cffdf 100644
--- a/src/designer/src/lib/shared/qdesigner_stackedbox_p.h
+++ b/src/designer/src/lib/shared/qdesigner_stackedbox_p.h
@@ -66,7 +66,7 @@ public:
// Install helper on QStackedWidget
static void install(QStackedWidget *stackedWidget);
- bool eventFilter(QObject *watched, QEvent *event);
+ bool eventFilter(QObject *watched, QEvent *event) override;
void setButtonToolTipEnabled(bool v) { m_buttonToolTipEnabled = v; }
bool buttonToolTipEnabled() const { return m_buttonToolTipEnabled; }
diff --git a/src/designer/src/lib/shared/qdesigner_tabwidget.cpp b/src/designer/src/lib/shared/qdesigner_tabwidget.cpp
index a785c2d53..dff5faf7f 100644
--- a/src/designer/src/lib/shared/qdesigner_tabwidget.cpp
+++ b/src/designer/src/lib/shared/qdesigner_tabwidget.cpp
@@ -88,9 +88,7 @@ QTabWidgetEventFilter::QTabWidgetEventFilter(QTabWidget *parent) :
connect(m_actionDeletePage, &QAction::triggered, this, &QTabWidgetEventFilter::removeCurrentPage);
}
-QTabWidgetEventFilter::~QTabWidgetEventFilter()
-{
-}
+QTabWidgetEventFilter::~QTabWidgetEventFilter() = default;
void QTabWidgetEventFilter::install(QTabWidget *tabWidget)
{
diff --git a/src/designer/src/lib/shared/qdesigner_taskmenu_p.h b/src/designer/src/lib/shared/qdesigner_taskmenu_p.h
index d4f1e6654..7d43d6495 100644
--- a/src/designer/src/lib/shared/qdesigner_taskmenu_p.h
+++ b/src/designer/src/lib/shared/qdesigner_taskmenu_p.h
@@ -64,7 +64,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerTaskMenu: public QObject, public QDesigne
Q_INTERFACES(QDesignerTaskMenuExtension)
public:
QDesignerTaskMenu(QWidget *widget, QObject *parent);
- virtual ~QDesignerTaskMenu();
+ ~QDesignerTaskMenu() override;
QWidget *widget() const;
diff --git a/src/designer/src/lib/shared/qdesigner_utils.cpp b/src/designer/src/lib/shared/qdesigner_utils.cpp
index 2cf61b04a..b706fa3bb 100644
--- a/src/designer/src/lib/shared/qdesigner_utils.cpp
+++ b/src/designer/src/lib/shared/qdesigner_utils.cpp
@@ -311,9 +311,7 @@ namespace qdesigner_internal
{
}
- PropertySheetIconValue::~PropertySheetIconValue()
- {
- }
+ PropertySheetIconValue::~PropertySheetIconValue() = default;
PropertySheetIconValue::PropertySheetIconValue(const PropertySheetIconValue &rhs) :
m_data(rhs.m_data)
diff --git a/src/designer/src/lib/shared/qdesigner_widget.cpp b/src/designer/src/lib/shared/qdesigner_widget.cpp
index ae6e277d6..b4f885006 100644
--- a/src/designer/src/lib/shared/qdesigner_widget.cpp
+++ b/src/designer/src/lib/shared/qdesigner_widget.cpp
@@ -72,9 +72,7 @@ QDesignerWidget::QDesignerWidget(QDesignerFormWindowInterface* formWindow, QWidg
{
}
-QDesignerWidget::~QDesignerWidget()
-{
-}
+QDesignerWidget::~QDesignerWidget() = default;
QDesignerFormWindowInterface* QDesignerWidget::formWindow() const
{
diff --git a/src/designer/src/lib/shared/qdesigner_widget_p.h b/src/designer/src/lib/shared/qdesigner_widget_p.h
index 5555b84a4..bc9e62cbd 100644
--- a/src/designer/src/lib/shared/qdesigner_widget_p.h
+++ b/src/designer/src/lib/shared/qdesigner_widget_p.h
@@ -57,7 +57,7 @@ class QDESIGNER_SHARED_EXPORT QDesignerWidget : public QWidget
Q_OBJECT
public:
explicit QDesignerWidget(QDesignerFormWindowInterface* formWindow, QWidget *parent = 0);
- virtual ~QDesignerWidget();
+ ~QDesignerWidget() override;
QDesignerFormWindowInterface* formWindow() const;
@@ -79,11 +79,11 @@ class QDESIGNER_SHARED_EXPORT QDesignerDialog : public QDialog
public:
explicit QDesignerDialog(QDesignerFormWindowInterface *fw, QWidget *parent);
- virtual QSize minimumSizeHint() const
+ QSize minimumSizeHint() const override
{ return QWidget::minimumSizeHint().expandedTo(QSize(16, 16)); }
protected:
- void paintEvent(QPaintEvent *e);
+ void paintEvent(QPaintEvent *e) override;
private:
qdesigner_internal::FormWindowBase* m_formWindow;
diff --git a/src/designer/src/lib/shared/qdesigner_widgetbox.cpp b/src/designer/src/lib/shared/qdesigner_widgetbox.cpp
index 8d64d76ee..079c0ab00 100644
--- a/src/designer/src/lib/shared/qdesigner_widgetbox.cpp
+++ b/src/designer/src/lib/shared/qdesigner_widgetbox.cpp
@@ -64,9 +64,7 @@ QDesignerWidgetBoxInterface::Widget::Widget(const QString &aname, const QString
{
}
-QDesignerWidgetBoxInterface::Widget::~Widget()
-{
-}
+QDesignerWidgetBoxInterface::Widget::~Widget() = default;
QDesignerWidgetBoxInterface::Widget::Widget(const Widget &w) :
m_data(w.m_data)
diff --git a/src/designer/src/lib/shared/qlayout_widget.cpp b/src/designer/src/lib/shared/qlayout_widget.cpp
index 2956f3e77..6b8130029 100644
--- a/src/designer/src/lib/shared/qlayout_widget.cpp
+++ b/src/designer/src/lib/shared/qlayout_widget.cpp
@@ -111,7 +111,9 @@ namespace qdesigner_internal {
class PaddingSpacerItem : public QSpacerItem {
public:
PaddingSpacerItem() : QSpacerItem(0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding) {}
- virtual Qt::Orientations expandingDirections () const { return Qt::Vertical | Qt::Horizontal; }
+
+ Qt::Orientations expandingDirections () const override
+ { return Qt::Vertical | Qt::Horizontal; }
};
}
diff --git a/src/designer/src/lib/shared/qlayout_widget_p.h b/src/designer/src/lib/shared/qlayout_widget_p.h
index 1a70c71a2..23bc736b3 100644
--- a/src/designer/src/lib/shared/qlayout_widget_p.h
+++ b/src/designer/src/lib/shared/qlayout_widget_p.h
@@ -168,7 +168,7 @@ protected:
QLayoutSupport(QDesignerFormWindowInterface *formWindow, QWidget *widget, LayoutHelper *helper, QObject *parent = 0);
public:
- virtual ~QLayoutSupport();
+ ~QLayoutSupport() override;
inline QDesignerFormWindowInterface *formWindow() const { return m_formWindow; }
diff --git a/src/designer/src/lib/shared/qsimpleresource.cpp b/src/designer/src/lib/shared/qsimpleresource.cpp
index fea62f88c..2def43570 100644
--- a/src/designer/src/lib/shared/qsimpleresource.cpp
+++ b/src/designer/src/lib/shared/qsimpleresource.cpp
@@ -63,10 +63,7 @@ QSimpleResource::QSimpleResource(QDesignerFormEditorInterface *core) :
setWorkingDirectory(QDir(workingDirectory));
}
-QSimpleResource::~QSimpleResource()
-{
-
-}
+QSimpleResource::~QSimpleResource() = default;
QBrush QSimpleResource::setupBrush(DomBrush *brush)
{
diff --git a/src/designer/src/lib/shared/qsimpleresource_p.h b/src/designer/src/lib/shared/qsimpleresource_p.h
index 727529126..e2d768451 100644
--- a/src/designer/src/lib/shared/qsimpleresource_p.h
+++ b/src/designer/src/lib/shared/qsimpleresource_p.h
@@ -61,7 +61,7 @@ class QDESIGNER_SHARED_EXPORT QSimpleResource : public QAbstractFormBuilder
{
public:
explicit QSimpleResource(QDesignerFormEditorInterface *core);
- virtual ~QSimpleResource();
+ ~QSimpleResource() override;
QBrush setupBrush(DomBrush *brush);
DomBrush *saveBrush(const QBrush &brush);
diff --git a/src/designer/src/lib/shared/qtresourceeditordialog.cpp b/src/designer/src/lib/shared/qtresourceeditordialog.cpp
index e5db4d640..960313f49 100644
--- a/src/designer/src/lib/shared/qtresourceeditordialog.cpp
+++ b/src/designer/src/lib/shared/qtresourceeditordialog.cpp
@@ -223,7 +223,7 @@ public:
QString alias() const { return m_alias; }
QString fullPath() const { return m_fullPath; }
private:
- QtResourceFile() {}
+ QtResourceFile() = default;
QString m_path;
QString m_alias;
@@ -238,7 +238,7 @@ public:
QString language() const { return m_language; }
QList<QtResourceFile *> resourceFiles() const { return m_resourceFiles; }
private:
- QtResourcePrefix() {}
+ QtResourcePrefix() = default;
QString m_prefix;
QString m_language;
@@ -256,7 +256,7 @@ public:
QtQrcFileData initialState() const { return m_initialState; }
private:
- QtQrcFile() { }
+ QtQrcFile() = default;
void setPath(const QString &path) {
m_path = path;
@@ -276,7 +276,7 @@ class QtQrcManager : public QObject
Q_OBJECT
public:
QtQrcManager(QObject *parent = 0);
- ~QtQrcManager();
+ ~QtQrcManager() override;
QList<QtQrcFile *> qrcFiles() const;
diff --git a/src/designer/src/lib/shared/qtresourceeditordialog_p.h b/src/designer/src/lib/shared/qtresourceeditordialog_p.h
index bfd9bb76c..331472293 100644
--- a/src/designer/src/lib/shared/qtresourceeditordialog_p.h
+++ b/src/designer/src/lib/shared/qtresourceeditordialog_p.h
@@ -65,11 +65,11 @@ public:
static void displayResourceFailures(const QString &logOutput, QDesignerDialogGuiInterface *dlgGui, QWidget *parent = 0);
public slots:
- virtual void accept();
+ void accept() override;
private:
QtResourceEditorDialog(QDesignerFormEditorInterface *core, QDesignerDialogGuiInterface *dlgGui, QWidget *parent = 0);
- ~QtResourceEditorDialog();
+ ~QtResourceEditorDialog() override;
QScopedPointer<class QtResourceEditorDialogPrivate> d_ptr;
Q_DECLARE_PRIVATE(QtResourceEditorDialog)
diff --git a/src/designer/src/lib/shared/qtresourcemodel.cpp b/src/designer/src/lib/shared/qtresourcemodel.cpp
index 098dc984a..0e06bc25b 100644
--- a/src/designer/src/lib/shared/qtresourcemodel.cpp
+++ b/src/designer/src/lib/shared/qtresourcemodel.cpp
@@ -126,9 +126,7 @@ QtResourceSet::QtResourceSet(QtResourceModel *model) :
d_ptr->q_ptr = this;
}
-QtResourceSet::~QtResourceSet()
-{
-}
+QtResourceSet::~QtResourceSet() = default;
QStringList QtResourceSet::activeResourceFilePaths() const
{
diff --git a/src/designer/src/lib/shared/qtresourceview_p.h b/src/designer/src/lib/shared/qtresourceview_p.h
index ff4a4e657..b32e9370b 100644
--- a/src/designer/src/lib/shared/qtresourceview_p.h
+++ b/src/designer/src/lib/shared/qtresourceview_p.h
@@ -110,7 +110,7 @@ class QDESIGNER_SHARED_EXPORT QtResourceViewDialog : public QDialog
Q_OBJECT
public:
explicit QtResourceViewDialog(QDesignerFormEditorInterface *core, QWidget *parent = 0);
- virtual ~QtResourceViewDialog();
+ ~QtResourceViewDialog() override;
QString selectedResource() const;
void selectResource(const QString &path);
diff --git a/src/designer/src/lib/shared/richtexteditor.cpp b/src/designer/src/lib/shared/richtexteditor.cpp
index d78959fec..6be443cb4 100644
--- a/src/designer/src/lib/shared/richtexteditor.cpp
+++ b/src/designer/src/lib/shared/richtexteditor.cpp
@@ -190,12 +190,12 @@ class AddLinkDialog : public QDialog
public:
AddLinkDialog(RichTextEditor *editor, QWidget *parent = 0);
- ~AddLinkDialog();
+ ~AddLinkDialog() override;
int showDialog();
public slots:
- void accept();
+ void accept() override;
private:
RichTextEditor *m_editor;
diff --git a/src/designer/src/lib/shared/signalslotdialog.cpp b/src/designer/src/lib/shared/signalslotdialog.cpp
index 7e606829f..6720f97b2 100644
--- a/src/designer/src/lib/shared/signalslotdialog.cpp
+++ b/src/designer/src/lib/shared/signalslotdialog.cpp
@@ -174,8 +174,10 @@ namespace {
const QStringList &oldFakeSlots, const QStringList &oldFakeSignals,
const QStringList &newFakeSlots, const QStringList &newFakeSignals);
- virtual void undo() { fakeMethodsToMetaDataBase(core(), m_object, m_oldFakeSlots, m_oldFakeSignals); }
- virtual void redo() { fakeMethodsToMetaDataBase(core(), m_object, m_newFakeSlots, m_newFakeSignals); }
+ void undo() override
+ { fakeMethodsToMetaDataBase(core(), m_object, m_oldFakeSlots, m_oldFakeSignals); }
+ void redo() override
+ { fakeMethodsToMetaDataBase(core(), m_object, m_newFakeSlots, m_newFakeSignals); }
private:
QObject *m_object;
diff --git a/src/designer/src/lib/shared/signalslotdialog_p.h b/src/designer/src/lib/shared/signalslotdialog_p.h
index 06ce011ca..5848cd229 100644
--- a/src/designer/src/lib/shared/signalslotdialog_p.h
+++ b/src/designer/src/lib/shared/signalslotdialog_p.h
@@ -128,7 +128,7 @@ public:
enum FocusMode { FocusSlots, FocusSignals };
explicit SignalSlotDialog(QDesignerDialogGuiInterface *dialogGui, QWidget *parent = 0, FocusMode m = FocusSlots);
- virtual ~SignalSlotDialog();
+ ~SignalSlotDialog() override;
DialogCode showDialog(SignalSlotDialogData &slotData, SignalSlotDialogData &signalData);
diff --git a/src/designer/src/lib/shared/widgetdatabase.cpp b/src/designer/src/lib/shared/widgetdatabase.cpp
index 60da933af..380af73cc 100644
--- a/src/designer/src/lib/shared/widgetdatabase.cpp
+++ b/src/designer/src/lib/shared/widgetdatabase.cpp
@@ -306,9 +306,7 @@ WidgetDataBase::WidgetDataBase(QDesignerFormEditorInterface *core, QObject *pare
item(indexOfClassName(QStringLiteral("QDialog")))->setContainer(true);
}
-WidgetDataBase::~WidgetDataBase()
-{
-}
+WidgetDataBase::~WidgetDataBase() = default;
QDesignerFormEditorInterface *WidgetDataBase::core() const
{
diff --git a/src/designer/src/lib/shared/widgetdatabase_p.h b/src/designer/src/lib/shared/widgetdatabase_p.h
index d4bec9783..95c363860 100644
--- a/src/designer/src/lib/shared/widgetdatabase_p.h
+++ b/src/designer/src/lib/shared/widgetdatabase_p.h
@@ -146,7 +146,7 @@ class QDESIGNER_SHARED_EXPORT WidgetDataBase: public QDesignerWidgetDataBaseInte
Q_OBJECT
public:
explicit WidgetDataBase(QDesignerFormEditorInterface *core, QObject *parent = 0);
- virtual ~WidgetDataBase();
+ ~WidgetDataBase() override;
QDesignerFormEditorInterface *core() const override;
diff --git a/src/designer/src/lib/shared/widgetfactory.cpp b/src/designer/src/lib/shared/widgetfactory.cpp
index ddbc7d5ed..880f62a93 100644
--- a/src/designer/src/lib/shared/widgetfactory.cpp
+++ b/src/designer/src/lib/shared/widgetfactory.cpp
@@ -200,9 +200,7 @@ WidgetFactory::WidgetFactory(QDesignerFormEditorInterface *core, QObject *parent
{
}
-WidgetFactory::~WidgetFactory()
-{
-}
+WidgetFactory::~WidgetFactory() = default;
QDesignerFormWindowInterface *WidgetFactory::currentFormWindow(QDesignerFormWindowInterface *fw)
{
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index 166d1c31d..4e9c0ec55 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -173,9 +173,7 @@ QAbstractFormBuilder::QAbstractFormBuilder() : d(new QFormBuilderExtra)
/*!
Destroys the form builder.*/
-QAbstractFormBuilder::~QAbstractFormBuilder()
-{
-}
+QAbstractFormBuilder::~QAbstractFormBuilder() = default;
/*!
\fn QWidget *QAbstractFormBuilder::load(QIODevice *device, QWidget *parent)
diff --git a/src/designer/src/lib/uilib/formbuilder.h b/src/designer/src/lib/uilib/formbuilder.h
index a488a37f2..522c6df78 100644
--- a/src/designer/src/lib/uilib/formbuilder.h
+++ b/src/designer/src/lib/uilib/formbuilder.h
@@ -72,7 +72,7 @@ class QDESIGNER_UILIB_EXPORT QFormBuilder: public QAbstractFormBuilder
{
public:
QFormBuilder();
- virtual ~QFormBuilder();
+ ~QFormBuilder() override;
QStringList pluginPaths() const;
diff --git a/src/designer/src/lib/uilib/resourcebuilder.cpp b/src/designer/src/lib/uilib/resourcebuilder.cpp
index df52f7792..0694996a0 100644
--- a/src/designer/src/lib/uilib/resourcebuilder.cpp
+++ b/src/designer/src/lib/uilib/resourcebuilder.cpp
@@ -65,15 +65,9 @@ namespace QFormInternal {
enum { themeDebug = 0 };
-QResourceBuilder::QResourceBuilder()
-{
-
-}
+QResourceBuilder::QResourceBuilder() = default;
-QResourceBuilder::~QResourceBuilder()
-{
-
-}
+QResourceBuilder::~QResourceBuilder() = default;
int QResourceBuilder::iconStateFlags(const DomResourceIcon *dpi)
{
diff --git a/src/designer/src/lib/uilib/textbuilder.cpp b/src/designer/src/lib/uilib/textbuilder.cpp
index f18451f8d..756b41c03 100644
--- a/src/designer/src/lib/uilib/textbuilder.cpp
+++ b/src/designer/src/lib/uilib/textbuilder.cpp
@@ -58,15 +58,9 @@ QT_BEGIN_NAMESPACE
namespace QFormInternal {
#endif
-QTextBuilder::QTextBuilder()
-{
-
-}
+QTextBuilder::QTextBuilder() = default;
-QTextBuilder::~QTextBuilder()
-{
-
-}
+QTextBuilder::~QTextBuilder() = default;
QVariant QTextBuilder::loadText(const DomProperty *property) const
{
diff --git a/src/designer/src/uitools/quiloader.cpp b/src/designer/src/uitools/quiloader.cpp
index 68b2eb144..5caf6623e 100644
--- a/src/designer/src/uitools/quiloader.cpp
+++ b/src/designer/src/uitools/quiloader.cpp
@@ -242,7 +242,7 @@ public:
{
}
- virtual bool eventFilter(QObject *o, QEvent *event)
+ bool eventFilter(QObject *o, QEvent *event) override
{
if (event->type() == QEvent::LanguageChange) {
const QList<QByteArray> &dynamicPropertyNames = o->dynamicPropertyNames();
diff --git a/src/designer/src/uitools/quiloader.h b/src/designer/src/uitools/quiloader.h
index 856c9c9ef..fb77993c0 100644
--- a/src/designer/src/uitools/quiloader.h
+++ b/src/designer/src/uitools/quiloader.h
@@ -70,7 +70,7 @@ class QUiLoader : public QObject
Q_OBJECT
public:
explicit QUiLoader(QObject *parent = nullptr);
- virtual ~QUiLoader();
+ ~QUiLoader() override;
QStringList pluginPaths() const;
void clearPluginPaths();
diff --git a/src/shared/deviceskin/deviceskin.h b/src/shared/deviceskin/deviceskin.h
index 52c4848c2..348119d96 100644
--- a/src/shared/deviceskin/deviceskin.h
+++ b/src/shared/deviceskin/deviceskin.h
@@ -129,10 +129,10 @@ protected slots:
void moveParent();
protected:
- virtual void paintEvent( QPaintEvent * );
- virtual void mousePressEvent( QMouseEvent *e );
- virtual void mouseMoveEvent( QMouseEvent *e );
- virtual void mouseReleaseEvent( QMouseEvent * );
+ void paintEvent(QPaintEvent *) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *) override;
private:
void calcRegions();
diff --git a/src/shared/findwidget/abstractfindwidget.cpp b/src/shared/findwidget/abstractfindwidget.cpp
index 188ed2c8a..d00a3fd97 100644
--- a/src/shared/findwidget/abstractfindwidget.cpp
+++ b/src/shared/findwidget/abstractfindwidget.cpp
@@ -192,9 +192,7 @@ AbstractFindWidget::AbstractFindWidget(FindFlags flags, QWidget *parent)
/*!
Destroys the AbstractFindWidget.
*/
-AbstractFindWidget::~AbstractFindWidget()
-{
-}
+AbstractFindWidget::~AbstractFindWidget() = default;
/*!
Returns the icon set to be used for the action that initiates a search.
diff --git a/src/shared/findwidget/abstractfindwidget.h b/src/shared/findwidget/abstractfindwidget.h
index 333f8021f..9560c2c5e 100644
--- a/src/shared/findwidget/abstractfindwidget.h
+++ b/src/shared/findwidget/abstractfindwidget.h
@@ -69,9 +69,9 @@ public:
Q_DECLARE_FLAGS(FindFlags, FindFlag)
explicit AbstractFindWidget(FindFlags flags = FindFlags(), QWidget *parent = 0);
- virtual ~AbstractFindWidget();
+ ~AbstractFindWidget() override;
- bool eventFilter(QObject *object, QEvent *e);
+ bool eventFilter(QObject *object, QEvent *e) override;
static QIcon findIconSet();
@@ -83,7 +83,7 @@ public slots:
void findCurrentText();
protected:
- void keyPressEvent(QKeyEvent *event);
+ void keyPressEvent(QKeyEvent *event) override;
private slots:
void updateButtons();
diff --git a/src/shared/findwidget/itemviewfindwidget.h b/src/shared/findwidget/itemviewfindwidget.h
index 59fdf4bb6..07b45a6de 100644
--- a/src/shared/findwidget/itemviewfindwidget.h
+++ b/src/shared/findwidget/itemviewfindwidget.h
@@ -61,8 +61,9 @@ public:
void setItemView(QAbstractItemView *itemView);
protected:
- virtual void deactivate();
- virtual void find(const QString &textToFind, bool skipCurrent, bool backward, bool *found, bool *wrapped);
+ void deactivate() override;
+ void find(const QString &textToFind, bool skipCurrent,
+ bool backward, bool *found, bool *wrapped) override;
private:
QModelIndex findHelper(const QString &textToFind, bool skipCurrent, bool backward,
diff --git a/src/shared/findwidget/texteditfindwidget.h b/src/shared/findwidget/texteditfindwidget.h
index e4eb2857f..6e676f41d 100644
--- a/src/shared/findwidget/texteditfindwidget.h
+++ b/src/shared/findwidget/texteditfindwidget.h
@@ -59,8 +59,9 @@ public:
void setTextEdit(QTextEdit *textEdit);
protected:
- virtual void deactivate();
- virtual void find(const QString &textToFind, bool skipCurrent, bool backward, bool *found, bool *wrapped);
+ void deactivate() override;
+ void find(const QString &textToFind, bool skipCurrent,
+ bool backward, bool *found, bool *wrapped) override;
private:
QTextEdit *m_textEdit;