From 47c92fbb0b588b443cead18a5aad5a2b5ad9e4d7 Mon Sep 17 00:00:00 2001 From: Kevin Funk Date: Mon, 18 Sep 2017 10:36:49 +0200 Subject: 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 Reviewed-by: Ville Voutilainen Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/widgets/dialogs/qsidebar_p.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/widgets/dialogs/qsidebar_p.h') 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 &list); void addUrls(const QList &urls, int row = -1, bool move = true); @@ -131,7 +131,7 @@ public: void setModelAndUrls(QFileSystemModel *model, const QList &newUrls); ~QSidebar(); - QSize sizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const override; void setUrls(const QList &list) { urlModel->setUrls(list); } void addUrls(const QList &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: -- cgit v1.2.3