summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2014-11-16 13:09:01 +0100
committerOlivier Goffart <ogoffart@woboq.com>2014-12-03 09:57:11 +0100
commit5180f32c5abe01acd65cde68c2c16aedda4028ec (patch)
treea8ed3b4af80751cdc0442c750f2915bfa9c8af40 /src/widgets/dialogs
parent2e271795e7c460254a27ea617846ff7b598a7b9b (diff)
Add Q_DECL_OVERRIDE in the src subdirectory
Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qcolordialog.cpp60
-rw-r--r--src/widgets/dialogs/qcolordialog.h6
-rw-r--r--src/widgets/dialogs/qcolordialog_p.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/qfilesystemmodel.h36
-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.h12
20 files changed, 125 insertions, 125 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp
index b92e1a24ad..45cde3c966 100644
--- a/src/widgets/dialogs/qcolordialog.cpp
+++ b/src/widgets/dialogs/qcolordialog.cpp
@@ -83,7 +83,7 @@ public:
virtual void setCurrent(int row, int col);
virtual void setSelected(int row, int col);
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
virtual void setCellBrush(int row, int col, const QBrush &);
QBrush cellBrush(int row, int col);
@@ -136,12 +136,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*);
- void mouseReleaseEvent(QMouseEvent*);
- void keyPressEvent(QKeyEvent*);
- void focusInEvent(QFocusEvent*);
- void focusOutEvent(QFocusEvent*);
- void paintEvent(QPaintEvent *);
+ 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;
private:
Q_DISABLE_COPY(QWellArray)
@@ -513,15 +513,15 @@ public:
{ setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum)); }
protected:
- void paintCellContents(QPainter *, int row, int col, const QRect&);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ 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;
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QDragEnterEvent *e);
- void dragLeaveEvent(QDragLeaveEvent *e);
- void dragMoveEvent(QDragMoveEvent *e);
- void dropEvent(QDropEvent *e);
+ 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;
#endif
private:
@@ -634,11 +634,11 @@ signals:
void newCol(int h, int s);
protected:
- QSize sizeHint() const;
- void paintEvent(QPaintEvent*);
- void mouseMoveEvent(QMouseEvent *);
- void mousePressEvent(QMouseEvent *);
- void resizeEvent(QResizeEvent *);
+ 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;
private:
int hue;
@@ -670,9 +670,9 @@ signals:
void newHsv(int h, int s, int v);
protected:
- void paintEvent(QPaintEvent*);
- void mouseMoveEvent(QMouseEvent *);
- void mousePressEvent(QMouseEvent *);
+ void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *) Q_DECL_OVERRIDE;
private:
enum { foff = 3, coff = 4 }; //frame and contents offset
@@ -981,14 +981,14 @@ signals:
void colorDropped(QRgb);
protected:
- void paintEvent(QPaintEvent *);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ 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;
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QDragEnterEvent *e);
- void dragLeaveEvent(QDragLeaveEvent *e);
- void dropEvent(QDropEvent *e);
+ void dragEnterEvent(QDragEnterEvent *e) Q_DECL_OVERRIDE;
+ void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE;
+ void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE;
#endif
private:
diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h
index d23254a2b2..0f97cdd8c0 100644
--- a/src/widgets/dialogs/qcolordialog.h
+++ b/src/widgets/dialogs/qcolordialog.h
@@ -82,7 +82,7 @@ public:
#endif
void open(QObject *receiver, const char *member);
- void setVisible(bool visible);
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
static QColor getColor(const QColor &initial = Qt::white,
QWidget *parent = 0,
@@ -103,8 +103,8 @@ Q_SIGNALS:
void colorSelected(const QColor &color);
protected:
- void changeEvent(QEvent *event);
- void done(int result);
+ void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
+ void done(int result) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(QColorDialog)
diff --git a/src/widgets/dialogs/qcolordialog_p.h b/src/widgets/dialogs/qcolordialog_p.h
index af3ebe8925..c2d6f48f49 100644
--- a/src/widgets/dialogs/qcolordialog_p.h
+++ b/src/widgets/dialogs/qcolordialog_p.h
@@ -109,7 +109,7 @@ public:
bool handleColorPickingMouseButtonRelease(QMouseEvent *e);
bool handleColorPickingKeyPress(QKeyEvent *e);
- bool canBeNativeDialog() const;
+ bool canBeNativeDialog() const Q_DECL_OVERRIDE;
QWellArray *custom;
QWellArray *standard;
@@ -155,8 +155,8 @@ public:
void mac_nativeDialogModalHelp();
#endif
private:
- virtual void initHelper(QPlatformDialogHelper *h);
- virtual void helperPrepareShow(QPlatformDialogHelper *h);
+ virtual void initHelper(QPlatformDialogHelper *h) Q_DECL_OVERRIDE;
+ virtual void helperPrepareShow(QPlatformDialogHelper *h) Q_DECL_OVERRIDE;
};
#endif // QT_NO_COLORDIALOG
diff --git a/src/widgets/dialogs/qerrormessage.cpp b/src/widgets/dialogs/qerrormessage.cpp
index 6bab921d21..65da7e3928 100644
--- a/src/widgets/dialogs/qerrormessage.cpp
+++ b/src/widgets/dialogs/qerrormessage.cpp
@@ -84,8 +84,8 @@ public:
QErrorMessageTextView(QWidget *parent)
: QTextEdit(parent) { setReadOnly(true); }
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
+ virtual QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ virtual QSize sizeHint() const Q_DECL_OVERRIDE;
};
QSize QErrorMessageTextView::minimumSizeHint() const
diff --git a/src/widgets/dialogs/qerrormessage.h b/src/widgets/dialogs/qerrormessage.h
index 0925923d96..301fbc7f8d 100644
--- a/src/widgets/dialogs/qerrormessage.h
+++ b/src/widgets/dialogs/qerrormessage.h
@@ -58,8 +58,8 @@ public Q_SLOTS:
void showMessage(const QString &message, const QString &type);
protected:
- void done(int);
- void changeEvent(QEvent *e);
+ void done(int) Q_DECL_OVERRIDE;
+ void changeEvent(QEvent *e) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(QErrorMessage)
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index 70e498a2cd..12434ad944 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -180,7 +180,7 @@ public:
using QDialog::open;
#endif
void open(QObject *receiver, const char *member);
- void setVisible(bool visible);
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
Q_SIGNALS:
void fileSelected(const QString &file);
@@ -256,9 +256,9 @@ public:
protected:
QFileDialog(const QFileDialogArgs &args);
- void done(int result);
- void accept();
- void changeEvent(QEvent *e);
+ void done(int result) Q_DECL_OVERRIDE;
+ void accept() Q_DECL_OVERRIDE;
+ void changeEvent(QEvent *e) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QFileDialog)
diff --git a/src/widgets/dialogs/qfiledialog_p.h b/src/widgets/dialogs/qfiledialog_p.h
index cc2f481eb9..991d2a0f7a 100644
--- a/src/widgets/dialogs/qfiledialog_p.h
+++ b/src/widgets/dialogs/qfiledialog_p.h
@@ -243,7 +243,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;
+ bool canBeNativeDialog() const Q_DECL_OVERRIDE;
inline bool usingWidgets() const;
void setDirectory_sys(const QUrl &directory);
@@ -273,9 +273,9 @@ public:
~QFileDialogPrivate();
private:
- virtual void initHelper(QPlatformDialogHelper *);
- virtual void helperPrepareShow(QPlatformDialogHelper *);
- virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *);
+ virtual void initHelper(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ virtual void helperPrepareShow(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ virtual void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) Q_DECL_OVERRIDE;
Q_DISABLE_COPY(QFileDialogPrivate)
};
@@ -285,7 +285,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);
+ void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
bool hideOnEsc;
private:
QFileDialogPrivate *d_ptr;
@@ -296,10 +296,10 @@ class QFileDialogComboBox : public QComboBox
public:
QFileDialogComboBox(QWidget *parent = 0) : QComboBox(parent), urlModel(0) {}
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
- void showPopup();
+ void showPopup() Q_DECL_OVERRIDE;
void setHistory(const QStringList &paths);
QStringList history() const { return m_history; }
- void paintEvent(QPaintEvent *);
+ void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
private:
QUrlModel *urlModel;
@@ -312,9 +312,9 @@ class QFileDialogListView : public QListView
public:
QFileDialogListView(QWidget *parent = 0);
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
private:
QFileDialogPrivate *d_ptr;
};
@@ -324,10 +324,10 @@ class QFileDialogTreeView : public QTreeView
public:
QFileDialogTreeView(QWidget *parent);
void setFileDialogPrivate(QFileDialogPrivate *d_pointer);
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
protected:
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
private:
QFileDialogPrivate *d_ptr;
};
diff --git a/src/widgets/dialogs/qfilesystemmodel.h b/src/widgets/dialogs/qfilesystemmodel.h
index bde699d2a0..28c5660080 100644
--- a/src/widgets/dialogs/qfilesystemmodel.h
+++ b/src/widgets/dialogs/qfilesystemmodel.h
@@ -72,31 +72,31 @@ public:
explicit QFileSystemModel(QObject *parent = 0);
~QFileSystemModel();
- QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
+ QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex index(const QString &path, int column = 0) const;
- QModelIndex parent(const QModelIndex &child) const;
- bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
- bool canFetchMore(const QModelIndex &parent) const;
- void fetchMore(const QModelIndex &parent);
+ QModelIndex parent(const QModelIndex &child) 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;
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- int columnCount(const QModelIndex &parent = QModelIndex()) const;
+ int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
+ int columnCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QVariant myComputer(int role = Qt::DisplayRole) const;
- QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
+ 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 headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
- Qt::ItemFlags flags(const QModelIndex &index) const;
+ Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE;
- void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
+ void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) Q_DECL_OVERRIDE;
- QStringList mimeTypes() const;
- QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const Q_DECL_OVERRIDE;
+ QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
bool dropMimeData(const QMimeData *data, Qt::DropAction action,
- int row, int column, const QModelIndex &parent);
- Qt::DropActions supportedDropActions() const;
+ int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
+ Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE;
// QFileSystemModel specific API
QModelIndex setRootPath(const QString &path);
@@ -137,8 +137,8 @@ public:
protected:
QFileSystemModel(QFileSystemModelPrivate &, QObject *parent = 0);
- void timerEvent(QTimerEvent *event);
- bool event(QEvent *event);
+ void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
private:
Q_DECLARE_PRIVATE(QFileSystemModel)
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index d12b109d9f..5294e78bfe 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) {
+ void currentChanged(const QModelIndex &current, const QModelIndex &previous) Q_DECL_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 455b5d3f3e..b07655a3da 100644
--- a/src/widgets/dialogs/qfontdialog.h
+++ b/src/widgets/dialogs/qfontdialog.h
@@ -88,7 +88,7 @@ public:
#endif
void open(QObject *receiver, const char *member);
- void setVisible(bool visible);
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
static QFont getFont(bool *ok, QWidget *parent = 0);
static QFont getFont(bool *ok, const QFont &initial, QWidget *parent = 0, const QString &title = QString(),
@@ -99,9 +99,9 @@ Q_SIGNALS:
void fontSelected(const QFont &font);
protected:
- void changeEvent(QEvent *event);
- void done(int result);
- bool eventFilter(QObject *object, QEvent *event);
+ void changeEvent(QEvent *event) Q_DECL_OVERRIDE;
+ void done(int result) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(QFontDialog)
diff --git a/src/widgets/dialogs/qfontdialog_p.h b/src/widgets/dialogs/qfontdialog_p.h
index 3af6f9f29a..9e6adfbf27 100644
--- a/src/widgets/dialogs/qfontdialog_p.h
+++ b/src/widgets/dialogs/qfontdialog_p.h
@@ -135,12 +135,12 @@ public:
QPointer<QObject> receiverToDisconnectOnClose;
QByteArray memberToDisconnectOnClose;
- bool canBeNativeDialog() const;
+ bool canBeNativeDialog() const Q_DECL_OVERRIDE;
void _q_runNativeAppModalPanel();
private:
- virtual void initHelper(QPlatformDialogHelper *);
- virtual void helperPrepareShow(QPlatformDialogHelper *);
+ virtual void initHelper(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ virtual void helperPrepareShow(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
};
#endif // QT_NO_FONTDIALOG
diff --git a/src/widgets/dialogs/qfscompleter_p.h b/src/widgets/dialogs/qfscompleter_p.h
index a5871e34f7..4a75f59f26 100644
--- a/src/widgets/dialogs/qfscompleter_p.h
+++ b/src/widgets/dialogs/qfscompleter_p.h
@@ -62,8 +62,8 @@ public:
setCaseSensitivity(Qt::CaseInsensitive);
#endif
}
- QString pathFromIndex(const QModelIndex &index) const;
- QStringList splitPath(const QString& path) const;
+ QString pathFromIndex(const QModelIndex &index) const Q_DECL_OVERRIDE;
+ QStringList splitPath(const QString& path) const Q_DECL_OVERRIDE;
QAbstractProxyModel *proxyModel;
QFileSystemModel *sourceModel;
diff --git a/src/widgets/dialogs/qinputdialog.cpp b/src/widgets/dialogs/qinputdialog.cpp
index b52cebadfa..67ed741159 100644
--- a/src/widgets/dialogs/qinputdialog.cpp
+++ b/src/widgets/dialogs/qinputdialog.cpp
@@ -111,7 +111,7 @@ private slots:
void notifyTextChanged() { emit textChanged(hasAcceptableInput()); }
private:
- void keyPressEvent(QKeyEvent *event) {
+ void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE {
if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !hasAcceptableInput()) {
#ifndef QT_NO_PROPERTIES
setProperty("value", property("value"));
@@ -122,7 +122,7 @@ private:
notifyTextChanged();
}
- void mousePressEvent(QMouseEvent *event) {
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE {
QSpinBox::mousePressEvent(event);
notifyTextChanged();
}
@@ -146,7 +146,7 @@ private slots:
void notifyTextChanged() { emit textChanged(hasAcceptableInput()); }
private:
- void keyPressEvent(QKeyEvent *event) {
+ void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE {
if ((event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter) && !hasAcceptableInput()) {
#ifndef QT_NO_PROPERTIES
setProperty("value", property("value"));
@@ -157,7 +157,7 @@ private:
notifyTextChanged();
}
- void mousePressEvent(QMouseEvent *event) {
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE {
QDoubleSpinBox::mousePressEvent(event);
notifyTextChanged();
}
diff --git a/src/widgets/dialogs/qinputdialog.h b/src/widgets/dialogs/qinputdialog.h
index 4511e367d4..d1aa478e79 100644
--- a/src/widgets/dialogs/qinputdialog.h
+++ b/src/widgets/dialogs/qinputdialog.h
@@ -152,10 +152,10 @@ public:
#endif
void open(QObject *receiver, const char *member);
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
- void setVisible(bool visible);
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
static QString getText(QWidget *parent, const QString &title, const QString &label,
QLineEdit::EchoMode echo = QLineEdit::Normal,
@@ -195,7 +195,7 @@ Q_SIGNALS:
void doubleValueSelected(double value);
public:
- void done(int result);
+ void done(int result) Q_DECL_OVERRIDE;
private:
Q_DISABLE_COPY(QInputDialog)
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index effcef2bc9..e4862f16d1 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -89,7 +89,7 @@ public:
{
public:
TextEdit(QWidget *parent=0) : QTextEdit(parent) { }
- void contextMenuEvent(QContextMenuEvent * e)
+ void contextMenuEvent(QContextMenuEvent * e) Q_DECL_OVERRIDE
{
#ifndef QT_NO_CONTEXTMENU
QMenu *menu = createStandardContextMenu();
@@ -167,7 +167,7 @@ public:
void setLabel(DetailButtonLabel lbl)
{ setText(label(lbl)); }
- QSize sizeHint() const
+ QSize sizeHint() const Q_DECL_OVERRIDE
{
ensurePolished();
QStyleOptionButton opt;
@@ -256,9 +256,9 @@ public:
QByteArray signalToDisconnectOnClose;
QSharedPointer<QMessageDialogOptions> options;
private:
- void initHelper(QPlatformDialogHelper *);
- void helperPrepareShow(QPlatformDialogHelper *);
- void helperDone(QDialog::DialogCode, QPlatformDialogHelper *);
+ void initHelper(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ void helperPrepareShow(QPlatformDialogHelper *) Q_DECL_OVERRIDE;
+ void helperDone(QDialog::DialogCode, QPlatformDialogHelper *) Q_DECL_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 1b47e9c575..6cd3085cf9 100644
--- a/src/widgets/dialogs/qmessagebox.h
+++ b/src/widgets/dialogs/qmessagebox.h
@@ -293,12 +293,12 @@ public Q_SLOTS:
#endif
protected:
- bool event(QEvent *e);
- void resizeEvent(QResizeEvent *event);
- void showEvent(QShowEvent *event);
- void closeEvent(QCloseEvent *event);
- void keyPressEvent(QKeyEvent *event);
- void changeEvent(QEvent *event);
+ 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;
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 7547f06682..84a5f9e234 100644
--- a/src/widgets/dialogs/qprogressdialog.h
+++ b/src/widgets/dialogs/qprogressdialog.h
@@ -77,7 +77,7 @@ public:
int value() const;
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
QString labelText() const;
int minimumDuration() const;
@@ -111,10 +111,10 @@ Q_SIGNALS:
void canceled();
protected:
- void resizeEvent(QResizeEvent *event);
- void closeEvent(QCloseEvent *event);
- void changeEvent(QEvent *event);
- void showEvent(QShowEvent *event);
+ 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;
protected Q_SLOTS:
void forceShow();
diff --git a/src/widgets/dialogs/qsidebar_p.h b/src/widgets/dialogs/qsidebar_p.h
index 402863da85..e90fe5e636 100644
--- a/src/widgets/dialogs/qsidebar_p.h
+++ b/src/widgets/dialogs/qsidebar_p.h
@@ -61,7 +61,7 @@ class QSideBarDelegate : public QStyledItemDelegate
public:
QSideBarDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent) {}
void initStyleOption(QStyleOptionViewItem *option,
- const QModelIndex &index) const;
+ const QModelIndex &index) const Q_DECL_OVERRIDE;
};
class Q_AUTOTEST_EXPORT QUrlModel : public QStandardItemModel
@@ -76,14 +76,14 @@ public:
QUrlModel(QObject *parent = 0);
- QStringList mimeTypes() const;
- QMimeData *mimeData(const QModelIndexList &indexes) const;
+ QStringList mimeTypes() const Q_DECL_OVERRIDE;
+ QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE;
#ifndef QT_NO_DRAGANDDROP
bool canDrop(QDragEnterEvent *event);
- bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
+ bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE;
#endif
- Qt::ItemFlags flags(const QModelIndex &index) const;
- bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole);
+ 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;
void setUrls(const QList<QUrl> &list);
void addUrls(const QList<QUrl> &urls, int row = -1, bool move = true);
@@ -116,7 +116,7 @@ public:
void setModelAndUrls(QFileSystemModel *model, const QList<QUrl> &newUrls);
~QSidebar();
- QSize sizeHint() const;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
void setUrls(const QList<QUrl> &list) { urlModel->setUrls(list); }
void addUrls(const QList<QUrl> &list, int row) { urlModel->addUrls(list, row); }
@@ -125,10 +125,10 @@ public:
void selectUrl(const QUrl &url);
protected:
- bool event(QEvent * e);
- void focusInEvent(QFocusEvent *event);
+ bool event(QEvent * e) Q_DECL_OVERRIDE;
+ void focusInEvent(QFocusEvent *event) Q_DECL_OVERRIDE;
#ifndef QT_NO_DRAGANDDROP
- void dragEnterEvent(QDragEnterEvent *event);
+ void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE;
#endif
private Q_SLOTS:
diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp
index a378daa3d3..35ff6d73f1 100644
--- a/src/widgets/dialogs/qwizard.cpp
+++ b/src/widgets/dialogs/qwizard.cpp
@@ -290,7 +290,7 @@ public:
Qt::TextFormat titleFormat, Qt::TextFormat subTitleFormat);
protected:
- void paintEvent(QPaintEvent *event);
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
#if !defined(QT_NO_STYLE_WINDOWSVISTA)
private:
bool vistaDisabled() const;
@@ -446,7 +446,7 @@ public:
m_layout->addWidget(m_sideWidget);
}
- QSize minimumSizeHint() const {
+ QSize minimumSizeHint() const Q_DECL_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 25b0d5e3ee..7ceddf5049 100644
--- a/src/widgets/dialogs/qwizard.h
+++ b/src/widgets/dialogs/qwizard.h
@@ -161,8 +161,8 @@ public:
void setDefaultProperty(const char *className, const char *property,
const char *changedSignal);
- void setVisible(bool visible);
- QSize sizeHint() const;
+ void setVisible(bool visible) Q_DECL_OVERRIDE;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
Q_SIGNALS:
void currentIdChanged(int id);
@@ -177,13 +177,13 @@ public Q_SLOTS:
void restart();
protected:
- bool event(QEvent *event);
- void resizeEvent(QResizeEvent *event);
- void paintEvent(QPaintEvent *event);
+ bool event(QEvent *event) Q_DECL_OVERRIDE;
+ void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
#ifdef Q_OS_WIN
bool nativeEvent(const QByteArray &eventType, void * message, long * result);
#endif
- void done(int result);
+ void done(int result) Q_DECL_OVERRIDE;
virtual void initializePage(int id);
virtual void cleanupPage(int id);