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 <>
Reviewed-by: default avatarJoerg Bornemann <>
parent f9d2134c
......@@ -163,10 +163,6 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
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.includePath = qt->headerPath().toString();
qtEnv.libraryPath = qt->libraryPath().toString();
......@@ -183,6 +179,11 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
qtEnv.frameworkBuild = qt->isFrameworkBuild();
qtEnv.configItems = qt->configValues();
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);
if (errorInfo.hasError()) {
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