summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-09-04 14:01:41 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-09-04 14:31:39 (GMT)
commitbc75db154015a2da8d32e3e023bc76999dd5bfc0 (patch)
tree2dd4487ca06528c8fbe22c1a91c2912d9bd194cc /tests/auto
parent26d0990c66068bfc92a2ec77512b26d4a0c11b02 (diff)
downloadQt-bc75db154015a2da8d32e3e023bc76999dd5bfc0.zip
Qt-bc75db154015a2da8d32e3e023bc76999dd5bfc0.tar.gz
Qt-bc75db154015a2da8d32e3e023bc76999dd5bfc0.tar.bz2
Fixed tst_QFiledialog::filesSelectedSignal where the selected directory to run
the test may not have any file on it. Reviewed-by: Olivier
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/qfiledialog/qfiledialog.pro9
-rw-r--r--tests/auto/qfiledialog/tst_qfiledialog.cpp3
2 files changed, 11 insertions, 1 deletions
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 &)));