summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfilesystemmodel.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-01-29 12:17:44 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-09-13 12:22:10 +0000
commit98ce9a6309932c7cf3ec12c18b5fa1493cc4f420 (patch)
treecdfcd694580862ceda585019552244806225f019 /src/widgets/dialogs/qfilesystemmodel.h
parentf43885f8d14e045e5ec47857d62a140d99d16cfa (diff)
QFileSystemModel: reimplement sibling for same-row
Since QFSM, like most models, uses QModelIndex::internalPointer() as an indicator of the row, getting a sibling in the same row is as easy as copying the internalPointer() of the incoming index and just creating a new index with the column adjusted. For rows, the situation is quite a bit more complicated, so we currently continue to call the generic implementation. Change-Id: I36921e3f9c01c458a75aa439018f21c4c657e1cf Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.h')
-rw-r--r--src/widgets/dialogs/qfilesystemmodel.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.h b/src/widgets/dialogs/qfilesystemmodel.h
index f749c97bcb..cef85a0c8c 100644
--- a/src/widgets/dialogs/qfilesystemmodel.h
+++ b/src/widgets/dialogs/qfilesystemmodel.h
@@ -75,6 +75,7 @@ public:
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
QModelIndex index(const QString &path, int column = 0) const;
QModelIndex parent(const QModelIndex &child) const Q_DECL_OVERRIDE;
+ QModelIndex sibling(int row, int column, const QModelIndex &idx) const Q_DECL_OVERRIDE;
bool hasChildren(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
bool canFetchMore(const QModelIndex &parent) const Q_DECL_OVERRIDE;
void fetchMore(const QModelIndex &parent) Q_DECL_OVERRIDE;