forked from qt-creator/qt-creator
Enable QML debugging only if project includes a qml library
Use the same check as in the DebuggerRunConfigurationAspect to decide whether to enable qml debugging, or not. This allows us to follow the qmakestep setting in the run settings in a follow-up change. Task-number: QTCREATORBUG-11474 Change-Id: I67900cf719a56c0246e792c6aca66ce8e5d77daf Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
#include <projectexplorer/toolchain.h>
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <coreplugin/icontext.h>
|
||||
#include <qtsupport/debugginghelperbuildtask.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
#include <qtsupport/qtversionmanager.h>
|
||||
@@ -367,6 +368,10 @@ bool QMakeStep::linkQmlDebuggingLibrary() const
|
||||
return true;
|
||||
if (m_linkQmlDebuggingLibrary == DoNotLink)
|
||||
return false;
|
||||
|
||||
const Core::Context languages = project()->projectLanguages();
|
||||
if (!languages.contains(ProjectExplorer::Constants::LANG_QMLJS))
|
||||
return false;
|
||||
return (qmakeBuildConfiguration()->buildType() & BuildConfiguration::Debug);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user