Android: Fix QFileSystemWatcher test failures

Some of the tests expect QDir::homePath() and QDir::currentPath()
to be different, so we just set the current path to something
other than QDir::homePath().

Change-Id: Ib048d323f4745369821765230b995a73b8a97145
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2014-12-18 13:58:39 +01:00
parent 616ac8e59c
commit e511d9b9dd

View File

@ -87,6 +87,10 @@ tst_QFileSystemWatcher::tst_QFileSystemWatcher()
m_tempDirPattern += QLatin1Char('/');
m_tempDirPattern += QStringLiteral("tst_qfilesystemwatcherXXXXXX");
#endif // QT_NO_FILESYSTEMWATCHER
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
QDir::setCurrent(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
#endif
}
#ifndef QT_NO_FILESYSTEMWATCHER