summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo Asplin <jo.asplin@nokia.com>2011-09-12 10:01:56 +0200
committerMatthew Cattell <matthew.cattell@nokia.com>2011-09-12 10:20:32 +0200
commitd4923df10e32c67150c6fec6ab67e0fe73b449e1 (patch)
tree3eb72f8d9dce0de52b164825948aef76deb4d818
parent97e6d6c5d41046f4820d01ed07088ba2b2384fcf (diff)
Disambiguated access to QTestLib API
Commit 2cca7e0884a45c3a022609b2cb4efd381ee8d5a1 overloads QTestLib so that QWindow * can be passed directly to certain functions. This fix disambiguates access to the new API by selecting the QWindow * versions. This assumes that the QWidget * versions are kept mostly for backwards compatibility. Change-Id: I8755c86d5ebeb275dfa9162b0168d9179a61982d Reviewed-on: http://codereview.qt-project.org/4640 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
-rw-r--r--tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp2
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp2
-rw-r--r--tests/auto/qspinbox/tst_qspinbox.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
index 355b22f224..e0b6dc98a5 100644
--- a/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
+++ b/tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp
@@ -1080,7 +1080,7 @@ void tst_QDoubleSpinBox::taskQTBUG_5008_textFromValueAndValidate()
QTRY_COMPARE(static_cast<QWidget *>(&spinbox), QApplication::activeWindow());
QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));
spinbox.lineEdit()->setCursorPosition(2); //just after the first thousand separator
- QTest::keyClick(0, Qt::Key_0); // let's insert a 0
+ QTest::keyClick(static_cast<QWindow *>(0), Qt::Key_0); // let's insert a 0
QCOMPARE(spinbox.value(), 10000.);
spinbox.clearFocus(); //make sure the value is correctly formatted
QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index fde77bca51..7c8a9751cd 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -3704,7 +3704,7 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
le.setFocus();
QTRY_VERIFY(le.hasFocus());
- QTest::keyClick(0, Qt::Key_P);
+ QTest::keyClick(static_cast<QWindow *>(0), Qt::Key_P);
QCOMPARE(spy.count(), 1);
}
diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp
index 7f72afc7e7..6feef459e6 100644
--- a/tests/auto/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/qspinbox/tst_qspinbox.cpp
@@ -1039,7 +1039,7 @@ void tst_QSpinBox::taskQTBUG_5008_textFromValueAndValidate()
QTRY_COMPARE(static_cast<QWidget *>(&spinbox), QApplication::activeWindow());
QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));
spinbox.lineEdit()->setCursorPosition(2); //just after the first thousand separator
- QTest::keyClick(0, Qt::Key_0); // let's insert a 0
+ QTest::keyClick(static_cast<QWindow *>(0), Qt::Key_0); // let's insert a 0
QCOMPARE(spinbox.value(), 10000000); //it's been multiplied by 10
spinbox.clearFocus(); //make sure the value is correctly formatted
QCOMPARE(spinbox.text(), spinbox.locale().toString(spinbox.value()));