summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-04-29 12:08:09 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-04-29 12:08:09 (GMT)
commitab29e9f1ab52901a5ed98055cf203817d2248dd2 (patch)
treeebc5ab03f1d39e0be8ffd018ecb7da7a6770be59 /src/declarative
parent4349792c3cf6851fd11f48a9bb0014371182fd51 (diff)
parent223821eb07c1243a0bcd3741fe09516807eb1b00 (diff)
downloadQt-ab29e9f1ab52901a5ed98055cf203817d2248dd2.zip
Qt-ab29e9f1ab52901a5ed98055cf203817d2248dd2.tar.gz
Qt-ab29e9f1ab52901a5ed98055cf203817d2248dd2.tar.bz2
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration: Legal: add the license header to the hand-edits Clear the root index when the model is reset. Fixed QTBUG-11935 : "With MySQL version > 50000 the QMYSQLDriver:: Fixed QTBUG-11935
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 97ce059..4c839a1 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -1398,7 +1398,12 @@ void QDeclarativeVisualDataModel::_q_layoutChanged()
void QDeclarativeVisualDataModel::_q_modelReset()
{
+ Q_D(QDeclarativeVisualDataModel);
+ d->m_root = QModelIndex();
emit modelReset();
+ emit rootIndexChanged();
+ if (d->m_abstractItemModel && d->m_abstractItemModel->canFetchMore(d->m_root))
+ d->m_abstractItemModel->fetchMore(d->m_root);
}
void QDeclarativeVisualDataModel::_q_createdPackage(int index, QDeclarativePackage *package)