diff --git a/src/tools/androiddeployqt/CMakeLists.txt b/src/tools/androiddeployqt/CMakeLists.txt index 941e160318..98cd79a334 100644 --- a/src/tools/androiddeployqt/CMakeLists.txt +++ b/src/tools/androiddeployqt/CMakeLists.txt @@ -4,7 +4,10 @@ ## androiddeployqt App: ##################################################################### -qt_internal_add_app(androiddeployqt +qt_get_tool_target_name(target_name androiddeployqt) +qt_internal_add_tool(${target_name} + TARGET_DESCRIPTION "Qt Android Deployment Tool" + TOOLS_TARGET Core SOURCES main.cpp DEFINES @@ -16,7 +19,7 @@ qt_internal_add_app(androiddeployqt INCLUDE_DIRECTORIES ../shared ) -set_target_properties(androiddeployqt PROPERTIES +set_target_properties(${target_name} PROPERTIES WIN32_EXECUTABLE FALSE ) @@ -26,7 +29,7 @@ set_target_properties(androiddeployqt PROPERTIES ## Scopes: ##################################################################### -qt_internal_extend_target(androiddeployqt CONDITION windows +qt_internal_extend_target(${target_name} CONDITION windows COMPILE_OPTIONS -U__STRICT_ANSI__ ) diff --git a/src/tools/androiddeployqt/main.cpp b/src/tools/androiddeployqt/main.cpp index 6bf19ea1a8..2fa944a95b 100644 --- a/src/tools/androiddeployqt/main.cpp +++ b/src/tools/androiddeployqt/main.cpp @@ -395,7 +395,7 @@ void deleteMissingFiles(const Options &options, const QDir &srcDir, const QDir & for (const QFileInfo &src : srcEntries) if (dst.fileName() == src.fileName()) { if (dst.isDir()) - deleteMissingFiles(options, src.absoluteFilePath(), dst.absoluteFilePath()); + deleteMissingFiles(options, src.absoluteDir(), dst.absoluteDir()); found = true; break; } @@ -1150,16 +1150,17 @@ void cleanTopFolders(const Options &options, const QDir &srcDir, const QString & const auto dirs = srcDir.entryInfoList(QDir::NoDotAndDotDot | QDir::Dirs); for (const QFileInfo &dir : dirs) { if (dir.fileName() != QLatin1String("libs")) - deleteMissingFiles(options, dir.absoluteFilePath(), dstDir + dir.fileName()); + deleteMissingFiles(options, dir.absoluteDir(), QDir(dstDir + dir.fileName())); } } void cleanAndroidFiles(const Options &options) { if (!options.androidSourceDirectory.isEmpty()) - cleanTopFolders(options, options.androidSourceDirectory, options.outputDirectory); + cleanTopFolders(options, QDir(options.androidSourceDirectory), options.outputDirectory); - cleanTopFolders(options, options.qtInstallDirectory + QLatin1String("/src/android/templates"), options.outputDirectory); + cleanTopFolders(options, QDir(options.qtInstallDirectory + QLatin1String("/src/android/templates")), + options.outputDirectory); } bool copyAndroidTemplate(const Options &options, const QString &androidTemplate, const QString &outDirPrefix = QString()) diff --git a/src/tools/androidtestrunner/CMakeLists.txt b/src/tools/androidtestrunner/CMakeLists.txt index 9f6eb600bc..c53b9125ca 100644 --- a/src/tools/androidtestrunner/CMakeLists.txt +++ b/src/tools/androidtestrunner/CMakeLists.txt @@ -4,7 +4,10 @@ ## androidtestrunner App: ##################################################################### -qt_internal_add_app(androidtestrunner +qt_get_tool_target_name(target_name androidtestrunner) +qt_internal_add_tool(${target_name} + TARGET_DESCRIPTION "Qt Android Test Runner Tool" + TOOLS_TARGET Core SOURCES main.cpp DEFINES @@ -14,7 +17,7 @@ qt_internal_add_app(androidtestrunner PUBLIC_LIBRARIES Qt::Gui ) -set_target_properties(androidtestrunner PROPERTIES +set_target_properties(${target_name} PROPERTIES WIN32_EXECUTABLE FALSE ) @@ -24,7 +27,7 @@ set_target_properties(androidtestrunner PROPERTIES ## Scopes: ##################################################################### -qt_internal_extend_target(androidtestrunner CONDITION windows +qt_internal_extend_target(${target_name} CONDITION windows COMPILE_OPTIONS -U__STRICT_ANSI__ ) diff --git a/src/tools/androidtestrunner/main.cpp b/src/tools/androidtestrunner/main.cpp index 2e44ff61c8..3e59148cff 100644 --- a/src/tools/androidtestrunner/main.cpp +++ b/src/tools/androidtestrunner/main.cpp @@ -389,7 +389,7 @@ static bool isRunning() { return false; } - return output.indexOf(" " + g_options.package.toUtf8()) > -1; + return output.indexOf(QLatin1String(" " + g_options.package.toUtf8())) > -1; } static bool waitToFinish()