forked from qt-creator/qt-creator
CMakePM: Fix handling of qml debugging
Add a respective aspect to the build configuration for handling qml debugging from the build side similar to what we do with qmake and qbs. Qml debugging needs to get enabled on the build side before the settings on the run configuration page has an effect. Fixes: QTCREATORBUG-23541 Change-Id: I86267747601015760737d8b21978712896892a37 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtbuildaspects.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
@@ -157,6 +158,12 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Core::Id id)
|
||||
|
||||
setConfigurationForCMake(config);
|
||||
});
|
||||
|
||||
const auto qmlDebuggingAspect = addAspect<QtSupport::QmlDebuggingAspect>();
|
||||
qmlDebuggingAspect->setKit(target->kit());
|
||||
connect(qmlDebuggingAspect, &QtSupport::QmlDebuggingAspect::changed,
|
||||
this, &CMakeBuildConfiguration::configurationForCMakeChanged);
|
||||
|
||||
}
|
||||
|
||||
CMakeBuildConfiguration::~CMakeBuildConfiguration()
|
||||
@@ -381,6 +388,11 @@ void CMakeBuildConfiguration::setWarning(const QString &message)
|
||||
emit warningOccured(m_warning);
|
||||
}
|
||||
|
||||
bool CMakeBuildConfiguration::isQmlDebuggingEnabled() const
|
||||
{
|
||||
return aspect<QtSupport::QmlDebuggingAspect>()->setting() == TriState::Enabled;
|
||||
}
|
||||
|
||||
|
||||
QString CMakeBuildConfiguration::error() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user