aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2013-08-12 17:04:10 +0200
committerhjk <[email protected]>2013-08-16 16:20:45 +0200
commit20d7d5e5b72cdb6d379729706087712eb3574e11 (patch)
treeabe72698e3fc1bfe2669da079c8ba91cfd00ca69 /src/plugins/debugger/debuggerrunconfigurationaspect.cpp
parent02105ddf62b40abae18c9155c376fdd6bf13991d (diff)
ProjectExplorer/Analyzer: Merge RunConfigurationAspects
The Analyzer implementation is now simple and still generic enough to serve as general base. Change-Id: I050a21919bf128929b77a64da1f46d157691d849 Reviewed-by: Daniel Teske <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerrunconfigurationaspect.cpp')
-rw-r--r--src/plugins/debugger/debuggerrunconfigurationaspect.cpp47
1 files changed, 11 insertions, 36 deletions
diff --git a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
index 78d0f345556..90c4c1b248a 100644
--- a/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
+++ b/src/plugins/debugger/debuggerrunconfigurationaspect.cpp
@@ -194,48 +194,32 @@ void DebuggerRunConfigWidget::useMultiProcessToggled(bool on)
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(
ProjectExplorer::RunConfiguration *rc) :
- m_runConfiguration(rc),
+ IRunConfigurationAspect(rc),
m_useCppDebugger(AutoEnabledLanguage),
m_useQmlDebugger(AutoEnabledLanguage),
m_qmlDebugServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
m_useMultiProcess(false)
{
- ctor();
-}
-
-DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(
- ProjectExplorer::RunConfiguration *runConfiguration,
- const DebuggerRunConfigurationAspect *other)
- : m_runConfiguration(runConfiguration),
- m_useCppDebugger(other->m_useCppDebugger),
- m_useQmlDebugger(other->m_useQmlDebugger),
- m_qmlDebugServerPort(other->m_qmlDebugServerPort),
- m_useMultiProcess(other->m_useMultiProcess)
-{
- ctor();
-}
-
-ProjectExplorer::RunConfiguration *DebuggerRunConfigurationAspect::runConfiguration()
-{
- return m_runConfiguration;
+ setId("DebuggerAspect");
+ setDisplayName(tr("Debugger settings"));
}
void DebuggerRunConfigurationAspect::setUseQmlDebugger(bool value)
{
m_useQmlDebugger = value ? EnabledLanguage : DisabledLanguage;
- emit debuggersChanged();
+ emit requestRunActionsUpdate();
}
void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value)
{
m_useCppDebugger = value ? EnabledLanguage : DisabledLanguage;
- emit debuggersChanged();
+ emit requestRunActionsUpdate();
}
bool DebuggerRunConfigurationAspect::useCppDebugger() const
{
if (m_useCppDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage)
- return m_runConfiguration->target()->project()->projectLanguages().contains(
+ return runConfiguration()->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_CXX);
return m_useCppDebugger == DebuggerRunConfigurationAspect::EnabledLanguage;
}
@@ -243,7 +227,7 @@ bool DebuggerRunConfigurationAspect::useCppDebugger() const
bool DebuggerRunConfigurationAspect::useQmlDebugger() const
{
if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnabledLanguage)
- return m_runConfiguration->target()->project()->projectLanguages().contains(
+ return runConfiguration()->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS);
return m_useQmlDebugger == DebuggerRunConfigurationAspect::EnabledLanguage;
}
@@ -270,7 +254,7 @@ void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value)
bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const
{
- ProjectExplorer::Kit *k = m_runConfiguration->target()->kit();
+ ProjectExplorer::Kit *k = runConfiguration()->target()->kit();
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceKitInformation::device(k);
if (dev.isNull())
return false;
@@ -304,10 +288,10 @@ void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
m_useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
}
-DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(
- ProjectExplorer::RunConfiguration *parent) const
+DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::create
+ (ProjectExplorer::RunConfiguration *runConfiguration) const
{
- return new DebuggerRunConfigurationAspect(parent, this);
+ return new DebuggerRunConfigurationAspect(runConfiguration);
}
ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigurationWidget()
@@ -315,15 +299,6 @@ ProjectExplorer::RunConfigWidget *DebuggerRunConfigurationAspect::createConfigur
return new Internal::DebuggerRunConfigWidget(this);
}
-void DebuggerRunConfigurationAspect::ctor()
-{
- setId("DebuggerAspect");
- setDisplayName(tr("Debugger settings"));
-
- connect(this, SIGNAL(debuggersChanged()),
- m_runConfiguration, SIGNAL(requestRunActionsUpdate()));
-}
-
} // namespace Debugger