summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-01-16 14:51:29 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-16 17:07:12 +0100
commit6acdb3256113a5cdc9633077ada5674e5ee694d1 (patch)
tree284c4055fb2b5368af6dab742ec362757879dc10 /src
parent7a0099183a1c107126bda3b59a47651aac612426 (diff)
Clarify docs that everything must be re-queried on model reset.
Change-Id: I05970302d4f52d092a7c65a45b9e5a3570b1d144 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index dec1fe4cef..a2776271a8 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -2141,9 +2141,7 @@ QSize QAbstractItemModel::span(const QModelIndex &) const
Sets the model's role names to \a roleNames.
This function allows mapping of role identifiers to role property names in
- Declarative UI. This function must be called before the model is used.
- Modifying the role names after the model has been set may result in
- undefined behaviour.
+ scripting languages.
\sa roleNames()
*/
@@ -3420,6 +3418,11 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
This signal is emitted when reset() is called, after the model's internal
state (e.g. persistent model indexes) has been invalidated.
+ Note that if a model is reset it should be considered that all information
+ previously retrieved from it is invalid. This includes but is not limited
+ to the rowCount() and columnCount(), flags(), data retrieved through data(),
+ and roleNames().
+
\sa endResetModel(), modelAboutToBeReset()
*/