Improve QWidget autotest.
Remove some "#if 1" directives and a line of debug code. Change-Id: Ib34f5b65470a24ee499799525ffe0645ccc117fe Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
6fce33dd4c
commit
238bdc2e91
@ -9444,12 +9444,9 @@ void tst_QWidget::nativeChildFocus()
|
||||
QLineEdit *p2 = new QLineEdit;
|
||||
layout->addWidget(p1);
|
||||
layout->addWidget(p2);
|
||||
#if 1
|
||||
p1->setObjectName("p1");
|
||||
p2->setObjectName("p2");
|
||||
#endif
|
||||
w.show();
|
||||
#if 1
|
||||
w.activateWindow();
|
||||
p1->setFocus();
|
||||
p1->setAttribute(Qt::WA_NativeWindow);
|
||||
@ -9458,10 +9455,8 @@ void tst_QWidget::nativeChildFocus()
|
||||
QTest::qWaitForWindowShown(&w);
|
||||
QTest::qWait(10);
|
||||
|
||||
qDebug() << "checking active window:" << QApplication::activeWindow();
|
||||
QCOMPARE(QApplication::activeWindow(), &w);
|
||||
QCOMPARE(QApplication::focusWidget(), static_cast<QWidget*>(p1));
|
||||
#endif
|
||||
|
||||
QTest::qWait(1000);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user