summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qabstractitemmodel.cpp
diff options
context:
space:
mode:
authorKavindra Devi Palaraja <kavindra.palaraja@nokia.com>2009-08-19 14:20:45 (GMT)
committerKavindra Devi Palaraja <kavindra.palaraja@nokia.com>2009-08-19 14:20:55 (GMT)
commit555fafe46e26b352e9d8ab5586910591761ab5ad (patch)
treeed9126c04459757755b4ce3054a030406480e558 /src/corelib/kernel/qabstractitemmodel.cpp
parentd0bf6b569eefef47891d851161f610bf34d28bfb (diff)
downloadQt-555fafe46e26b352e9d8ab5586910591761ab5ad.zip
Qt-555fafe46e26b352e9d8ab5586910591761ab5ad.tar.gz
Qt-555fafe46e26b352e9d8ab5586910591761ab5ad.tar.bz2
Doc - mentioning that the begin...() functions emit a signal that must
be handled by connected views/proxies. Otherwise, the views/proxies may end up in an invalid state. Task: 227718 Reviewed-By: Olivier Goffart
Diffstat (limited to 'src/corelib/kernel/qabstractitemmodel.cpp')
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 8761ec1..17af60d 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -2189,6 +2189,9 @@ bool QAbstractItemModel::decodeData(int row, int column, const QModelIndex &pare
This appends the two new rows as rows 4 and 5.
\endtable
+ \note This function emits the rowsAboutToBeInserted() signal which
+ connected views (or proxies) must handle before the data is inserted.
+ Otherwise, the views may end up in an invalid state.
\sa endInsertRows()
*/
void QAbstractItemModel::beginInsertRows(const QModelIndex &parent, int first, int last)
@@ -2239,6 +2242,10 @@ void QAbstractItemModel::endInsertRows()
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 2
\endtable
+ \note This function emits the rowsAboutToBeRemoved() signal which connected
+ views (or proxies) must handle before the data is removed. Otherwise, the
+ views may end up in an invalid state.
+
\sa endRemoveRows()
*/
void QAbstractItemModel::beginRemoveRows(const QModelIndex &parent, int first, int last)
@@ -2302,6 +2309,10 @@ void QAbstractItemModel::endRemoveRows()
This appends the two new columns as columns 6, 7, and 8.
\endtable
+ \note This function emits the columnsAboutToBeInserted() signal which
+ connected views (or proxies) must handle before the data is inserted.
+ Otherwise, the views may end up in an invalid state.
+
\sa endInsertColumns()
*/
void QAbstractItemModel::beginInsertColumns(const QModelIndex &parent, int first, int last)
@@ -2353,6 +2364,10 @@ void QAbstractItemModel::endInsertColumns()
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 5
\endtable
+ \note This function emits the columnsAboutToBeRemoved() signal which
+ connected views (or proxies) must handle before the data is removed.
+ Otherwise, the views may end up in an invalid state.
+
\sa endRemoveColumns()
*/
void QAbstractItemModel::beginRemoveColumns(const QModelIndex &parent, int first, int last)