summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs/qfiledialog
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-02-20 15:54:44 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2018-03-19 14:39:33 +0000
commit2776d663aa1b7788917b3d3d0bd2817e1c72a947 (patch)
tree8c3563c21993de454213d8e46b1fc8089d931687 /tests/auto/widgets/dialogs/qfiledialog
parentdd96a62fca461dd4227947469d99f59f9358c028 (diff)
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>
Diffstat (limited to 'tests/auto/widgets/dialogs/qfiledialog')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index 69621a6c09..e26da6b93e 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -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();