From 2776d663aa1b7788917b3d3d0bd2817e1c72a947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Tue, 20 Feb 2018 15:54:44 +0100 Subject: =?UTF-8?q?Don=E2=80=99t=20show=20file=20dialog=20before=20calling?= =?UTF-8?q?=20selectFile()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ø --- tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/auto/widgets/dialogs/qfiledialog') 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(); -- cgit v1.2.3