summaryrefslogtreecommitdiffstats
path: root/src/widgets/util/qcompleter_p.h
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/util/qcompleter_p.h
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/util/qcompleter_p.h')
-rw-r--r--src/widgets/util/qcompleter_p.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/widgets/util/qcompleter_p.h b/src/widgets/util/qcompleter_p.h
index 3cb7c59b6d..dbc57ba905 100644
--- a/src/widgets/util/qcompleter_p.h
+++ b/src/widgets/util/qcompleter_p.h
@@ -174,7 +174,7 @@ class QSortedModelEngine : public QCompletionEngine
{
public:
QSortedModelEngine(QCompleterPrivate *c) : QCompletionEngine(c) { }
- QMatchData filter(const QString&, const QModelIndex&, int) Q_DECL_OVERRIDE;
+ QMatchData filter(const QString&, const QModelIndex&, int) override;
QIndexMapper indexHint(QString, const QModelIndex&, Qt::SortOrder);
Qt::SortOrder sortOrder(const QModelIndex&) const;
};
@@ -184,8 +184,8 @@ class QUnsortedModelEngine : public QCompletionEngine
public:
QUnsortedModelEngine(QCompleterPrivate *c) : QCompletionEngine(c) { }
- void filterOnDemand(int) Q_DECL_OVERRIDE;
- QMatchData filter(const QString&, const QModelIndex&, int) Q_DECL_OVERRIDE;
+ void filterOnDemand(int) override;
+ QMatchData filter(const QString&, const QModelIndex&, int) override;
private:
int buildIndices(const QString& str, const QModelIndex& parent, int n,
const QIndexMapper& iv, QMatchData* m);
@@ -196,7 +196,7 @@ class QCompleterItemDelegate : public QItemDelegate
public:
QCompleterItemDelegate(QAbstractItemView *view)
: QItemDelegate(view), view(view) { }
- void paint(QPainter *p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const Q_DECL_OVERRIDE {
+ void paint(QPainter *p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const override {
QStyleOptionViewItem optCopy = opt;
optCopy.showDecorationSelected = true;
if (view->currentIndex() == idx)
@@ -225,16 +225,16 @@ public:
bool setCurrentRow(int row);
QModelIndex currentIndex(bool) const;
- QModelIndex index(int row, int column, const QModelIndex & = QModelIndex()) const Q_DECL_OVERRIDE;
- int rowCount(const QModelIndex &index = QModelIndex()) const Q_DECL_OVERRIDE;
- int columnCount(const QModelIndex &index = QModelIndex()) const Q_DECL_OVERRIDE;
- bool hasChildren(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
- QModelIndex parent(const QModelIndex & = QModelIndex()) const Q_DECL_OVERRIDE { return QModelIndex(); }
- QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE;
+ QModelIndex index(int row, int column, const QModelIndex & = QModelIndex()) const override;
+ int rowCount(const QModelIndex &index = QModelIndex()) const override;
+ int columnCount(const QModelIndex &index = QModelIndex()) const override;
+ bool hasChildren(const QModelIndex &parent = QModelIndex()) const override;
+ QModelIndex parent(const QModelIndex & = QModelIndex()) const override { return QModelIndex(); }
+ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
- void setSourceModel(QAbstractItemModel *sourceModel) Q_DECL_OVERRIDE;
- QModelIndex mapToSource(const QModelIndex& proxyIndex) const Q_DECL_OVERRIDE;
- QModelIndex mapFromSource(const QModelIndex& sourceIndex) const Q_DECL_OVERRIDE;
+ void setSourceModel(QAbstractItemModel *sourceModel) override;
+ QModelIndex mapToSource(const QModelIndex& proxyIndex) const override;
+ QModelIndex mapFromSource(const QModelIndex& sourceIndex) const override;
QCompleterPrivate *c;
QScopedPointer<QCompletionEngine> engine;