forked from qt-creator/qt-creator
Utils: Remove BaseTreeModel::hasChildren re-implementation
Not needed and wrong, as it doesn't handle the case of column != 0. Change-Id: I0ff62df0547a47ea80e1450b7cca1ecc86da7005 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -1028,12 +1028,6 @@ QVariant BaseTreeModel::headerData(int section, Qt::Orientation orientation,
|
|||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseTreeModel::hasChildren(const QModelIndex &idx) const
|
|
||||||
{
|
|
||||||
TreeItem *item = itemForIndex(idx);
|
|
||||||
return !item || item->hasChildren();
|
|
||||||
}
|
|
||||||
|
|
||||||
Qt::ItemFlags BaseTreeModel::flags(const QModelIndex &idx) const
|
Qt::ItemFlags BaseTreeModel::flags(const QModelIndex &idx) const
|
||||||
{
|
{
|
||||||
if (!idx.isValid())
|
if (!idx.isValid())
|
||||||
|
@@ -193,7 +193,6 @@ protected:
|
|||||||
QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
|
QModelIndex sibling(int row, int column, const QModelIndex &idx) const override;
|
||||||
Qt::ItemFlags flags(const QModelIndex &idx) const override;
|
Qt::ItemFlags flags(const QModelIndex &idx) const override;
|
||||||
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||||
bool hasChildren(const QModelIndex &idx) const override;
|
|
||||||
|
|
||||||
bool canFetchMore(const QModelIndex &idx) const override;
|
bool canFetchMore(const QModelIndex &idx) const override;
|
||||||
void fetchMore(const QModelIndex &idx) override;
|
void fetchMore(const QModelIndex &idx) override;
|
||||||
|
Reference in New Issue
Block a user