forked from qt-creator/qt-creator
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: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
@@ -163,10 +163,6 @@ void QbsManager::addQtProfileFromKit(const QString &profileName, const ProjectEx
|
||||
qtEnv.architecture.append(QLatin1String("_64"));
|
||||
}
|
||||
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")
|
||||
|
Reference in New Issue
Block a user