summaryrefslogtreecommitdiffstats
path: root/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-07-15 15:30:08 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-07-15 15:30:08 (GMT)
commitfbfc03eb8e7c3d41c4331895ae83912a4275e6c2 (patch)
treeae6b553899bba4922d1210b0f8dc8da994834bc7 /tests/auto/xmlpatternsxqts/lib/TreeModel.cpp
parent2d01fb17dbf7590dd60987b08433252eb95f55e0 (diff)
parent9075ec9011e5f678563ab15024e8d9731e938963 (diff)
downloadQt-fbfc03eb8e7c3d41c4331895ae83912a4275e6c2.zip
Qt-fbfc03eb8e7c3d41c4331895ae83912a4275e6c2.tar.gz
Qt-fbfc03eb8e7c3d41c4331895ae83912a4275e6c2.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'tests/auto/xmlpatternsxqts/lib/TreeModel.cpp')
-rw-r--r--tests/auto/xmlpatternsxqts/lib/TreeModel.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp b/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp
index 172e68c..ff98b3e 100644
--- a/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp
+++ b/tests/auto/xmlpatternsxqts/lib/TreeModel.cpp
@@ -118,9 +118,14 @@ QVariant TreeModel::headerData(int section, Qt::Orientation orientation, int rol
return QVariant();
}
-void TreeModel::childChanged(TreeItem *)
+void TreeModel::childChanged(TreeItem *item)
{
- layoutChanged();
+ if (item) {
+ const QModelIndex index = createIndex(item->row(), 0, item);
+ dataChanged(index, index);
+ } else {
+ layoutChanged();
+ }
}
QModelIndex TreeModel::index(int row, int column, const QModelIndex &p) const