From bc75db154015a2da8d32e3e023bc76999dd5bfc0 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Fri, 4 Sep 2009 16:01:41 +0200 Subject: Fixed tst_QFiledialog::filesSelectedSignal where the selected directory to run the test may not have any file on it. Reviewed-by: Olivier --- tests/auto/qfiledialog/qfiledialog.pro | 9 +++++++++ tests/auto/qfiledialog/tst_qfiledialog.cpp | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/auto/qfiledialog/qfiledialog.pro b/tests/auto/qfiledialog/qfiledialog.pro index bea7716..058acc5 100644 --- a/tests/auto/qfiledialog/qfiledialog.pro +++ b/tests/auto/qfiledialog/qfiledialog.pro @@ -16,3 +16,12 @@ wince*|symbian: { symbian:TARGET.EPOCHEAPSIZE="0x100 0x1000000" symbian:HEADERS += ../../../include/qtgui/private/qfileinfogatherer_p.h + +wince*: { + DEFINES += SRCDIR=\\\"./\\\" +} symbian: { + TARGET.UID3 = 0xE0340003 + DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x","")) +} else { + DEFINES += SRCDIR=\\\"$$PWD/\\\" +} diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 161efe0..67be797 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -297,7 +297,8 @@ void tst_QFiledialog::filesSelectedSignal() QNonNativeFileDialog fd; fd.setViewMode(QFileDialog::List); fd.setOptions(QFileDialog::DontUseNativeDialog); - fd.setDirectory(QDir::homePath()); + QDir testDir(SRCDIR"/../../.."); + fd.setDirectory(testDir); QFETCH(QFileDialog::FileMode, fileMode); fd.setFileMode(fileMode); QSignalSpy spyFilesSelected(&fd, SIGNAL(filesSelected(const QStringList &))); -- cgit v0.12