diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-03-11 16:23:24 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-03-12 16:11:05 +0000 |
commit | 123a57edd73b65736332412ef35e7da684dd75af (patch) | |
tree | 28ec0f1af90889ec86680637ce078e8789edef4a | |
parent | 8fb6deed5821d559cc7e5aa9bdffc36a371a111f (diff) | |
download | qttools-123a57edd73b65736332412ef35e7da684dd75af.tar.gz |
lprodump: Get Qt's bin path from QLibraryInfo
Do not assume that qmake is next to lprodump, because that won't be the
case after moving lprodump to libexec.
Task-number: QTBUG-88791
Change-Id: I4efd4c00d614a9e82aab285c2d6ffa02e51dab22
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit d45703f33b8e7458d6f102b1d4d4f709397aa89d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/linguist/lprodump/main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/linguist/lprodump/main.cpp b/src/linguist/lprodump/main.cpp index 9ef5faa9c..d1d4f60e2 100644 --- a/src/linguist/lprodump/main.cpp +++ b/src/linguist/lprodump/main.cpp @@ -38,6 +38,7 @@ #include <QtCore/QDirIterator> #include <QtCore/QFile> #include <QtCore/QFileInfo> +#include <QtCore/QLibraryInfo> #include <QtCore/QRegularExpression> #include <QtCore/QString> #include <QtCore/QStringList> @@ -442,8 +443,10 @@ int main(int argc, char **argv) bool fail = false; ProFileGlobals option; option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE")); - if (option.qmake_abslocation.isEmpty()) - option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake"); + if (option.qmake_abslocation.isEmpty()) { + option.qmake_abslocation = QLibraryInfo::path(QLibraryInfo::BinariesPath) + + QLatin1String("/qmake"); + } option.debugLevel = proDebug; option.initProperties(); option.setCommandLineArguments(QDir::currentPath(), |