summaryrefslogtreecommitdiffstats
path: root/src/widgets/util/qcompleter_p.h
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/util/qcompleter_p.h
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/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 50f7cdacdb..b4ead17cab 100644
--- a/src/widgets/util/qcompleter_p.h
+++ b/src/widgets/util/qcompleter_p.h
@@ -167,7 +167,7 @@ class QSortedModelEngine : public QCompletionEngine
{
public:
QSortedModelEngine(QCompleterPrivate *c) : QCompletionEngine(c) { }
- QMatchData filter(const QString&, const QModelIndex&, int);
+ QMatchData filter(const QString&, const QModelIndex&, int) Q_DECL_OVERRIDE;
QIndexMapper indexHint(QString, const QModelIndex&, Qt::SortOrder);
Qt::SortOrder sortOrder(const QModelIndex&) const;
};
@@ -177,8 +177,8 @@ class QUnsortedModelEngine : public QCompletionEngine
public:
QUnsortedModelEngine(QCompleterPrivate *c) : QCompletionEngine(c) { }
- void filterOnDemand(int);
- QMatchData filter(const QString&, const QModelIndex&, int);
+ void filterOnDemand(int) Q_DECL_OVERRIDE;
+ QMatchData filter(const QString&, const QModelIndex&, int) Q_DECL_OVERRIDE;
private:
int buildIndices(const QString& str, const QModelIndex& parent, int n,
const QIndexMapper& iv, QMatchData* m);
@@ -189,7 +189,7 @@ class QCompleterItemDelegate : public QItemDelegate
public:
QCompleterItemDelegate(QAbstractItemView *view)
: QItemDelegate(view), view(view) { }
- void paint(QPainter *p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const {
+ void paint(QPainter *p, const QStyleOptionViewItem& opt, const QModelIndex& idx) const Q_DECL_OVERRIDE {
QStyleOptionViewItem optCopy = opt;
optCopy.showDecorationSelected = true;
if (view->currentIndex() == idx)
@@ -218,16 +218,16 @@ public:
bool setCurrentRow(int row);
QModelIndex currentIndex(bool) const;
- QModelIndex index(int row, int column, const QModelIndex & = QModelIndex()) const;
- int rowCount(const QModelIndex &index = QModelIndex()) const;
- int columnCount(const QModelIndex &index = QModelIndex()) const;
- bool hasChildren(const QModelIndex &parent = QModelIndex()) const;
- QModelIndex parent(const QModelIndex & = QModelIndex()) const { return QModelIndex(); }
- QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) 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;
- void setSourceModel(QAbstractItemModel *sourceModel);
- QModelIndex mapToSource(const QModelIndex& proxyIndex) const;
- QModelIndex mapFromSource(const QModelIndex& sourceIndex) const;
+ 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;
QCompleterPrivate *c;
QScopedPointer<QCompletionEngine> engine;