Stabilize tst_QFileDialog2::QTBUG4419_lineEditSelectAll
On macOS the selected text was empty when run together with other tests. Change QApplication::setActiveWindow() to QWidget::activateWindow() to get keyboard focus as well. After that the expected temporary file name is selected. Change-Id: I3b0c2bfca8008cb89b7e666a362beb15a851d8e0 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>bb10
parent
8e9fde2bf1
commit
d26fd09c6b
|
|
@ -1181,7 +1181,7 @@ void tst_QFileDialog2::QTBUG4419_lineEditSelectAll()
|
|||
fd.setFileMode(QFileDialog::AnyFile);
|
||||
|
||||
fd.show();
|
||||
QApplication::setActiveWindow(&fd);
|
||||
fd.activateWindow();
|
||||
QVERIFY(QTest::qWaitForWindowActive(&fd));
|
||||
QCOMPARE(fd.isVisible(), true);
|
||||
QCOMPARE(QApplication::activeWindow(), static_cast<QWidget*>(&fd));
|
||||
|
|
|
|||
Loading…
Reference in New Issue