Группа :: Система/Библиотеки
Пакет: qt5-tools
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: alt-runqttools-with-qt5-suffix.patch
Скачать
Скачать
--- a/src/linguist/shared/runqttool.cpp
+++ b/src/linguist/shared/runqttool.cpp
@@ -33,6 +33,7 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/qdir.h>
#include <QtCore/qregexp.h>
+#include <QtCore/qstandardpaths.h>
#include <cstdlib>
#include <iostream>
@@ -47,11 +48,15 @@ class FMT {
static QString qtToolFilePath(const QString &toolName)
{
- QString filePath = QCoreApplication::instance()->applicationDirPath()
- + QLatin1Char('/') + toolName;
-#ifdef Q_OS_WIN
- filePath.append(QLatin1String(".exe"));
-#endif
+ QString toolName_qt5(toolName);
+ toolName_qt5.append(QLatin1String("-qt5"));
+ QString filePath = QStandardPaths::findExecutable(toolName_qt5);
+ if( filePath.isEmpty() ) {
+ filePath = QStandardPaths::findExecutable(toolName);
+ if( filePath.isEmpty() ) {
+ QString filePath = QCoreApplication::instance()->applicationDirPath() + QLatin1Char('/') + toolName;
+ }
+ }
return QDir::cleanPath(filePath);
}
--- a/src/linguist/lprodump/main.cpp
+++ b/src/linguist/lprodump/main.cpp
@@ -438,7 +438,7 @@ int main(int argc, char **argv)
ProFileGlobals option;
option.qmake_abslocation = QString::fromLocal8Bit(qgetenv("QMAKE"));
if (option.qmake_abslocation.isEmpty())
- option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake");
+ option.qmake_abslocation = app.applicationDirPath() + QLatin1String("/qmake-qt5");
option.debugLevel = proDebug;
option.initProperties();
option.setCommandLineArguments(QDir::currentPath(),