diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp index 00c38b9752..d7faf8a76b 100644 --- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp +++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp @@ -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);