Disambiguated access to QTestLib API
Commit 2cca7e0884
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>
This commit is contained in:
parent
97e6d6c5d4
commit
d4923df10e
@ -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()));
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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()));
|
||||
|
Loading…
Reference in New Issue
Block a user