diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-12-19 13:08:35 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2014-12-22 09:28:05 +0100 |
commit | 244da85d3b391d72a3b7880f5c334f6c89a1af77 (patch) | |
tree | e6773dc7d04bdfd07d6333e9cd385c9a35f3de78 /tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp | |
parent | 4bee095069273ae27606a3f5b79f3aed4a94cee3 (diff) |
Android: Fix QTemporaryDir/File::nonWritableCurrentDir() tests
The /home path doesn't exist on Android, so it doesn't work as
a non-writable current dir. Instead we use /data on Android.
Change-Id: Ib779f60822da1bef421a16a00c1030245a8c5b90
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Diffstat (limited to 'tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp')
-rw-r--r-- | tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp index 3e11ba0717..a68a1185b8 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -237,7 +237,11 @@ void tst_QTemporaryDir::nonWritableCurrentDir() }; ChdirOnReturn cor(QDir::currentPath()); +#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) + QDir::setCurrent("/data"); +#else QDir::setCurrent("/home"); +#endif // QTemporaryDir("tempXXXXXX") is probably a bad idea in any app // where the current dir could anything... QTemporaryDir dir("tempXXXXXX"); |