summaryrefslogtreecommitdiff
path: root/tests/auto/controls/data/tst_tableview.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-06-21 10:08:38 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-02 11:20:18 +0200
commit8f8deec53e32119a80b2ff5e8cad83cfd7e5776c (patch)
tree2266c69145974aad5303a7caad68e09817672c1f /tests/auto/controls/data/tst_tableview.qml
parentc79ed398e6d70717243feccb78e362ed1ee819eb (diff)
downloadqtquickcontrols-8f8deec53e32119a80b2ff5e8cad83cfd7e5776c.tar.gz
Tests: Fix warnings in tests
Ignore warning messages when they are expected. Fix real warnings. Also add missing tst_layout.qml to the test pro file. Change-Id: I2a3835d386570aeb993f275793b3e5e69cc41599 Reviewed-by: Liang Qi <liang.qi@digia.com>
Diffstat (limited to 'tests/auto/controls/data/tst_tableview.qml')
-rw-r--r--tests/auto/controls/data/tst_tableview.qml13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/controls/data/tst_tableview.qml b/tests/auto/controls/data/tst_tableview.qml
index 9a5e9c78..8e576113 100644
--- a/tests/auto/controls/data/tst_tableview.qml
+++ b/tests/auto/controls/data/tst_tableview.qml
@@ -363,6 +363,7 @@ TestCase {
compare(column.__view, tableView)
compare(column.width, tableView.viewport.width)
var tableView2 = Qt.createQmlObject('import QtQuick 2.1; import QtQuick.Controls 1.0; TableView { }', testCase, '');
+ ignoreWarning("TableView::insertColumn(): you cannot add a column to multiple views")
tableView2.addColumn(column) // should not work
compare(column.__view, tableView) //same as before
tableView2.destroy()
@@ -452,11 +453,11 @@ TestCase {
{tag:"2->1 (2)", from: 2, to: 1},
{tag:"0->0", from: 0, to: 0},
- {tag:"-1->0", from: -1, to: 0},
- {tag:"0->-1", from: 0, to: -1},
- {tag:"1->10", from: 1, to: 10},
- {tag:"10->2", from: 10, to: 2},
- {tag:"10->-1", from: 10, to: -1}
+ {tag:"-1->0", from: -1, to: 0, warning: "TableView::moveColumn(): invalid argument"},
+ {tag:"0->-1", from: 0, to: -1, warning: "TableView::moveColumn(): invalid argument"},
+ {tag:"1->10", from: 1, to: 10, warning: "TableView::moveColumn(): invalid argument"},
+ {tag:"10->2", from: 10, to: 2, warning: "TableView::moveColumn(): invalid argument"},
+ {tag:"10->-1", from: 10, to: -1, warning: "TableView::moveColumn(): invalid argument"}
]
}
@@ -474,6 +475,8 @@ TestCase {
for (i = 0; i < tableView.columnCount; ++i)
compare(tableView.getColumn(i).title, titles[i])
+ if (data.warning !== undefined)
+ ignoreWarning(data.warning)
tableView.moveColumn(data.from, data.to)
compare(tableView.columnCount, titles.length)