From 8f8fa81c30831f295fa8d2215fc08f793e61bc92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Cotty?= Date: Thu, 3 Dec 2020 20:59:34 +0100 Subject: [PATCH] Qbs: Fix executable path in equivalent command line Use QbsSettings to get qbs executable file path. Change-Id: Ie8e9dc85712a2a51ee14b5715cf5529ecd3b44c0 Reviewed-by: Christian Kandeler --- src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp index 07ea3cd1b8d..5dff4d1b414 100644 --- a/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp +++ b/src/plugins/qbsprojectmanager/qbsbuildconfiguration.cpp @@ -272,11 +272,7 @@ QString QbsBuildConfiguration::configurationName() const QString QbsBuildConfiguration::equivalentCommandLine(const QbsBuildStepData &stepData) const { CommandLine commandLine; - const QString qbsInstallDir = QString::fromLocal8Bit(qgetenv("QBS_INSTALL_DIR")); - const QString qbsFilePath = HostOsInfo::withExecutableSuffix(!qbsInstallDir.isEmpty() - ? qbsInstallDir + QLatin1String("/bin/qbs") - : QCoreApplication::applicationDirPath() + QLatin1String("/qbs")); - commandLine.addArg(QDir::toNativeSeparators(qbsFilePath)); + commandLine.addArg(QDir::toNativeSeparators(QbsSettings::qbsExecutableFilePath().toString())); commandLine.addArg(stepData.command); const QString buildDir = buildDirectory().toUserOutput(); commandLine.addArgs({"-d", buildDir});