Detach QML debugging option from qmakes build mode

The coupling of qml_debug to qmake's Debug profile is both brittle and
wrong. There are good reasons to also enable qml debugging in certain
Release builds and changing the build type of a specific build often
leaves the UI in an inconsistent state.

Change-Id: I89cb86849c984278ebfc54f66f139ec482b18d9a
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-10-01 15:41:04 +02:00
parent 14eafd5dca
commit 703ce02d4c
3 changed files with 16 additions and 28 deletions

View File

@@ -570,6 +570,8 @@ QmakeBuildInfo *QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
info->displayName = tr("Debug");
//: Non-ASCII characters in directory suffix may cause build issues.
suffix = tr("Debug", "Shadow build directory suffix");
if (version && version->qtVersion().majorVersion >= 5)
info->config.linkQmlDebuggingQQ2 = true;
}
info->typeName = info->displayName;
// Leave info->buildDirectory unset;
@@ -669,8 +671,7 @@ void QmakeBuildConfigurationFactory::configureBuildConfiguration(Target *parent,
QString additionalArguments = qmakeInfo->additionalArguments;
if (!additionalArguments.isEmpty())
qmakeStep->setUserArguments(additionalArguments);
if (!qmakeInfo->makefile.isEmpty())
qmakeStep->setLinkQmlDebuggingLibrary(qmakeInfo->config.linkQmlDebuggingQQ2);
qmakeStep->setLinkQmlDebuggingLibrary(qmakeInfo->config.linkQmlDebuggingQQ2);
qmakeStep->setSeparateDebugInfo(qmakeInfo->config.separateDebugInfo);
qmakeStep->setUseQtQuickCompiler(qmakeInfo->config.useQtQuickCompiler);