diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2023-12-01 10:49:39 +0100 |
---|---|---|
committer | Oliver Wolff <oliver.wolff@qt.io> | 2023-12-11 11:14:18 +0000 |
commit | bf2f4678b0c1a17ad8d18809335cfb69d2c6527a (patch) | |
tree | 816603c2723a230029a60afe418cf5c8689a1114 /src/tools/windeployqt/main.cpp | |
parent | ca38ac77313cd4ad1436fae28ec43dc219ea341d (diff) |
windeployqt: Proper error message when qtpaths.bat/.exe could not be run
If qtpaths cannt be found windeployqt should complain about that fact.
Previously it complained about "Unsupported platform".
Pick-to: 6.7 6.6 6.5
Change-Id: I4db954633c31ceac69c4d3c0e55cbe942c3272fd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/tools/windeployqt/main.cpp')
-rw-r--r-- | src/tools/windeployqt/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/windeployqt/main.cpp b/src/tools/windeployqt/main.cpp index cc9a3f88dd..0f991bf02a 100644 --- a/src/tools/windeployqt/main.cpp +++ b/src/tools/windeployqt/main.cpp @@ -1777,18 +1777,18 @@ int main(int argc, char **argv) const QMap<QString, QString> qtpathsVariables = queryQtPaths(options.qtpathsBinary, &errorMessage); const QString xSpec = qtpathsVariables.value(QStringLiteral("QMAKE_XSPEC")); - options.platform = platformFromMkSpec(xSpec); - if (options.platform == UnknownPlatform) { - std::wcerr << "Unsupported platform " << xSpec << '\n'; - return 1; - } - if (qtpathsVariables.isEmpty() || xSpec.isEmpty() || !qtpathsVariables.contains(QStringLiteral("QT_INSTALL_BINS"))) { std::wcerr << "Unable to query qtpaths: " << errorMessage << '\n'; return 1; } + options.platform = platformFromMkSpec(xSpec); + if (options.platform == UnknownPlatform) { + std::wcerr << "Unsupported platform " << xSpec << '\n'; + return 1; + } + // Read the Qt module information from the Qt installation directory. const QString modulesDir = qtpathsVariables.value(QLatin1String("QT_INSTALL_ARCHDATA")) |