diff options
author | hjk <hjk@theqtcompany.com> | 2016-06-15 10:12:35 +0200 |
---|---|---|
committer | hjk <hjk@theqtcompany.com> | 2016-06-15 09:32:30 +0000 |
commit | 40a54bf565079c007eada8755b9ff7224754949d (patch) | |
tree | ccd3bb45ca7369b79fc54d26955cf5b0dfc8ece1 /examples/widgets/itemviews/puzzle | |
parent | 4d3ffae3d562e5b3b2748a2d92eb4ab2933422e7 (diff) |
Examples: Replace 'Q_DECL_OVERRIDE' by 'override'
Examples should demonstrate best practice, and we can use the keyword
directly nowadays.
Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4
Reviewed-by: Topi Reiniƶ <topi.reinio@theqtcompany.com>
Diffstat (limited to 'examples/widgets/itemviews/puzzle')
-rw-r--r-- | examples/widgets/itemviews/puzzle/piecesmodel.h | 16 | ||||
-rw-r--r-- | examples/widgets/itemviews/puzzle/puzzlewidget.h | 12 |
2 files changed, 14 insertions, 14 deletions
diff --git a/examples/widgets/itemviews/puzzle/piecesmodel.h b/examples/widgets/itemviews/puzzle/piecesmodel.h index d7293ffa6c..bd979f4c7e 100644 --- a/examples/widgets/itemviews/puzzle/piecesmodel.h +++ b/examples/widgets/itemviews/puzzle/piecesmodel.h @@ -68,16 +68,16 @@ class PiecesModel : public QAbstractListModel public: explicit PiecesModel(int pieceSize, QObject *parent = 0); - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; - Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; - bool removeRows(int row, int count, const QModelIndex &parent) Q_DECL_OVERRIDE; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; + Qt::ItemFlags flags(const QModelIndex &index) const override; + bool removeRows(int row, int count, const QModelIndex &parent) override; bool dropMimeData(const QMimeData *data, Qt::DropAction action, - int row, int column, const QModelIndex &parent) Q_DECL_OVERRIDE; - QMimeData *mimeData(const QModelIndexList &indexes) const Q_DECL_OVERRIDE; - QStringList mimeTypes() const Q_DECL_OVERRIDE; - int rowCount(const QModelIndex &parent) const Q_DECL_OVERRIDE; - Qt::DropActions supportedDropActions() const Q_DECL_OVERRIDE; + int row, int column, const QModelIndex &parent) override; + QMimeData *mimeData(const QModelIndexList &indexes) const override; + QStringList mimeTypes() const override; + int rowCount(const QModelIndex &parent) const override; + Qt::DropActions supportedDropActions() const override; void addPiece(const QPixmap &pixmap, const QPoint &location); void addPieces(const QPixmap& pixmap); diff --git a/examples/widgets/itemviews/puzzle/puzzlewidget.h b/examples/widgets/itemviews/puzzle/puzzlewidget.h index 2b6bd061ba..137e0b7162 100644 --- a/examples/widgets/itemviews/puzzle/puzzlewidget.h +++ b/examples/widgets/itemviews/puzzle/puzzlewidget.h @@ -77,12 +77,12 @@ signals: void puzzleCompleted(); protected: - void dragEnterEvent(QDragEnterEvent *event) Q_DECL_OVERRIDE; - void dragLeaveEvent(QDragLeaveEvent *event) Q_DECL_OVERRIDE; - void dragMoveEvent(QDragMoveEvent *event) Q_DECL_OVERRIDE; - void dropEvent(QDropEvent *event) Q_DECL_OVERRIDE; - void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; - void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; + void dragEnterEvent(QDragEnterEvent *event) override; + void dragLeaveEvent(QDragLeaveEvent *event) override; + void dragMoveEvent(QDragMoveEvent *event) override; + void dropEvent(QDropEvent *event) override; + void mousePressEvent(QMouseEvent *event) override; + void paintEvent(QPaintEvent *event) override; private: int findPiece(const QRect &pieceRect) const; |