diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-10-20 12:45:50 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-10-20 13:47:24 (GMT) |
commit | 12ae7dea67244458fc92575ae2f49a8e32343047 (patch) | |
tree | 862d3f861b78e0532c60449839dd21d373bdaf18 /tests/auto/qfiledialog | |
parent | ea69ae0df02de27ec0f0a1a9b0a122655445fc01 (diff) | |
download | Qt-12ae7dea67244458fc92575ae2f49a8e32343047.zip Qt-12ae7dea67244458fc92575ae2f49a8e32343047.tar.gz Qt-12ae7dea67244458fc92575ae2f49a8e32343047.tar.bz2 |
Fix errors in the QFileDialog autotest
The filesSelectedSignal() test case was using the Qt source tree as its
test directory - however this is not deployed to the device for symbian
and windows CE.
On symbian, the path evaluates to the root directory, which doesn't meet
the conditions of the test (it contains only directories, while the test
requires both files and directories to be present)
Changed the test to use SRCDIR (on desktops, the source directory of the
test code; on symbian/wince the deployed files location)
This directory is valid for the test as it contains both files and directories.
The hooks() test case crashes on symbian versions prior to symbian^3,
because data exports from dlls are not properly supported by the symbian kernel
So, this test is skipped for old symbian versions (if a test crashes, then
no xml result file is created)
Reviewed-By: Markus Goetz
Diffstat (limited to 'tests/auto/qfiledialog')
-rw-r--r-- | tests/auto/qfiledialog/tst_qfiledialog.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/qfiledialog/tst_qfiledialog.cpp b/tests/auto/qfiledialog/tst_qfiledialog.cpp index 5d369b4..ec244c5 100644 --- a/tests/auto/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/qfiledialog/tst_qfiledialog.cpp @@ -279,7 +279,7 @@ void tst_QFiledialog::filesSelectedSignal() QNonNativeFileDialog fd; fd.setViewMode(QFileDialog::List); fd.setOptions(QFileDialog::DontUseNativeDialog); - QDir testDir(SRCDIR"/../../.."); + QDir testDir(SRCDIR); fd.setDirectory(testDir); QFETCH(QFileDialog::FileMode, fileMode); fd.setFileMode(fileMode); @@ -1308,6 +1308,10 @@ QString saveName(QWidget *, const QString &, const QString &, const QString &, Q void tst_QFiledialog::hooks() { +#ifdef Q_OS_SYMBIAN + if(QSysInfo::symbianVersion() < QSysInfo::SV_SF_3) + QSKIP("writing to data exports in paged dll not supported and crashes on symbian versions prior to ^3", SkipAll); +#endif qt_filedialog_existing_directory_hook = &existing; qt_filedialog_save_filename_hook = &saveName; qt_filedialog_open_filename_hook = &openName; |