diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2015-01-12 14:30:28 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com> | 2015-01-16 09:27:45 +0100 |
commit | a0c21829eaa2bfc70b4d134c26ac96a63e48a6a5 (patch) | |
tree | a1d32c1104eafe68e4ae936bd34996561158f5df /tests/auto/widgets/dialogs/qsidebar | |
parent | 9a34b69b7dfa40d19957a61457fc47e25af2d81f (diff) |
Android: Fix QSideBar test
On Android, the HOME and TMPDIR environment variables both point
to the application sandbox, whereas the QSideBar test assumed
they were different. We work around this simply by creating
a new directory and using this as the test dir in place of the
home directory.
Change-Id: I67e01926b901ddf237b05aff116d30b6c7885535
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Diffstat (limited to 'tests/auto/widgets/dialogs/qsidebar')
-rw-r--r-- | tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp index 3ed8e1e88e..273be1d9c3 100644 --- a/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp +++ b/tests/auto/widgets/dialogs/qsidebar/tst_qsidebar.cpp @@ -113,6 +113,12 @@ void tst_QSidebar::addUrls() QAbstractItemModel *model = qsidebar.model(); QDir testDir = QDir::home(); +#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK) + // temp and home is the same directory on Android + testDir.mkdir(QStringLiteral("test")); + QVERIFY(testDir.cd(QStringLiteral("test"))); +#endif + // default QCOMPARE(model->rowCount(), 0); |