Android: Fix qfiledialog test for emulator bump to API 24
The qfiledialog test was failing on completer_data test. The fix available for Android 11 also works in Android 7, so removed the if clause. Task-number: QTBUG-105377 Change-Id: I76a4c1073a754c9b299cfe731f42b80da1a6f8e2 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
e4147992df
commit
8d76c5af51
@ -422,13 +422,9 @@ void tst_QFiledialog::completer_data()
|
||||
|
||||
QDir dir = QDir::root();
|
||||
#ifdef Q_OS_ANDROID
|
||||
// Android 11 and above doesn't allow accessing root filesystem as before,
|
||||
// so let's opt int for the app's home.
|
||||
if (QNativeInterface::QAndroidApplication::sdkVersion() >= 30) {
|
||||
const auto homePaths = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
|
||||
QVERIFY(!homePaths.isEmpty());
|
||||
dir = QDir(homePaths.first());
|
||||
}
|
||||
const auto homePaths = QStandardPaths::standardLocations(QStandardPaths::HomeLocation);
|
||||
QVERIFY(!homePaths.isEmpty());
|
||||
dir = QDir(homePaths.first());
|
||||
#endif
|
||||
|
||||
QFileInfoList list = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
|
Loading…
Reference in New Issue
Block a user