diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-16 05:28:35 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-16 05:28:35 (GMT) |
commit | a62fbc821c3c32c0ebe63a77f2705d6f1db67394 (patch) | |
tree | f0b883a68f97668c66b68c0e29407b2011c13671 /tests | |
parent | fda2044359c3361b6b525d21fc455160d0ea746a (diff) | |
download | Qt-a62fbc821c3c32c0ebe63a77f2705d6f1db67394.zip Qt-a62fbc821c3c32c0ebe63a77f2705d6f1db67394.tar.gz Qt-a62fbc821c3c32c0ebe63a77f2705d6f1db67394.tar.bz2 |
Use QDir::separator() and follow no-trailing-slash convention.
Fixes QTBUG-5841
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/declarative/qmlengine/tst_qmlengine.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlengine/tst_qmlengine.cpp b/tests/auto/declarative/qmlengine/tst_qmlengine.cpp index ef1eee5..e060e7f 100644 --- a/tests/auto/declarative/qmlengine/tst_qmlengine.cpp +++ b/tests/auto/declarative/qmlengine/tst_qmlengine.cpp @@ -159,10 +159,18 @@ void tst_qmlengine::contextForObject() void tst_qmlengine::offlineStoragePath() { + // Without these set, QDesktopServices::storageLocation returns + // strings with extra "//" at the end. We set them to ignore this problem. + qApp->setApplicationName("tst_qmlengine"); + qApp->setOrganizationName("Nokia"); + qApp->setOrganizationDomain("nokia.com"); + QmlEngine engine; QDir dir(QDesktopServices::storageLocation(QDesktopServices::DataLocation)); + dir.mkpath("QML"); dir.cd("QML"); + dir.mkpath("OfflineStorage"); dir.cd("OfflineStorage"); QCOMPARE(engine.offlineStoragePath(), dir.path()); |