depot/pkgs/development/libraries/qt-6/patches/qttools-paths.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

27 lines
979 B
Diff

diff --git a/src/linguist/shared/runqttool.cpp b/src/linguist/shared/runqttool.cpp
index d355b9dc..94fef33f 100644
--- a/src/linguist/shared/runqttool.cpp
+++ b/src/linguist/shared/runqttool.cpp
@@ -20,9 +20,21 @@ class FMT {
Q_DECLARE_TR_FUNCTIONS(Linguist)
};
+static QString qtBasePath(QLibraryInfo::LibraryPath location)
+{
+ switch (location) {
+ case QLibraryInfo::BinariesPath:
+ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/bin");
+ case QLibraryInfo::LibraryExecutablesPath:
+ return QLatin1String(NIX_OUTPUT_OUT) + QLatin1String("/libexec");
+ default:
+ return QLibraryInfo::path(location);
+ }
+}
+
static QString qtToolFilePath(const QString &toolName, QLibraryInfo::LibraryPath location)
{
- QString filePath = QLibraryInfo::path(location) + QLatin1Char('/') + toolName;
+ QString filePath = qtBasePath(location) + QLatin1Char('/') + toolName;
#ifdef Q_OS_WIN
filePath.append(QLatin1String(".exe"));
#endif