From 1dfc34b41e815c55cb0b4a3f854b2541f26bcaf9 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 9 Jun 2022 18:19:41 +0200 Subject: [PATCH] androiddeployqt: use QFile::exists instead of QDir().exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Internally QDir().exists calls QFile::exists(filePath(name)) Change-Id: I2993d924268b10135bd9df4e9f8165b869946efc Reviewed-by: Alexey Edelev Reviewed-by: Jörg Bornemann (cherry picked from commit e2f14e5be702f89e3d54153fd7511c02729e014e) --- src/tools/androiddeployqt/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index d45a4a5784f..88e8c7eae7f 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -1898,18 +1898,18 @@ bool scanImports(Options *options, QSet *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 + QLatin1String("/qml"); - 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 + QLatin1String("/qml"))) + if (QFile::exists(prefix + QLatin1String("/qml"))) importPaths += shellQuote(prefix + QLatin1String("/qml")); // 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",