From d4923df10e32c67150c6fec6ab67e0fe73b449e1 Mon Sep 17 00:00:00 2001 From: Jo Asplin Date: Mon, 12 Sep 2011 10:01:56 +0200 Subject: 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 Reviewed-by: Matthew Cattell --- tests/auto/qdoublespinbox/tst_qdoublespinbox.cpp | 2 +- tests/auto/qlineedit/tst_qlineedit.cpp | 2 +- tests/auto/qspinbox/tst_qspinbox.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') 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(&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(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(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(&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(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())); -- cgit v1.2.3