diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2013-03-25 14:18:01 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-26 10:18:02 +0100 |
commit | f8bf0081d2569ef08f5c5b3ee3b9c182d11e65cf (patch) | |
tree | b6d418d809c5b81b563aa49f9acd22c5c0c783f2 /src/corelib/itemmodels | |
parent | 771a254d3c6f7830d1cc827835806afa16954368 (diff) |
Document undefined behavior regarding Qt::ItemNeverHasChildren.
Change-Id: I4c044b206ad6dd57f11d791d8a6a6f3f931acf4f
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp index 0d67c1f17b..f152dec5e6 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.cpp +++ b/src/corelib/itemmodels/qabstractitemmodel.cpp @@ -1679,6 +1679,9 @@ bool QAbstractItemModel::hasIndex(int row, int column, const QModelIndex &parent Use rowCount() on the parent to find out the number of children. + Note that it is undefined behavior to report that a particular index hasChildren + with this method if the same index has the flag Qt::ItemNeverHasChildren set. + \sa parent(), index() */ bool QAbstractItemModel::hasChildren(const QModelIndex &parent) const |