Commit b9ab6b3f authored by Christian Kandeler's avatar Christian Kandeler

Fix detection of debug/release Qt.

QtVersion::hasDebugBuild() and QtVersion::hasReleaseBuild() don't work
as one might expect.

Task-number: QBS-757
Change-Id: I1f591750761c76a6d064f4e489ee21a6e1683ec6
Reviewed-by: default avatarOliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent f9d2134c
...@@ -163,10 +163,6 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx ...@@ -163,10 +163,6 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
qtEnv.architecture.append(QLatin1String("_64")); qtEnv.architecture.append(QLatin1String("_64"));
} }
qtEnv.binaryPath = qt->binPath().toString(); qtEnv.binaryPath = qt->binPath().toString();
if (qt->hasDebugBuild())
qtEnv.buildVariant << QLatin1String("debug");
if (qt->hasReleaseBuild())
qtEnv.buildVariant << QLatin1String("release");
qtEnv.documentationPath = qt->docsPath().toString(); qtEnv.documentationPath = qt->docsPath().toString();
qtEnv.includePath = qt->headerPath().toString(); qtEnv.includePath = qt->headerPath().toString();
qtEnv.libraryPath = qt->libraryPath().toString(); qtEnv.libraryPath = qt->libraryPath().toString();
...@@ -183,6 +179,11 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx ...@@ -183,6 +179,11 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
qtEnv.frameworkBuild = qt->isFrameworkBuild(); qtEnv.frameworkBuild = qt->isFrameworkBuild();
qtEnv.configItems = qt->configValues(); qtEnv.configItems = qt->configValues();
qtEnv.qtConfigItems = qt->qtConfigValues(); qtEnv.qtConfigItems = qt->qtConfigValues();
foreach (const QString &buildVariant,
QStringList() << QLatin1String("debug") << QLatin1String("release")) {
if (qtEnv.qtConfigItems.contains(buildVariant))
qtEnv.buildVariant << buildVariant;
}
const qbs::ErrorInfo errorInfo = qbs::setupQtProfile(profileName, settings(), qtEnv); const qbs::ErrorInfo errorInfo = qbs::setupQtProfile(profileName, settings(), qtEnv);
if (errorInfo.hasError()) { if (errorInfo.hasError()) {
Core::MessageManager::write(tr("Failed to set up kit for Qbs: %1") Core::MessageManager::write(tr("Failed to set up kit for Qbs: %1")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment