summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorThorbjørn Martsum <tmartsum@gmail.com>2013-08-26 20:26:07 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-30 21:07:46 +0200
commit2c916d47ef1338403cf14b4a2684159d865aa4fc (patch)
treec6fe82e6f84bd336320463bb7c86a3fb6bbbb2db /tests/manual
parent427037c75d7c915b9fc61cadd0a4fb5c20875547 (diff)
QTreeView - fix next focus when there is no current index
Before we went through non hidden indexes, but we never considered the visual order. This patch fixes that issue. Though it was wrong before, it probably never was a big problem since it was unlikely that the tree (on logical index 0) was swapped or hidden, but 658e42e77a00596b63823482c9b77644556b647c makes it more likely that problems with wrong focus could occur. Change-Id: Ic7b6cd2df1f8638be1a7c9e6df27f428685869fc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/widgets/itemviews/qtreewidget/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/manual/widgets/itemviews/qtreewidget/main.cpp b/tests/manual/widgets/itemviews/qtreewidget/main.cpp
index 9428113250..0dec329cd8 100644
--- a/tests/manual/widgets/itemviews/qtreewidget/main.cpp
+++ b/tests/manual/widgets/itemviews/qtreewidget/main.cpp
@@ -115,13 +115,14 @@ public:
// Developer no. could also have been social security number og some other id.
itemInfo.append("Title");
treeWidget->setHeaderLabels(itemInfo);
- radioFirstName->setChecked(true);
+ radioLastName->setChecked(true);
connect(radioFirstName, SIGNAL(toggled(bool)), this, SLOT(fixDataInTree(bool)));
connect(radioLastName, SIGNAL(toggled(bool)), this, SLOT(fixDataInTree(bool)));
connect(radioDeveloperNo, SIGNAL(toggled(bool)), this, SLOT(fixDataInTree(bool)));
connect(radioTitle, SIGNAL(toggled(bool)), this, SLOT(fixDataInTree(bool)));
treeWidget->setTreePosition(-1);
+ treeWidget->header()->swapSections(0, 1);
}
protected slots: