diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-06-09 18:19:41 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-06-10 21:10:34 +0200 |
commit | e2f14e5be702f89e3d54153fd7511c02729e014e (patch) | |
tree | ecd1c810b9258318f160c3639c433204f9090e4c | |
parent | 0c82f98ec5c0135f3789f0f9c5e30978698ddff9 (diff) |
androiddeployqt: use QFile::exists instead of QDir().exists
Internally QDir().exists calls QFile::exists(filePath(name))
Pick-to: 6.2 6.3 6.4
Change-Id: I2993d924268b10135bd9df4e9f8165b869946efc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
-rw-r--r-- | src/tools/androiddeployqt/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index 14a9154069..b7d9024e8f 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -1952,18 +1952,18 @@ bool scanImports(Options *options, QSet<QString> *usedDependencies) // because it will cause qmlimportscanner to fail. // This also covers the case when only qtbase is installed in a regular Qt build. const QString mainImportPath = options->qtInstallDirectory + "/qml"_L1; - if (QDir().exists(mainImportPath)) + if (QFile::exists(mainImportPath)) importPaths += shellQuote(mainImportPath); // These are usually provided by CMake in the deployment json file from paths specified // in CMAKE_FIND_ROOT_PATH. They might not have qml modules. for (const QString &prefix : options->extraPrefixDirs) - if (QDir().exists(prefix + "/qml"_L1)) + if (QFile::exists(prefix + "/qml"_L1)) importPaths += shellQuote(prefix + "/qml"_L1); // These are provided by both CMake and qmake. for (const QString &qmlImportPath : qAsConst(options->qmlImportPaths)) { - if (QDir().exists(qmlImportPath)) { + if (QFile::exists(qmlImportPath)) { importPaths += shellQuote(qmlImportPath); } else { fprintf(stderr, "Warning: QML import path %s does not exist.\n", |