Commit ad1fb8d0 authored by hjk's avatar hjk

TreeModel: Add override where appropriate

Change-Id: Ifdfcc1dffef91cd59332bee14cf6149c379376d4
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 20fcdd5f
...@@ -247,7 +247,7 @@ class QTCREATOR_UTILS_EXPORT TreeModel : public QAbstractItemModel ...@@ -247,7 +247,7 @@ class QTCREATOR_UTILS_EXPORT TreeModel : public QAbstractItemModel
public: public:
explicit TreeModel(QObject *parent = 0); explicit TreeModel(QObject *parent = 0);
explicit TreeModel(TreeItem *root, QObject *parent = 0); explicit TreeModel(TreeItem *root, QObject *parent = 0);
~TreeModel(); ~TreeModel() override;
void setHeader(const QStringList &displays); void setHeader(const QStringList &displays);
void setHeaderToolTip(const QStringList &tips); void setHeaderToolTip(const QStringList &tips);
...@@ -259,19 +259,19 @@ public: ...@@ -259,19 +259,19 @@ public:
QModelIndex indexForItem(const TreeItem *needle) const; QModelIndex indexForItem(const TreeItem *needle) const;
int topLevelItemCount() const; int topLevelItemCount() const;
int rowCount(const QModelIndex &idx = QModelIndex()) const; int rowCount(const QModelIndex &idx = QModelIndex()) const override;
int columnCount(const QModelIndex &idx) const; int columnCount(const QModelIndex &idx) const override;
bool setData(const QModelIndex &idx, const QVariant &data, int role); bool setData(const QModelIndex &idx, const QVariant &data, int role) override;
QVariant data(const QModelIndex &idx, int role) const; QVariant data(const QModelIndex &idx, int role) const override;
QModelIndex index(int, int, const QModelIndex &idx = QModelIndex()) const; QModelIndex index(int, int, const QModelIndex &idx = QModelIndex()) const override;
QModelIndex parent(const QModelIndex &idx) const; QModelIndex parent(const QModelIndex &idx) const override;
Qt::ItemFlags flags(const QModelIndex &idx) const; Qt::ItemFlags flags(const QModelIndex &idx) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
bool hasChildren(const QModelIndex &idx) const; bool hasChildren(const QModelIndex &idx) const override;
bool canFetchMore(const QModelIndex &idx) const; bool canFetchMore(const QModelIndex &idx) const override;
void fetchMore(const QModelIndex &idx); void fetchMore(const QModelIndex &idx) override;
template <class T> template <class T>
TreeLevelItems<T> itemsAtLevel(int level, TreeItem *start = 0) const TreeLevelItems<T> itemsAtLevel(int level, TreeItem *start = 0) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment