summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-06-03 12:47:40 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-10 10:56:58 +0200
commit5303f814746606a78198fec5c02746c2f3090460 (patch)
treecfbb07343e0093cb8dd7dbf46fa539e042e965b5 /tests/auto/controls/data/tst_tableview.qml
parentc7df1ebf207f99c7889c8834d16bf62fc99db75e (diff)
downloadqtquickcontrols-5303f814746606a78198fec5c02746c2f3090460.tar.gz
Updated activation signals in TableView
- Added row property to activated() - Added clicked(row) signal - Added doubleClicked(row) signal - We also fixed the behavior so that we do not emit activated if the user clicks outside of the available rows. - We fixed a problem where key events would not be seen outside of the control Change-Id: I13feba26e900daf85be7be88216f1a0a4a446c57 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r--tests/auto/controls/data/tst_tableview.qml20
1 files changed, 18 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index 8763900e..6779990c 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -198,12 +198,27 @@ TestCase {
var table = component.createObject(container);
verify(table !== null, "table created is null")
table.forceActiveFocus();
- compare(table.test, false)
+ compare(table.test, -1)
+ compare(table.testClick, table.currentRow)
+
+ if (!table.__activateItemOnSingleClick)
+ mouseDoubleClick(table, 15 , 45, Qt.LeftButton)
+ else
+ mouseClick(table, 15, 45, Qt.LeftButton)
+
+ compare(table.testDoubleClick, table.currentRow)
+ compare(table.test, table.currentRow)
+ compare(table.testClick, table.currentRow)
+
if (!table.__activateItemOnSingleClick)
mouseDoubleClick(table, 15 , 15, Qt.LeftButton)
else
mouseClick(table, 15, 15, Qt.LeftButton)
- compare(table.test, true)
+
+ compare(table.testDoubleClick, table.currentRow)
+ compare(table.testClick, table.currentRow)
+ compare(table.test, table.currentRow)
+
table.destroy()
}
@@ -214,6 +229,7 @@ TestCase {
verify(table !== null, "table created is null")
table.forceActiveFocus();
compare(table.activatedTest, false)
+ waitForRendering(table)
if (!table.__activateItemOnSingleClick)
mouseDoubleClick(table, 15 , 50, Qt.LeftButton)
else