Don’t show file dialog before calling selectFile()
selectFile() is a no-op if the dialog is visible and its line edit has focus, which will happen at some point after show() is called. In other words this is a race, and the test will pass/fail depending on the timing of the platform implementation. Task-number: QTBUG-66536 Change-Id: I03957edb6496d17af7a8ed1d4ca86435375e0d40 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
dd96a62fca
commit
2776d663aa
|
|
@ -933,7 +933,6 @@ void tst_QFiledialog::selectFiles()
|
|||
QSignalSpy spyDirectoryEntered(&fd, SIGNAL(directoryEntered(QString)));
|
||||
QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(QStringList)));
|
||||
QSignalSpy spyFilterSelected(&fd, SIGNAL(filterSelected(QString)));
|
||||
fd.show();
|
||||
fd.setFileMode(QFileDialog::ExistingFiles);
|
||||
|
||||
QString filesPath = fd.directory().absolutePath();
|
||||
|
|
|
|||
Loading…
Reference in New Issue