summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Volkov <avolkov@astralinux.ru>2020-05-20 17:12:14 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-05-25 10:19:25 +0000
commite5fb9e4ceabc2f1bfd89d3b3cb0a69c7d74df5b8 (patch)
treee3d368798e8a5e7932e22f9fd765ce3bd87a3f63 /src
parent55e2298f3ff0130fddb09ccd1bcfddce61a8abdb (diff)
downloadqtquickcontrols-e5fb9e4ceabc2f1bfd89d3b3cb0a69c7d74df5b8.tar.gz
Add missing override
Change-Id: Iba896b0af174ed28a27413d7343427cf9b4600d3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit a2f9eaf552b58a258beb25d29691fff97276e198) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/controls/Private/qquickrangemodel_p.h4
-rw-r--r--src/controls/Private/qquickspinboxvalidator_p.h8
-rw-r--r--src/controls/Private/qquickstyleitem_p.h9
-rw-r--r--src/controls/Private/qquicktreemodeladaptor_p.h8
-rw-r--r--src/controls/Private/qquickwheelarea_p.h2
-rw-r--r--src/controls/plugin.h4
-rw-r--r--src/controls/qquickaction_p.h2
-rw-r--r--src/controls/qquickdesktopiconprovider_p.h2
-rw-r--r--src/controls/qquickmenu_p.h8
-rw-r--r--src/controls/qquickmenuitem_p.h14
-rw-r--r--src/controls/qquickmenuitemcontainer_p.h2
-rw-r--r--src/controls/qquickmenupopupwindow_p.h8
-rw-r--r--src/dialogs/Private/dialogsprivateplugin.cpp2
-rw-r--r--src/dialogs/Private/qquickfontlistmodel_p.h12
-rw-r--r--src/dialogs/Private/qquickwritingsystemlistmodel_p.h12
-rw-r--r--src/dialogs/plugin.cpp2
-rw-r--r--src/dialogs/qquickabstractcolordialog_p.h10
-rw-r--r--src/dialogs/qquickabstractfiledialog_p.h6
-rw-r--r--src/dialogs/qquickabstractfontdialog_p.h10
-rw-r--r--src/dialogs/qquickabstractmessagedialog_p.h6
-rw-r--r--src/dialogs/qquickcolordialog_p.h2
-rw-r--r--src/dialogs/qquickdialog_p.h12
-rw-r--r--src/dialogs/qquickfontdialog_p.h2
-rw-r--r--src/dialogs/qquickmessagedialog_p.h6
-rw-r--r--src/dialogs/qquickplatformcolordialog_p.h2
-rw-r--r--src/dialogs/qquickplatformfontdialog_p.h2
-rw-r--r--src/dialogs/qquickplatformmessagedialog_p.h2
-rw-r--r--src/extras/Private/qquickcircularprogressbar_p.h2
-rw-r--r--src/extras/Private/qquickflatprogressbar_p.h2
-rw-r--r--src/extras/Private/qquickmousethief_p.h2
-rw-r--r--src/extras/Styles/Flat/flatstyleplugin.h2
-rw-r--r--src/extras/plugin.h2
-rw-r--r--src/widgets/qmessageboxhelper_p.h10
-rw-r--r--src/widgets/qquickqcolordialog.cpp10
-rw-r--r--src/widgets/qquickqcolordialog_p.h2
-rw-r--r--src/widgets/qquickqfontdialog.cpp10
-rw-r--r--src/widgets/qquickqfontdialog_p.h2
-rw-r--r--src/widgets/qquickqmessagebox_p.h2
-rw-r--r--src/widgets/widgetsplugin.cpp2
39 files changed, 104 insertions, 103 deletions
diff --git a/src/controls/Private/qquickrangemodel_p.h b/src/controls/Private/qquickrangemodel_p.h
index e5796725..6fb2c525 100644
--- a/src/controls/Private/qquickrangemodel_p.h
+++ b/src/controls/Private/qquickrangemodel_p.h
@@ -92,8 +92,8 @@ public:
Q_INVOKABLE qreal valueForPosition(qreal position) const;
Q_INVOKABLE qreal positionForValue(qreal value) const;
- void classBegin();
- void componentComplete();
+ void classBegin() override;
+ void componentComplete() override;
public Q_SLOTS:
void toMinimum();
diff --git a/src/controls/Private/qquickspinboxvalidator_p.h b/src/controls/Private/qquickspinboxvalidator_p.h
index baaeb1b3..4b92ead3 100644
--- a/src/controls/Private/qquickspinboxvalidator_p.h
+++ b/src/controls/Private/qquickspinboxvalidator_p.h
@@ -87,11 +87,11 @@ public:
QString suffix() const;
void setSuffix(const QString &suffix);
- void fixup(QString &input) const;
- State validate(QString &input, int &pos) const;
+ void fixup(QString &input) const override;
+ State validate(QString &input, int &pos) const override;
- void classBegin() { }
- void componentComplete();
+ void classBegin() override { }
+ void componentComplete() override;
public Q_SLOTS:
void increment();
diff --git a/src/controls/Private/qquickstyleitem_p.h b/src/controls/Private/qquickstyleitem_p.h
index 19cc15cf..38af22f2 100644
--- a/src/controls/Private/qquickstyleitem_p.h
+++ b/src/controls/Private/qquickstyleitem_p.h
@@ -55,7 +55,7 @@ class QQuickTableRowImageProvider1 : public QQuickImageProvider
public:
QQuickTableRowImageProvider1()
: QQuickImageProvider(QQuickImageProvider::Pixmap) {}
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize);
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
};
class QQuickStyleItem1: public QQuickItem
@@ -245,9 +245,10 @@ Q_SIGNALS:
void textureHeightChanged(int h);
protected:
- virtual bool event(QEvent *);
- virtual QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *);
- virtual void updatePolish();
+ bool event(QEvent *)
+ override;
+ QSGNode *updatePaintNode(QSGNode *, UpdatePaintNodeData *) override;
+ void updatePolish() override;
private:
QSize sizeFromContents(int width, int height);
diff --git a/src/controls/Private/qquicktreemodeladaptor_p.h b/src/controls/Private/qquicktreemodeladaptor_p.h
index 6e926db2..9a272936 100644
--- a/src/controls/Private/qquicktreemodeladaptor_p.h
+++ b/src/controls/Private/qquicktreemodeladaptor_p.h
@@ -84,10 +84,10 @@ public:
ModelIndexRole
};
- QHash<int, QByteArray> roleNames() const;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- QVariant data(const QModelIndex &, int role) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role);
+ QHash<int, QByteArray> roleNames() const override;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &, int role) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role) override;
void clearModelData();
diff --git a/src/controls/Private/qquickwheelarea_p.h b/src/controls/Private/qquickwheelarea_p.h
index a11b78cf..6e7232d7 100644
--- a/src/controls/Private/qquickwheelarea_p.h
+++ b/src/controls/Private/qquickwheelarea_p.h
@@ -96,7 +96,7 @@ public:
bool isInverted() const;
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent *event);
+ void wheelEvent(QWheelEvent *event) override;
#endif
bool isAtXEnd() const;
diff --git a/src/controls/plugin.h b/src/controls/plugin.h
index 04fd0685..30ff5df9 100644
--- a/src/controls/plugin.h
+++ b/src/controls/plugin.h
@@ -56,8 +56,8 @@ class QtQuickControls1Plugin: public QQmlExtensionPlugin
Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
public:
QtQuickControls1Plugin(QObject *parent = 0);
- void registerTypes(const char *uri);
- void initializeEngine(QQmlEngine *engine, const char *uri);
+ void registerTypes(const char *uri) override;
+ void initializeEngine(QQmlEngine *engine, const char *uri) override;
private:
QString fileLocation() const;
bool isLoadedFromResource() const;
diff --git a/src/controls/qquickaction_p.h b/src/controls/qquickaction_p.h
index 97601a32..d3f8f909 100644
--- a/src/controls/qquickaction_p.h
+++ b/src/controls/qquickaction_p.h
@@ -109,7 +109,7 @@ public:
QVariant iconVariant() const { return QVariant(m_icon); }
void setIcon(const QIcon &icon) { m_icon = icon; emit iconChanged(); }
- bool event(QEvent *e);
+ bool event(QEvent *e) override;
public Q_SLOTS:
void trigger(QObject *source = 0);
diff --git a/src/controls/qquickdesktopiconprovider_p.h b/src/controls/qquickdesktopiconprovider_p.h
index 6e9e94a0..51448cda 100644
--- a/src/controls/qquickdesktopiconprovider_p.h
+++ b/src/controls/qquickdesktopiconprovider_p.h
@@ -54,7 +54,7 @@ public:
{
}
- QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize)
+ QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override
{
Q_UNUSED(requestedSize);
Q_UNUSED(size);
diff --git a/src/controls/qquickmenu_p.h b/src/controls/qquickmenu_p.h
index 0594f391..0aa64cf5 100644
--- a/src/controls/qquickmenu_p.h
+++ b/src/controls/qquickmenu_p.h
@@ -117,8 +117,8 @@ public:
QQuickMenu1(QObject *parent = 0);
virtual ~QQuickMenu1();
- void setVisible(bool);
- void setEnabled(bool);
+ void setVisible(bool) override;
+ void setEnabled(bool) override;
int selectedIndex() const { return m_selectedIndex; }
void setSelectedIndex(int index);
@@ -144,7 +144,7 @@ public:
QQuickItem *menuContentItem() const { return m_menuContentItem; }
bool popupVisible() const { return m_popupVisible; }
- bool isNative() { return m_platformMenu != 0; }
+ bool isNative() override { return m_platformMenu != 0; }
QRect popupGeometry() const;
@@ -166,7 +166,7 @@ protected Q_SLOTS:
void hideMenu();
void clearPopupWindow();
- void updateText();
+ void updateText() override;
void windowVisibleChanged(bool);
void platformMenuWindowVisibleChanged(bool);
diff --git a/src/controls/qquickmenuitem_p.h b/src/controls/qquickmenuitem_p.h
index ae7ed0e6..f615aebb 100644
--- a/src/controls/qquickmenuitem_p.h
+++ b/src/controls/qquickmenuitem_p.h
@@ -197,12 +197,12 @@ public:
QQuickMenuItem1(QObject *parent = 0);
~QQuickMenuItem1();
- void setEnabled(bool enabled);
+ void setEnabled(bool enabled) override;
- QString text() const;
+ QString text() const override;
- QUrl iconSource() const;
- QString iconName() const;
+ QUrl iconSource() const override;
+ QString iconName() const override;
QQuickAction1 *boundAction() { return m_boundAction; }
void setBoundAction(QQuickAction1 *a);
@@ -219,7 +219,7 @@ public:
QQuickExclusiveGroup1 *exclusiveGroup() const;
void setExclusiveGroup(QQuickExclusiveGroup1 *);
- void setParentMenu(QQuickMenu1 *parentMenu);
+ void setParentMenu(QQuickMenu1 *parentMenu) override;
protected Q_SLOTS:
void updateShortcut();
@@ -229,8 +229,8 @@ protected Q_SLOTS:
void unbindFromAction(QObject *action);
protected:
- QIcon icon() const;
- QQuickAction1 *action() const;
+ QIcon icon() const override;
+ QQuickAction1 *action() const override;
private:
QQuickAction1 *m_boundAction;
diff --git a/src/controls/qquickmenuitemcontainer_p.h b/src/controls/qquickmenuitemcontainer_p.h
index d0a2b560..c09fb3f5 100644
--- a/src/controls/qquickmenuitemcontainer_p.h
+++ b/src/controls/qquickmenuitemcontainer_p.h
@@ -59,7 +59,7 @@ public:
setParentMenu(0);
}
- void setParentMenu(QQuickMenu1 *parentMenu)
+ void setParentMenu(QQuickMenu1 *parentMenu) override
{
QQuickMenuBase1::setParentMenu(parentMenu);
for (QQuickMenuBase1 *item : qAsConst(m_menuItems))
diff --git a/src/controls/qquickmenupopupwindow_p.h b/src/controls/qquickmenupopupwindow_p.h
index 8ec6aa5c..15cc5b82 100644
--- a/src/controls/qquickmenupopupwindow_p.h
+++ b/src/controls/qquickmenupopupwindow_p.h
@@ -57,7 +57,7 @@ public:
void setParentWindow(QWindow *effectiveParentWindow, QQuickWindow *parentWindow);
void setGeometry(int posx, int posy, int w, int h);
- void setParentItem(QQuickItem *);
+ void setParentItem(QQuickItem *) override;
QQuickMenu1 *menu() const;
public Q_SLOTS:
@@ -71,9 +71,9 @@ Q_SIGNALS:
void willBeDeletedLater();
protected:
- void focusInEvent(QFocusEvent *);
- void exposeEvent(QExposeEvent *);
- bool shouldForwardEventAfterDismiss(QMouseEvent *) const;
+ void focusInEvent(QFocusEvent *) override;
+ void exposeEvent(QExposeEvent *) override;
+ bool shouldForwardEventAfterDismiss(QMouseEvent *) const override;
private:
QQuickItem *m_itemAt;
diff --git a/src/dialogs/Private/dialogsprivateplugin.cpp b/src/dialogs/Private/dialogsprivateplugin.cpp
index a785f388..bee329ee 100644
--- a/src/dialogs/Private/dialogsprivateplugin.cpp
+++ b/src/dialogs/Private/dialogsprivateplugin.cpp
@@ -51,7 +51,7 @@ class QtQuick2DialogsPrivatePlugin : public QQmlExtensionPlugin
public:
QtQuick2DialogsPrivatePlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
- virtual void registerTypes(const char *uri)
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Dialogs.Private"));
diff --git a/src/dialogs/Private/qquickfontlistmodel_p.h b/src/dialogs/Private/qquickfontlistmodel_p.h
index 73270e12..5792a658 100644
--- a/src/dialogs/Private/qquickfontlistmodel_p.h
+++ b/src/dialogs/Private/qquickfontlistmodel_p.h
@@ -73,10 +73,10 @@ public:
FontFamilyRole = Qt::UserRole + 1
};
- virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
- virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
- virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- virtual QHash<int, QByteArray> roleNames() const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ QHash<int, QByteArray> roleNames() const override;
int count() const { return rowCount(QModelIndex()); }
@@ -91,8 +91,8 @@ public:
Q_INVOKABLE QJSValue get(int index) const;
Q_INVOKABLE QJSValue pointSizes();
- virtual void classBegin();
- virtual void componentComplete();
+ void classBegin() override;
+ void componentComplete() override;
public Q_SLOTS:
void setScalableFonts(bool arg);
diff --git a/src/dialogs/Private/qquickwritingsystemlistmodel_p.h b/src/dialogs/Private/qquickwritingsystemlistmodel_p.h
index 8ece6586..407f84eb 100644
--- a/src/dialogs/Private/qquickwritingsystemlistmodel_p.h
+++ b/src/dialogs/Private/qquickwritingsystemlistmodel_p.h
@@ -68,10 +68,10 @@ public:
WritingSystemSampleRole = Qt::UserRole + 2
};
- virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
- virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
- virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- virtual QHash<int, QByteArray> roleNames() const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ QHash<int, QByteArray> roleNames() const override;
int count() const { return rowCount(QModelIndex()); }
@@ -79,8 +79,8 @@ public:
Q_INVOKABLE QJSValue get(int index) const;
- virtual void classBegin();
- virtual void componentComplete();
+ void classBegin() override;
+ void componentComplete() override;
Q_SIGNALS:
void writingSystemsChanged();
diff --git a/src/dialogs/plugin.cpp b/src/dialogs/plugin.cpp
index 68b4cf3b..9470c208 100644
--- a/src/dialogs/plugin.cpp
+++ b/src/dialogs/plugin.cpp
@@ -88,7 +88,7 @@ class QtQuick2DialogsPlugin : public QQmlExtensionPlugin
public:
QtQuick2DialogsPlugin() : QQmlExtensionPlugin(), m_useResources(true) { }
- virtual void registerTypes(const char *uri) {
+ void registerTypes(const char *uri) override {
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.Dialogs"));
bool hasTopLevelWindows = QGuiApplicationPrivate::platformIntegration()->
hasCapability(QPlatformIntegration::MultipleWindows);
diff --git a/src/dialogs/qquickabstractcolordialog_p.h b/src/dialogs/qquickabstractcolordialog_p.h
index 16b39c26..e65c2556 100644
--- a/src/dialogs/qquickabstractcolordialog_p.h
+++ b/src/dialogs/qquickabstractcolordialog_p.h
@@ -73,7 +73,7 @@ public:
QQuickAbstractColorDialog(QObject *parent = 0);
virtual ~QQuickAbstractColorDialog();
- virtual QString title() const;
+ QString title() const override;
bool showAlphaChannel() const;
QColor color() const { return m_color; }
QColor currentColor() const { return m_currentColor; }
@@ -83,9 +83,9 @@ public:
qreal currentAlpha() const { return m_currentColor.alphaF(); }
public Q_SLOTS:
- void setVisible(bool v);
- void setModality(Qt::WindowModality m);
- void setTitle(const QString &t);
+ void setVisible(bool v) override;
+ void setModality(Qt::WindowModality m) override;
+ void setTitle(const QString &t) override;
void setColor(QColor arg);
void setCurrentColor(QColor currentColor);
void setShowAlphaChannel(bool arg);
@@ -97,7 +97,7 @@ Q_SIGNALS:
void selectionAccepted();
protected Q_SLOTS:
- virtual void accept();
+ void accept() override;
protected:
QPlatformColorDialogHelper *m_dlgHelper;
diff --git a/src/dialogs/qquickabstractfiledialog_p.h b/src/dialogs/qquickabstractfiledialog_p.h
index e00db5be..ba62c04d 100644
--- a/src/dialogs/qquickabstractfiledialog_p.h
+++ b/src/dialogs/qquickabstractfiledialog_p.h
@@ -82,7 +82,7 @@ public:
QQuickAbstractFileDialog(QObject *parent = 0);
virtual ~QQuickAbstractFileDialog();
- virtual QString title() const;
+ QString title() const override;
bool selectExisting() const { return m_selectExisting; }
bool selectMultiple() const { return m_selectMultiple; }
bool selectFolder() const { return m_selectFolder; }
@@ -99,8 +99,8 @@ public:
QString defaultSuffix() const { return m_options->defaultSuffix(); }
public Q_SLOTS:
- void setVisible(bool v);
- void setTitle(const QString &t);
+ void setVisible(bool v) override;
+ void setTitle(const QString &t) override;
void setSelectExisting(bool s);
void setSelectMultiple(bool s);
void setSelectFolder(bool s);
diff --git a/src/dialogs/qquickabstractfontdialog_p.h b/src/dialogs/qquickabstractfontdialog_p.h
index f60c4ddb..b9c0380d 100644
--- a/src/dialogs/qquickabstractfontdialog_p.h
+++ b/src/dialogs/qquickabstractfontdialog_p.h
@@ -73,7 +73,7 @@ public:
QQuickAbstractFontDialog(QObject *parent = 0);
virtual ~QQuickAbstractFontDialog();
- virtual QString title() const;
+ QString title() const override;
bool scalableFonts() const;
bool nonScalableFonts() const;
bool monospacedFonts() const;
@@ -82,9 +82,9 @@ public:
QFont currentFont() const { return m_currentFont; }
public Q_SLOTS:
- void setVisible(bool v);
- void setModality(Qt::WindowModality m);
- void setTitle(const QString &t);
+ void setVisible(bool v) override;
+ void setModality(Qt::WindowModality m) override;
+ void setTitle(const QString &t) override;
void setFont(const QFont &arg);
void setCurrentFont(const QFont &arg);
void setScalableFonts(bool arg);
@@ -102,7 +102,7 @@ Q_SIGNALS:
void selectionAccepted();
protected Q_SLOTS:
- virtual void accept();
+ void accept() override;
protected:
QPlatformFontDialogHelper *m_dlgHelper;
diff --git a/src/dialogs/qquickabstractmessagedialog_p.h b/src/dialogs/qquickabstractmessagedialog_p.h
index 68d0c51e..e4bfa631 100644
--- a/src/dialogs/qquickabstractmessagedialog_p.h
+++ b/src/dialogs/qquickabstractmessagedialog_p.h
@@ -76,7 +76,7 @@ public:
QQuickAbstractMessageDialog(QObject *parent = 0);
virtual ~QQuickAbstractMessageDialog();
- virtual QString title() const { return m_options->windowTitle(); }
+ QString title() const override { return m_options->windowTitle(); }
QString text() const { return m_options->text(); }
QString informativeText() const { return m_options->informativeText(); }
QString detailedText() const { return m_options->detailedText(); }
@@ -98,8 +98,8 @@ public:
StandardButton clickedButton() const { return m_clickedButton; }
public Q_SLOTS:
- virtual void setVisible(bool v);
- virtual void setTitle(const QString &arg);
+ void setVisible(bool v) override;
+ void setTitle(const QString &arg) override;
void setText(const QString &arg);
void setInformativeText(const QString &arg);
void setDetailedText(const QString &arg);
diff --git a/src/dialogs/qquickcolordialog_p.h b/src/dialogs/qquickcolordialog_p.h
index 619b7b10..eb3ad5df 100644
--- a/src/dialogs/qquickcolordialog_p.h
+++ b/src/dialogs/qquickcolordialog_p.h
@@ -66,7 +66,7 @@ public:
~QQuickColorDialog();
protected:
- virtual QPlatformColorDialogHelper *helper() { return 0; }
+ QPlatformColorDialogHelper *helper() override { return 0; }
Q_DISABLE_COPY(QQuickColorDialog)
};
diff --git a/src/dialogs/qquickdialog_p.h b/src/dialogs/qquickdialog_p.h
index fec4ec9a..6c2083f1 100644
--- a/src/dialogs/qquickdialog_p.h
+++ b/src/dialogs/qquickdialog_p.h
@@ -78,11 +78,11 @@ public:
Q_INVOKABLE QJSValue __standardButtonsLeftModel();
Q_INVOKABLE QJSValue __standardButtonsRightModel();
- QString title() const { return m_title; }
- virtual void setVisible(bool v);
+ QString title() const override { return m_title; }
+ void setVisible(bool v) override;
public Q_SLOTS:
- virtual void setTitle(const QString &arg);
+ void setTitle(const QString &arg) override;
void setStandardButtons(StandardButtons buttons);
void click(QQuickAbstractDialog::StandardButton button);
@@ -98,12 +98,12 @@ Q_SIGNALS:
void reset();
protected:
- virtual QPlatformDialogHelper *helper() { return 0; }
+ QPlatformDialogHelper *helper() override { return 0; }
void click(QPlatformDialogHelper::StandardButton button, QPlatformDialogHelper::ButtonRole);
protected Q_SLOTS:
- virtual void accept();
- virtual void reject();
+ void accept() override;
+ void reject() override;
private:
void updateStandardButtons();
diff --git a/src/dialogs/qquickfontdialog_p.h b/src/dialogs/qquickfontdialog_p.h
index bd04f536..df9fcafa 100644
--- a/src/dialogs/qquickfontdialog_p.h
+++ b/src/dialogs/qquickfontdialog_p.h
@@ -66,7 +66,7 @@ public:
~QQuickFontDialog();
protected:
- virtual QPlatformFontDialogHelper *helper() { return 0; }
+ QPlatformFontDialogHelper *helper() override { return 0; }
Q_DISABLE_COPY(QQuickFontDialog)
};
diff --git a/src/dialogs/qquickmessagedialog_p.h b/src/dialogs/qquickmessagedialog_p.h
index 3b79f967..4f23e677 100644
--- a/src/dialogs/qquickmessagedialog_p.h
+++ b/src/dialogs/qquickmessagedialog_p.h
@@ -66,11 +66,11 @@ public:
~QQuickMessageDialog();
protected:
- virtual QPlatformDialogHelper *helper() { return 0; }
+ QPlatformDialogHelper *helper() override { return 0; }
protected Q_SLOTS:
- virtual void accept();
- virtual void reject();
+ void accept() override;
+ void reject() override;
private:
Q_DISABLE_COPY(QQuickMessageDialog)
diff --git a/src/dialogs/qquickplatformcolordialog_p.h b/src/dialogs/qquickplatformcolordialog_p.h
index d4d79d42..625affcb 100644
--- a/src/dialogs/qquickplatformcolordialog_p.h
+++ b/src/dialogs/qquickplatformcolordialog_p.h
@@ -64,7 +64,7 @@ public:
virtual ~QQuickPlatformColorDialog1();
protected:
- QPlatformColorDialogHelper *helper();
+ QPlatformColorDialogHelper *helper() override;
Q_DISABLE_COPY(QQuickPlatformColorDialog1)
};
diff --git a/src/dialogs/qquickplatformfontdialog_p.h b/src/dialogs/qquickplatformfontdialog_p.h
index 096f26b2..8fb97158 100644
--- a/src/dialogs/qquickplatformfontdialog_p.h
+++ b/src/dialogs/qquickplatformfontdialog_p.h
@@ -64,7 +64,7 @@ public:
virtual ~QQuickPlatformFontDialog1();
protected:
- QPlatformFontDialogHelper *helper();
+ QPlatformFontDialogHelper *helper() override;
Q_DISABLE_COPY(QQuickPlatformFontDialog1)
};
diff --git a/src/dialogs/qquickplatformmessagedialog_p.h b/src/dialogs/qquickplatformmessagedialog_p.h
index 045dabd0..2a2f3d9b 100644
--- a/src/dialogs/qquickplatformmessagedialog_p.h
+++ b/src/dialogs/qquickplatformmessagedialog_p.h
@@ -64,7 +64,7 @@ public:
virtual ~QQuickPlatformMessageDialog1();
protected:
- QPlatformMessageDialogHelper *helper();
+ QPlatformMessageDialogHelper *helper() override;
Q_DISABLE_COPY(QQuickPlatformMessageDialog1)
};
diff --git a/src/extras/Private/qquickcircularprogressbar_p.h b/src/extras/Private/qquickcircularprogressbar_p.h
index 5448d159..e2d77268 100644
--- a/src/extras/Private/qquickcircularprogressbar_p.h
+++ b/src/extras/Private/qquickcircularprogressbar_p.h
@@ -59,7 +59,7 @@ public:
QQuickCircularProgressBar(QQuickItem *parent = 0);
~QQuickCircularProgressBar();
- void paint(QPainter *painter);
+ void paint(QPainter *painter) override;
qreal progress() const;
void setProgress(qreal progress);
diff --git a/src/extras/Private/qquickflatprogressbar_p.h b/src/extras/Private/qquickflatprogressbar_p.h
index 8630561c..8b0bfffc 100644
--- a/src/extras/Private/qquickflatprogressbar_p.h
+++ b/src/extras/Private/qquickflatprogressbar_p.h
@@ -53,7 +53,7 @@ class QQuickFlatProgressBar : public QQuickPaintedItem
public:
explicit QQuickFlatProgressBar(QQuickItem *parent = 0);
- void paint(QPainter *painter);
+ void paint(QPainter *painter) override;
qreal stripeOffset() const;
void setStripeOffset(qreal stripeOffset);
diff --git a/src/extras/Private/qquickmousethief_p.h b/src/extras/Private/qquickmousethief_p.h
index 6f289ff6..2622ecb0 100644
--- a/src/extras/Private/qquickmousethief_p.h
+++ b/src/extras/Private/qquickmousethief_p.h
@@ -74,7 +74,7 @@ signals:
void handledEventChanged();
protected:
- bool eventFilter(QObject *obj, QEvent *event);
+ bool eventFilter(QObject *obj, QEvent *event) override;
private slots:
void itemWindowChanged(QQuickWindow *window);
private:
diff --git a/src/extras/Styles/Flat/flatstyleplugin.h b/src/extras/Styles/Flat/flatstyleplugin.h
index 80261e14..61eef5d5 100644
--- a/src/extras/Styles/Flat/flatstyleplugin.h
+++ b/src/extras/Styles/Flat/flatstyleplugin.h
@@ -53,7 +53,7 @@ class QtQuickExtrasStylesPlugin : public QQmlExtensionPlugin
public:
explicit QtQuickExtrasStylesPlugin(QObject *parent = 0);
- void registerTypes(const char *uri);
+ void registerTypes(const char *uri) override;
};
QT_END_NAMESPACE
diff --git a/src/extras/plugin.h b/src/extras/plugin.h
index 5f0a380e..11fcaf9b 100644
--- a/src/extras/plugin.h
+++ b/src/extras/plugin.h
@@ -53,7 +53,7 @@ class QtQuickExtrasPlugin : public QQmlExtensionPlugin
public:
explicit QtQuickExtrasPlugin(QObject *parent = 0);
- void registerTypes(const char *uri);
+ void registerTypes(const char *uri) override;
};
QT_END_NAMESPACE
diff --git a/src/widgets/qmessageboxhelper_p.h b/src/widgets/qmessageboxhelper_p.h
index cdc4b9e2..5aeb7230 100644
--- a/src/widgets/qmessageboxhelper_p.h
+++ b/src/widgets/qmessageboxhelper_p.h
@@ -61,12 +61,12 @@ class QCloseableMessageBox : public QMessageBox
public:
QCloseableMessageBox(QWidget *parent = 0) : QMessageBox(parent) { }
- void closeEvent(QCloseEvent *e) {
+ void closeEvent(QCloseEvent *e) override {
// QTBUG-36227: Bypass QMessageBox::closeEvent()
QDialog::closeEvent(e);
}
- void keyPressEvent(QKeyEvent *e) {
+ void keyPressEvent(QKeyEvent *e) override {
QMessageBox::keyPressEvent(e);
// QTBUG-36227: reject on escape or cmd-period even if there's no cancel button
if ((isVisible() && e->key() == Qt::Key_Escape)
@@ -88,9 +88,9 @@ public:
connect(&m_dialog, SIGNAL(buttonClicked(QAbstractButton*)), this, SLOT(buttonClicked(QAbstractButton*)));
}
- virtual void exec() { m_dialog.exec(); }
+ void exec() override { m_dialog.exec(); }
- virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) {
+ bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) override {
m_dialog.winId();
QWindow *window = m_dialog.windowHandle();
Q_ASSERT(window);
@@ -113,7 +113,7 @@ public:
return m_dialog.isVisible();
}
- virtual void hide() { m_dialog.hide(); }
+ void hide() override { m_dialog.hide(); }
QCloseableMessageBox m_dialog;
diff --git a/src/widgets/qquickqcolordialog.cpp b/src/widgets/qquickqcolordialog.cpp
index 609c023f..996c0708 100644
--- a/src/widgets/qquickqcolordialog.cpp
+++ b/src/widgets/qquickqcolordialog.cpp
@@ -60,12 +60,12 @@ public:
connect(&m_dialog, SIGNAL(rejected()), this, SIGNAL(reject()));
}
- virtual void setCurrentColor(const QColor &c) { m_dialog.setCurrentColor(c); }
- virtual QColor currentColor() const { return m_dialog.currentColor(); }
+ void setCurrentColor(const QColor &c) override { m_dialog.setCurrentColor(c); }
+ QColor currentColor() const override { return m_dialog.currentColor(); }
- virtual void exec() { m_dialog.exec(); }
+ void exec() override { m_dialog.exec(); }
- virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) {
+ bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) override {
m_dialog.winId();
QWindow *window = m_dialog.windowHandle();
Q_ASSERT(window);
@@ -78,7 +78,7 @@ public:
return m_dialog.isVisible();
}
- virtual void hide() { m_dialog.hide(); }
+ void hide() override { m_dialog.hide(); }
private:
QColorDialog m_dialog;
diff --git a/src/widgets/qquickqcolordialog_p.h b/src/widgets/qquickqcolordialog_p.h
index 94804c13..91abf84c 100644
--- a/src/widgets/qquickqcolordialog_p.h
+++ b/src/widgets/qquickqcolordialog_p.h
@@ -64,7 +64,7 @@ public:
virtual ~QQuickQColorDialog();
protected:
- QPlatformColorDialogHelper *helper();
+ QPlatformColorDialogHelper *helper() override;
Q_DISABLE_COPY(QQuickQColorDialog)
};
diff --git a/src/widgets/qquickqfontdialog.cpp b/src/widgets/qquickqfontdialog.cpp
index bc730a94..505fdc8a 100644
--- a/src/widgets/qquickqfontdialog.cpp
+++ b/src/widgets/qquickqfontdialog.cpp
@@ -60,12 +60,12 @@ public:
connect(&m_dialog, SIGNAL(rejected()), this, SIGNAL(reject()));
}
- virtual void setCurrentFont(const QFont &font) { m_dialog.setCurrentFont(font); }
- virtual QFont currentFont() const { return m_dialog.currentFont(); }
+ void setCurrentFont(const QFont &font) override { m_dialog.setCurrentFont(font); }
+ QFont currentFont() const override { return m_dialog.currentFont(); }
- virtual void exec() { m_dialog.exec(); }
+ void exec() override { m_dialog.exec(); }
- virtual bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) {
+ bool show(Qt::WindowFlags f, Qt::WindowModality m, QWindow *parent) override {
m_dialog.winId();
QWindow *window = m_dialog.windowHandle();
Q_ASSERT(window);
@@ -80,7 +80,7 @@ public:
return m_dialog.isVisible();
}
- virtual void hide() { m_dialog.hide(); }
+ void hide() override { m_dialog.hide(); }
private:
QFontDialog m_dialog;
diff --git a/src/widgets/qquickqfontdialog_p.h b/src/widgets/qquickqfontdialog_p.h
index a320299d..4d1b336a 100644
--- a/src/widgets/qquickqfontdialog_p.h
+++ b/src/widgets/qquickqfontdialog_p.h
@@ -64,7 +64,7 @@ public:
virtual ~QQuickQFontDialog();
protected:
- QPlatformFontDialogHelper *helper();
+ QPlatformFontDialogHelper *helper() override;
Q_DISABLE_COPY(QQuickQFontDialog)
};
diff --git a/src/widgets/qquickqmessagebox_p.h b/src/widgets/qquickqmessagebox_p.h
index 0972b149..4ff7c0af 100644
--- a/src/widgets/qquickqmessagebox_p.h
+++ b/src/widgets/qquickqmessagebox_p.h
@@ -62,7 +62,7 @@ public:
virtual ~QQuickQMessageBox();
protected:
- virtual QPlatformDialogHelper *helper();
+ QPlatformDialogHelper *helper() override;
protected:
Q_DISABLE_COPY(QQuickQMessageBox)
diff --git a/src/widgets/widgetsplugin.cpp b/src/widgets/widgetsplugin.cpp
index 6617319b..b307c7e9 100644
--- a/src/widgets/widgetsplugin.cpp
+++ b/src/widgets/widgetsplugin.cpp
@@ -81,7 +81,7 @@ class QtQuick2PrivateWidgetsPlugin : public QQmlExtensionPlugin
public:
QtQuick2PrivateWidgetsPlugin(QObject *parent = 0) : QQmlExtensionPlugin(parent) { }
- virtual void registerTypes(const char *uri)
+ void registerTypes(const char *uri) override
{
Q_ASSERT(QLatin1String(uri) == QLatin1String("QtQuick.PrivateWidgets"));
#if QT_CONFIG(messagebox)