summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2012-12-20 13:20:29 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-20 19:21:47 +0100
commita42a1db6e1deade3ce9bdd1efaef1077dd0f2aeb (patch)
treed939174589d30a8f630bd644fe2e00abb854afa4
parent84dbdc8db67991e8d9eb7825a2296a94f5812c66 (diff)
QAbstractProxyModel: Document setSourceModel a bit more
Especially so that subclasses remember to emit reset. Change-Id: Iadcae3fc5fe72584465d4134f385ed0a1d77bfcd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qabstractproxymodel.cpp b/src/corelib/itemmodels/qabstractproxymodel.cpp
index 715a186b97..0175a0f2fa 100644
--- a/src/corelib/itemmodels/qabstractproxymodel.cpp
+++ b/src/corelib/itemmodels/qabstractproxymodel.cpp
@@ -124,6 +124,10 @@ QAbstractProxyModel::~QAbstractProxyModel()
/*!
Sets the given \a sourceModel to be processed by the proxy model.
+
+ Subclasses should call beginResetModel() at the beginning of the method,
+ disconnect from the old model, call this method, connect to the new model,
+ and call endResetModel().
*/
void QAbstractProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
{