summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-03-30 14:16:55 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-10 10:38:10 +0200
commit00f3299e8b499e323c3e3d9552d518a872a0695a (patch)
tree03c5f72e38a41a0f29fe447515637b6cbedcd4d6 /tests/auto
parent2756101d0e3b2a044e3e13a53421512c86dc5ba5 (diff)
Blackberry OS implementation of QStandardPaths
Change-Id: I31427b896ca691de7071da17af4863d16348df7b Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index e9af29494b..b15d5fca2c 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -49,7 +49,7 @@
#include <sys/types.h>
#endif
-#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC)
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_BLACKBERRY)
#define Q_XDG_PLATFORM
#endif
@@ -186,12 +186,16 @@ void tst_qstandardpaths::testDataLocation()
{
// On all platforms, DataLocation should be GenericDataLocation / organization name / app name
// This allows one app to access the data of another app.
+ // Blackberry OS is an exception to this case, owing to the fact that
+ // applications are sandboxed.
+#ifndef Q_OS_BLACKBERRY
const QString base = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation);
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/tst_qstandardpaths");
QCoreApplication::instance()->setOrganizationName("Qt");
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/tst_qstandardpaths");
QCoreApplication::instance()->setApplicationName("QtTest");
QCOMPARE(QStandardPaths::writableLocation(QStandardPaths::DataLocation), base + "/Qt/QtTest");
+#endif
#ifdef Q_XDG_PLATFORM
setDefaultLocations();