summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2017-09-18 10:36:49 +0200
committerKevin Funk <kevin.funk@kdab.com>2017-09-19 11:53:42 +0000
commit47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 (patch)
tree330914ff8225867e19b9ed5e049813d9f1e5ec08 /src/widgets/dialogs
parent93dd85141b35460a83dac86083581ba1c1975927 (diff)
Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp68
-rw-r--r--src/widgets/dialogs/qcolordialog.h6
-rw-r--r--src/widgets/dialogs/qerrormessage.cpp4
-rw-r--r--src/widgets/dialogs/qerrormessage.h4
-rw-r--r--src/widgets/dialogs/qfiledialog.h8
-rw-r--r--src/widgets/dialogs/qfiledialog_p.h22
-rw-r--r--src/widgets/dialogs/qfileinfogatherer_p.h2
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.h38
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp2
-rw-r--r--src/widgets/dialogs/qfontdialog.h8
-rw-r--r--src/widgets/dialogs/qfontdialog_p.h6
-rw-r--r--src/widgets/dialogs/qfscompleter_p.h4
-rw-r--r--src/widgets/dialogs/qinputdialog.cpp8
-rw-r--r--src/widgets/dialogs/qinputdialog.h8
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp10
-rw-r--r--src/widgets/dialogs/qmessagebox.h12
-rw-r--r--src/widgets/dialogs/qprogressdialog.h10
-rw-r--r--src/widgets/dialogs/qsidebar_p.h20
-rw-r--r--src/widgets/dialogs/qwizard.cpp4
-rw-r--r--src/widgets/dialogs/qwizard.h14
20 files changed, 129 insertions, 129 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index 9465575b3b..8cc0812125 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -132,7 +132,7 @@ public:
bool handleColorPickingMouseButtonRelease(QMouseEvent *e);
bool handleColorPickingKeyPress(QKeyEvent *e);
- bool canBeNativeDialog() const Q_DECL_OVERRIDE;
+ bool canBeNativeDialog() const override;
QWellArray *custom;
QWellArray *standard;
@@ -165,8 +165,8 @@ public:
#endif
private:
- virtual void initHelper(QPlatformDialogHelper *h) Q_DECL_OVERRIDE;
- virtual void helperPrepareShow(QPlatformDialogHelper *h) Q_DECL_OVERRIDE;
+ virtual void initHelper(QPlatformDialogHelper *h) override;
+ virtual void helperPrepareShow(QPlatformDialogHelper *h) override;
};
//////////// QWellArray BEGIN
@@ -190,7 +190,7 @@ public:
virtual void setCurrent(int row, int col);
virtual void setSelected(int row, int col);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
inline int cellWidth() const
{ return cellw; }
@@ -240,12 +240,12 @@ protected:
virtual void paintCell(QPainter *, int row, int col, const QRect&);
virtual void paintCellContents(QPainter *, int row, int col, const QRect&);
- void mousePressEvent(QMouseEvent*) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent*) Q_DECL_OVERRIDE;
- void focusInEvent(QFocusEvent*) Q_DECL_OVERRIDE;
- void focusOutEvent(QFocusEvent*) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent*) override;
+ void mouseReleaseEvent(QMouseEvent*) override;
+ void keyPressEvent(QKeyEvent*) override;
+ void focusInEvent(QFocusEvent*) override;
+ void focusOutEvent(QFocusEvent*) override;
+ void paintEvent(QPaintEvent *) override;
private:
Q_DISABLE_COPY(QWellArray)
@@ -493,7 +493,7 @@ class QColorPickingEventFilter : public QObject {
public:
explicit QColorPickingEventFilter(QColorDialogPrivate *dp, QObject *parent = 0) : QObject(parent), m_dp(dp) {}
- bool eventFilter(QObject *, QEvent *event) Q_DECL_OVERRIDE
+ bool eventFilter(QObject *, QEvent *event) override
{
switch (event->type()) {
case QEvent::MouseMove:
@@ -584,15 +584,15 @@ public:
{ setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); }
protected:
- void paintCellContents(QPainter *, int row, int col, const QRect&) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void paintCellContents(QPainter *, int row, int col, const QRect&) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE;
- void dragMoveEvent(QDragMoveEvent *e) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *e) override;
+ void dragLeaveEvent(QDragLeaveEvent *e) override;
+ void dragMoveEvent(QDragMoveEvent *e) override;
+ void dropEvent(QDropEvent *e) override;
#endif
private:
@@ -706,11 +706,11 @@ signals:
void newCol(int h, int s);
protected:
- QSize sizeHint() const Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *) Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
+ void paintEvent(QPaintEvent*) override;
+ void mouseMoveEvent(QMouseEvent *) override;
+ void mousePressEvent(QMouseEvent *) override;
+ void resizeEvent(QResizeEvent *) override;
private:
int hue;
@@ -743,9 +743,9 @@ signals:
void newHsv(int h, int s, int v);
protected:
- void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent*) override;
+ void mouseMoveEvent(QMouseEvent *) override;
+ void mousePressEvent(QMouseEvent *) override;
private:
enum { foff = 3, coff = 4 }; //frame and contents offset
@@ -1065,14 +1065,14 @@ signals:
void colorDropped(QRgb);
protected:
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *) override;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE;
- void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE;
- void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *e) override;
+ void dragLeaveEvent(QDragLeaveEvent *e) override;
+ void dropEvent(QDropEvent *e) override;
#endif
private:
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h
index a27cfaf953..daad20710c 100644
--- a/src/widgets/dialogs/qcolordialog.h
+++ b/src/widgets/dialogs/qcolordialog.h
@@ -85,7 +85,7 @@ public:
using QDialog::open;
void open(QObject *receiver, const char *member);
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
static QColor getColor(const QColor &initial = Qt::white,
QWidget *parent = Q_NULLPTR,
@@ -106,8 +106,8 @@ Q_SIGNALS:
void colorSelected(const QColor &color);
protected:
- void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
- void done(int result) Q_DECL_OVERRIDE;
+ void changeEvent(QEvent *event) override;
+ void done(int result) override;
private:
Q_DISABLE_COPY(QColorDialog)
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index 39035b743d..fd68f19680 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -95,8 +95,8 @@ public:
QErrorMessageTextView(QWidget *parent)
: QTextEdit(parent) { setReadOnly(true); }
- virtual QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- virtual QSize sizeHint() const Q_DECL_OVERRIDE;
+ virtual QSize minimumSizeHint() const override;
+ virtual QSize sizeHint() const override;
};
} // unnamed namespace
diff --git a/src/widgets/dialogs/qerrormessage.h b/src/widgets/dialogs/qerrormessage.h
index 4cb1fad845..8b350eefee 100644
--- a/src/widgets/dialogs/qerrormessage.h
+++ b/src/widgets/dialogs/qerrormessage.h
@@ -65,8 +65,8 @@ public Q_SLOTS:
void showMessage(const QString &message, const QString &type);
protected:
- void done(int) Q_DECL_OVERRIDE;
- void changeEvent(QEvent *e) Q_DECL_OVERRIDE;
+ void done(int) override;
+ void changeEvent(QEvent *e) override;
private:
Q_DISABLE_COPY(QErrorMessage)
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index b9092e036d..9f331101d1 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -190,7 +190,7 @@ public:
using QDialog::open;
void open(QObject *receiver, const char *member);
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
Q_SIGNALS:
void fileSelected(const QString &file);
@@ -266,9 +266,9 @@ public:
protected:
QFileDialog(const QFileDialogArgs &args);
- void done(int result) Q_DECL_OVERRIDE;
- void accept() Q_DECL_OVERRIDE;
- void changeEvent(QEvent *e) Q_DECL_OVERRIDE;
+ void done(int result) override;
+ void accept() override;
+ void changeEvent(QEvent *e) override;
private:
Q_DECLARE_PRIVATE(QFileDialog)
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index f7a3c6b091..db54bd39cb 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -252,7 +252,7 @@ public:
// setVisible_sys returns true if it ends up showing a native
// dialog. Returning false means that a non-native dialog must be
// used instead.
- bool canBeNativeDialog() const Q_DECL_OVERRIDE;
+ bool canBeNativeDialog() const override;
inline bool usingWidgets() const;
inline void setDirectory_sys(const QUrl &directory);
@@ -284,9 +284,9 @@ public:
~QFileDialogPrivate();
private:
- virtual void initHelper(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
- virtual void helperPrepareShow(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
- virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ virtual void initHelper(QPlatformDialogHelper *) override;
+ virtual void helperPrepareShow(QPlatformDialogHelper *) override;
+ virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) override;
Q_DISABLE_COPY(QFileDialogPrivate)
};
@@ -296,7 +296,7 @@ class QFileDialogLineEdit : public QLineEdit
public:
QFileDialogLineEdit(QWidget *parent = 0) : QLineEdit(parent), d_ptr(0){}
void setFileDialogPrivate(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *e) override;
bool hideOnEsc;
private:
QFileDialogPrivate *d_ptr;
@@ -307,10 +307,10 @@ class QFileDialogComboBox : public QComboBox
public:
QFileDialogComboBox(QWidget *parent = 0) : QComboBox(parent), urlModel(0) {}
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
- void showPopup() Q_DECL_OVERRIDE;
+ void showPopup() override;
void setHistory(const QStringList &paths);
QStringList history() const { return m_history; }
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *) override;
private:
QUrlModel *urlModel;
@@ -323,9 +323,9 @@ class QFileDialogListView : public QListView
public:
QFileDialogListView(QWidget *parent = 0);
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
protected:
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *e) override;
private:
QFileDialogPrivate *d_ptr;
};
@@ -335,10 +335,10 @@ class QFileDialogTreeView : public QTreeView
public:
QFileDialogTreeView(QWidget *parent);
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
protected:
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *e) override;
private:
QFileDialogPrivate *d_ptr;
};
diff --git a/src/widgets/dialogs/qfileinfogatherer_p.h b/src/widgets/dialogs/qfileinfogatherer_p.h
index 52578126de..1e97cc3558 100644
--- a/src/widgets/dialogs/qfileinfogatherer_p.h
+++ b/src/widgets/dialogs/qfileinfogatherer_p.h
@@ -185,7 +185,7 @@ private Q_SLOTS:
void driveRemoved();
private:
- void run() Q_DECL_OVERRIDE;
+ void run() override;
// called by run():
void getFileInfos(const QString &path, const QStringList &files);
void fetch(const QFileInfo &info, QElapsedTimer &base, bool &firstTime, QVector<QPair<QString, QFileInfo> > &updatedFiles, const QString &path);
diff --git a/src/widgets/dialogs/qfilesystemmodel.h b/src/widgets/dialogs/qfilesystemmodel.h
index a5f23c9220..5862006e60 100644
--- a/src/widgets/dialogs/qfilesystemmodel.h
+++ b/src/widgets/dialogs/qfilesystemmodel.h
@@ -78,33 +78,33 @@ public:
explicit QFileSystemModel(QObject *parent = Q_NULLPTR);
~QFileSystemModel();
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex index(const QString &path, int column = 0) const;
- QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
+ QModelIndex parent(const QModelIndex &child) const override;
using QObject::parent;
- QModelIndex sibling(int row, int column, const QModelIndex &idx) const Q_DECL_OVERRIDE;
- bool hasChildren(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- bool canFetchMore(const QModelIndex &parent) const Q_DECL_OVERRIDE;
- void fetchMore(const QModelIndex &parent) Q_DECL_OVERRIDE;
+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
+ bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
+ bool canFetchMore(const QModelIndex &parent) const override;
+ void fetchMore(const QModelIndex &parent) override;
- int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant myComputer(int role = Qt::DisplayRole) const;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
- void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) Q_DECL_OVERRIDE;
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
- QStringList mimeTypes() const Q_DECL_OVERRIDE;
- QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
+ QStringList mimeTypes() const override;
+ QMimeData *mimeData(const QModelIndexList &indexes) const override;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
- Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
+ int row, int column, const QModelIndex &parent) override;
+ Qt::DropActions supportedDropActions() const override;
// QFileSystemModel specific API
QModelIndex setRootPath(const QString &path);
@@ -145,8 +145,8 @@ public:
protected:
QFileSystemModel(QFileSystemModelPrivate &, QObject *parent = Q_NULLPTR);
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
+ bool event(QEvent *event) override;
private:
Q_DECLARE_PRIVATE(QFileSystemModel)
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index 587e31d8c5..5f912c582f 100644
--- a/src/widgets/dialogs/qfontdialog.cpp
+++ b/src/widgets/dialogs/qfontdialog.cpp
@@ -84,7 +84,7 @@ public:
int row = QListView::currentIndex().row();
return row < 0 ? QString() : model()->stringList().at(row);
}
- void currentChanged(const QModelIndex &current, const QModelIndex &previous) Q_DECL_OVERRIDE {
+ void currentChanged(const QModelIndex &current, const QModelIndex &previous) override {
QListView::currentChanged(current, previous);
if (current.isValid())
emit highlighted(current.row());
diff --git a/src/widgets/dialogs/qfontdialog.h b/src/widgets/dialogs/qfontdialog.h
index 3fb3997b85..c5a20340e1 100644
--- a/src/widgets/dialogs/qfontdialog.h
+++ b/src/widgets/dialogs/qfontdialog.h
@@ -89,7 +89,7 @@ public:
using QDialog::open;
void open(QObject *receiver, const char *member);
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
static QFont getFont(bool *ok, QWidget *parent = Q_NULLPTR);
static QFont getFont(bool *ok, const QFont &initial, QWidget *parent = Q_NULLPTR, const QString &title = QString(),
@@ -100,9 +100,9 @@ Q_SIGNALS:
void fontSelected(const QFont &font);
protected:
- void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
- void done(int result) Q_DECL_OVERRIDE;
- bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
+ void changeEvent(QEvent *event) override;
+ void done(int result) override;
+ bool eventFilter(QObject *object, QEvent *event) override;
private:
Q_DISABLE_COPY(QFontDialog)
diff --git a/src/widgets/dialogs/qfontdialog_p.h b/src/widgets/dialogs/qfontdialog_p.h
index ae923d94ed..202247a3b4 100644
--- a/src/widgets/dialogs/qfontdialog_p.h
+++ b/src/widgets/dialogs/qfontdialog_p.h
@@ -141,12 +141,12 @@ public:
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
- bool canBeNativeDialog() const Q_DECL_OVERRIDE;
+ bool canBeNativeDialog() const override;
void _q_runNativeAppModalPanel();
private:
- virtual void initHelper(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
- virtual void helperPrepareShow(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ virtual void initHelper(QPlatformDialogHelper *) override;
+ virtual void helperPrepareShow(QPlatformDialogHelper *) override;
};
QT_END_NAMESPACE
diff --git a/src/widgets/dialogs/qfscompleter_p.h b/src/widgets/dialogs/qfscompleter_p.h
index ce0612f293..3b829d4a52 100644
--- a/src/widgets/dialogs/qfscompleter_p.h
+++ b/src/widgets/dialogs/qfscompleter_p.h
@@ -71,8 +71,8 @@ public:
setCaseSensitivity(Qt::CaseInsensitive);
#endif
}
- QString pathFromIndex(const QModelIndex &index) const Q_DECL_OVERRIDE;
- QStringList splitPath(const QString& path) const Q_DECL_OVERRIDE;
+ QString pathFromIndex(const QModelIndex &index) const override;
+ QStringList splitPath(const QString& path) const override;
QAbstractProxyModel *proxyModel;
QFileSystemModel *sourceModel;
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index 4c0f22ae97..757b53e5ad 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -115,7 +115,7 @@ private slots:
void notifyTextChanged() { emit textChanged(hasAcceptableInput()); }
private:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE {
+ void keyPressEvent(QKeyEvent *event) override {
if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !hasAcceptableInput()) {
#ifndef QT_NO_PROPERTIES
setProperty("value", property("value"));
@@ -126,7 +126,7 @@ private:
notifyTextChanged();
}
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE {
+ void mousePressEvent(QMouseEvent *event) override {
QSpinBox::mousePressEvent(event);
notifyTextChanged();
}
@@ -150,7 +150,7 @@ private slots:
void notifyTextChanged() { emit textChanged(hasAcceptableInput()); }
private:
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE {
+ void keyPressEvent(QKeyEvent *event) override {
if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !hasAcceptableInput()) {
#ifndef QT_NO_PROPERTIES
setProperty("value", property("value"));
@@ -161,7 +161,7 @@ private:
notifyTextChanged();
}
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE {
+ void mousePressEvent(QMouseEvent *event) override {
QDoubleSpinBox::mousePressEvent(event);
notifyTextChanged();
}
diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h
index e41d442498..5c97a425b7 100644
--- a/src/widgets/dialogs/qinputdialog.h
+++ b/src/widgets/dialogs/qinputdialog.h
@@ -154,10 +154,10 @@ public:
using QDialog::open;
void open(QObject *receiver, const char *member);
- QSize minimumSizeHint() const Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize minimumSizeHint() const override;
+ QSize sizeHint() const override;
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
static QString getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode echo = QLineEdit::Normal,
@@ -206,7 +206,7 @@ Q_SIGNALS:
void doubleValueSelected(double value);
public:
- void done(int result) Q_DECL_OVERRIDE;
+ void done(int result) override;
private:
Q_DISABLE_COPY(QInputDialog)
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 0693f4bea8..4debdc114b 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -94,7 +94,7 @@ public:
public:
TextEdit(QWidget *parent=0) : QTextEdit(parent) { }
#ifndef QT_NO_CONTEXTMENU
- void contextMenuEvent(QContextMenuEvent * e) Q_DECL_OVERRIDE
+ void contextMenuEvent(QContextMenuEvent * e) override
{
QMenu *menu = createStandardContextMenu();
menu->setAttribute(Qt::WA_DeleteOnClose);
@@ -169,7 +169,7 @@ public:
void setLabel(DetailButtonLabel lbl)
{ setText(label(lbl)); }
- QSize sizeHint() const Q_DECL_OVERRIDE
+ QSize sizeHint() const override
{
ensurePolished();
QStyleOptionButton opt;
@@ -255,9 +255,9 @@ public:
QByteArray signalToDisconnectOnClose;
QSharedPointer<QMessageDialogOptions> options;
private:
- void initHelper(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
- void helperPrepareShow(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
- void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ void initHelper(QPlatformDialogHelper *) override;
+ void helperPrepareShow(QPlatformDialogHelper *) override;
+ void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) override;
};
void QMessageBoxPrivate::init(const QString &title, const QString &text)
diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h
index 6d5179602b..56f156c616 100644
--- a/src/widgets/dialogs/qmessagebox.h
+++ b/src/widgets/dialogs/qmessagebox.h
@@ -290,12 +290,12 @@ public Q_SLOTS:
#endif
protected:
- bool event(QEvent *e) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *e) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void showEvent(QShowEvent *event) override;
+ void closeEvent(QCloseEvent *event) override;
+ void keyPressEvent(QKeyEvent *event) override;
+ void changeEvent(QEvent *event) override;
private:
Q_PRIVATE_SLOT(d_func(), void _q_buttonClicked(QAbstractButton *))
diff --git a/src/widgets/dialogs/qprogressdialog.h b/src/widgets/dialogs/qprogressdialog.h
index 902a4de5d2..f6dcfdb2e9 100644
--- a/src/widgets/dialogs/qprogressdialog.h
+++ b/src/widgets/dialogs/qprogressdialog.h
@@ -85,7 +85,7 @@ public:
int value() const;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
QString labelText() const;
int minimumDuration() const;
@@ -113,10 +113,10 @@ Q_SIGNALS:
void canceled();
protected:
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void closeEvent(QCloseEvent *event) Q_DECL_OVERRIDE;
- void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
- void showEvent(QShowEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) override;
+ void closeEvent(QCloseEvent *event) override;
+ void changeEvent(QEvent *event) override;
+ void showEvent(QShowEvent *event) override;
protected Q_SLOTS:
void forceShow();
diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h
index 17d576e54d..58ac3569d5 100644
--- a/src/widgets/dialogs/qsidebar_p.h
+++ b/src/widgets/dialogs/qsidebar_p.h
@@ -69,7 +69,7 @@ class QSideBarDelegate : public QStyledItemDelegate
public:
QSideBarDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
void initStyleOption(QStyleOptionViewItem *option,
- const QModelIndex &index) const Q_DECL_OVERRIDE;
+ const QModelIndex &index) const override;
};
class Q_AUTOTEST_EXPORT QUrlModel : public QStandardItemModel
@@ -84,14 +84,14 @@ public:
QUrlModel(QObject *parent = 0);
- QStringList mimeTypes() const Q_DECL_OVERRIDE;
- QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
+ QStringList mimeTypes() const override;
+ QMimeData *mimeData(const QModelIndexList &indexes) const override;
#ifndef QT_NO_DRAGANDDROP
bool canDrop(QDragEnterEvent *event);
- bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override;
#endif
- Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
- bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) Q_DECL_OVERRIDE;
+ Qt::ItemFlags flags(const QModelIndex &index) const override;
+ bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override;
void setUrls(const QList<QUrl> &list);
void addUrls(const QList<QUrl> &urls, int row = -1, bool move = true);
@@ -131,7 +131,7 @@ public:
void setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUrls);
~QSidebar();
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const override;
void setUrls(const QList<QUrl> &list) { urlModel->setUrls(list); }
void addUrls(const QList<QUrl> &list, int row) { urlModel->addUrls(list, row); }
@@ -140,10 +140,10 @@ public:
void selectUrl(const QUrl &url);
protected:
- bool event(QEvent * e) Q_DECL_OVERRIDE;
- void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent * e) override;
+ void focusInEvent(QFocusEvent *event) override;
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
+ void dragEnterEvent(QDragEnterEvent *event) override;
#endif
private Q_SLOTS:
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index 3d9b6a3d62..f5dfe76c39 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -294,7 +294,7 @@ public:
Qt::TextFormat titleFormat, Qt::TextFormat subTitleFormat);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
#if QT_CONFIG(style_windowsvista)
private:
bool vistaDisabled() const;
@@ -450,7 +450,7 @@ public:
m_layout->addWidget(m_sideWidget);
}
- QSize minimumSizeHint() const Q_DECL_OVERRIDE {
+ QSize minimumSizeHint() const override {
if (pixmap() && !pixmap()->isNull())
return pixmap()->size();
return QFrame::minimumSizeHint();
diff --git a/src/widgets/dialogs/qwizard.h b/src/widgets/dialogs/qwizard.h
index 4d03bf91d4..1850d9e967 100644
--- a/src/widgets/dialogs/qwizard.h
+++ b/src/widgets/dialogs/qwizard.h
@@ -168,8 +168,8 @@ public:
void setDefaultProperty(const char *className, const char *property,
const char *changedSignal);
- void setVisible(bool visible) Q_DECL_OVERRIDE;
- QSize sizeHint() const Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
+ QSize sizeHint() const override;
Q_SIGNALS:
void currentIdChanged(int id);
@@ -184,13 +184,13 @@ public Q_SLOTS:
void restart();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
- void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
+ void resizeEvent(QResizeEvent *event) override;
+ void paintEvent(QPaintEvent *event) override;
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
- bool nativeEvent(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE;
+ bool nativeEvent(const QByteArray &eventType, void *message, long *result) override;
#endif
- void done(int result) Q_DECL_OVERRIDE;
+ void done(int result) override;
virtual void initializePage(int id);
virtual void cleanupPage(int id);