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>bb10
parent
9a34b69b7d
commit
a0c21829ea
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue