From 4e6d2a201f725a21fe3207419ba9b90263ebe704 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 11 Dec 2015 10:43:47 +0100 Subject: Debugger: Don't auto-enable QML debugging if LANG_QMLJS isn't set Change-Id: Id2734ed9615e6c4035d2eacb5bf57dbb2d5029e4 Task-number: QTCREATORBUG-15490 Reviewed-by: hjk Reviewed-by: Tobias Hunger --- src/plugins/debugger/debuggerrunconfigurationaspect.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/plugins/debugger/debuggerrunconfigurationaspect.cpp') diff --git a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp index 5c8713e473..d630eb9004 100644 --- a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp +++ b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp @@ -253,6 +253,10 @@ bool DebuggerRunConfigurationAspect::useCppDebugger() const bool DebuggerRunConfigurationAspect::useQmlDebugger() const { if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage) { + const Core::Context languages = runConfiguration()->target()->project()->projectLanguages(); + if (!languages.contains(ProjectExplorer::Constants::LANG_QMLJS)) + return false; + // // Try to find a build step (qmake) to check whether qml debugging is enabled there // (Using the Qt metatype system to avoid a hard qt4projectmanager dependency) @@ -267,9 +271,7 @@ bool DebuggerRunConfigurationAspect::useQmlDebugger() const } } - const Core::Context languages = runConfiguration()->target()->project()->projectLanguages(); - return languages.contains(ProjectExplorer::Constants::LANG_QMLJS) - && !languages.contains(ProjectExplorer::Constants::LANG_CXX); + return !languages.contains(ProjectExplorer::Constants::LANG_CXX); } return m_useQmlDebugger == DebuggerRunConfigurationAspect::EnabledLanguage; } -- cgit v1.2.1