diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp index cc857ad3d3488bb816a47ecb4ee694da8284e72c..af6021fce163148343ab988dc721c3938bc12904 100644 --- a/src/plugins/android/androiddebugsupport.cpp +++ b/src/plugins/android/androiddebugsupport.cpp @@ -91,7 +91,9 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * params.displayName = AndroidManager::packageName(target); params.remoteSetupNeeded = true; - if (runConfig->debuggerAspect()->useCppDebugger()) { + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + if (aspect->useCppDebugger()) { params.languages |= CppLanguage; Kit *kit = target->kit(); params.sysRoot = SysRootKitInformation::sysRoot(kit).toString(); @@ -108,10 +110,10 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); params.solibSearchPath.append(qtSoPaths(version)); } - if (runConfig->debuggerAspect()->useQmlDebugger()) { + if (aspect->useQmlDebugger()) { params.languages |= QmlLanguage; params.qmlServerAddress = QLatin1String("localhost"); - params.qmlServerPort = runConfig->debuggerAspect()->qmlDebugServerPort(); + params.qmlServerPort = aspect->qmlDebugServerPort(); //TODO: Not sure if these are the right paths. params.projectSourceDirectory = project->projectDirectory(); params.projectSourceFiles = project->files(Qt4Project::ExcludeGeneratedFiles); @@ -128,9 +130,13 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig, DebuggerRunControl *runControl) : QObject(runControl), m_runControl(runControl), m_runner(new AndroidRunner(this, runConfig, true)), - m_gdbServerPort(5039), m_qmlPort(runConfig->debuggerAspect()->qmlDebugServerPort()) + m_gdbServerPort(5039), + m_qmlPort(0) { - Q_ASSERT(runConfig->debuggerAspect()->useCppDebugger() || runConfig->debuggerAspect()->useQmlDebugger()); + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + m_qmlPort = aspect->qmlDebugServerPort(); + Q_ASSERT(aspect->useCppDebugger() || aspect->useQmlDebugger()); connect(m_runControl->engine(), SIGNAL(requestRemoteSetup()), m_runner, SLOT(start())); diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp index 7b7d96334376815b7c4435c6bfb6ee33f89842da..8eda828457395f3734e786c57034aa755d5b1209 100644 --- a/src/plugins/android/androidrunner.cpp +++ b/src/plugins/android/androidrunner.cpp @@ -46,10 +46,12 @@ namespace Internal { AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode) : QThread(parent) { - m_useCppDebugger = debuggingMode && runConfig->debuggerAspect()->useCppDebugger(); - m_useQmlDebugger = debuggingMode && runConfig->debuggerAspect()->useQmlDebugger(); + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + m_useCppDebugger = debuggingMode && aspect->useCppDebugger(); + m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger(); m_remoteGdbChannel = runConfig->remoteChannel(); - m_qmlPort = runConfig->debuggerAspect()->qmlDebugServerPort(); + m_qmlPort = aspect->qmlDebugServerPort(); ProjectExplorer::Target *target = runConfig->target(); AndroidDeployStep *ds = runConfig->deployStep(); if ((m_useLocalQtLibs = ds->useLocalQtLibs())) { diff --git a/src/plugins/debugger/debuggermainwindow.cpp b/src/plugins/debugger/debuggermainwindow.cpp index a88b5cc748fec74312547bb699afb09dcc97ad68..aa0546a1457d2a0a6d24246d45977728480a6653 100644 --- a/src/plugins/debugger/debuggermainwindow.cpp +++ b/src/plugins/debugger/debuggermainwindow.cpp @@ -200,13 +200,14 @@ void DebuggerMainWindowPrivate::updateUiForTarget(Target *target) void DebuggerMainWindowPrivate::updateUiForRunConfiguration(RunConfiguration *rc) { if (m_previousRunConfiguration) - disconnect(m_previousRunConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()), + disconnect(m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(), + SIGNAL(debuggersChanged()), this, SLOT(updateUiForCurrentRunConfiguration())); m_previousRunConfiguration = rc; updateUiForCurrentRunConfiguration(); if (!rc) return; - connect(m_previousRunConfiguration->debuggerAspect(), + connect(m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(), SIGNAL(debuggersChanged()), SLOT(updateUiForCurrentRunConfiguration())); } @@ -224,9 +225,9 @@ void DebuggerMainWindowPrivate::updateActiveLanguages() newLanguages = m_engineDebugLanguages; else { if (m_previousRunConfiguration) { - if (m_previousRunConfiguration->debuggerAspect()->useCppDebugger()) + if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()) newLanguages |= CppLanguage; - if (m_previousRunConfiguration->debuggerAspect()->useQmlDebugger()) + if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger()) newLanguages |= QmlLanguage; } } diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index fcf0b9090b112bbf76b51b324e3b4018d7776f34..b33ed26d12b715fb1249bb40e7e91ea9108f91a3 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -478,7 +478,7 @@ bool DummyEngine::hasCapability(unsigned cap) const QTC_ASSERT(activeRc, return 0); // This is a non-started Cdb or Gdb engine: - if (activeRc->debuggerAspect()->useCppDebugger()) + if (activeRc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()) return cap & (WatchpointByAddressCapability | BreakConditionCapability | TracePointCapability diff --git a/src/plugins/debugger/debuggerruncontrolfactory.h b/src/plugins/debugger/debuggerruncontrolfactory.h index 74f7020b2e30e19bf1cf5d46aba2dd359ab685f3..e61339bbc603ce03c3f4f14e83bb82ec201a5528 100644 --- a/src/plugins/debugger/debuggerruncontrolfactory.h +++ b/src/plugins/debugger/debuggerruncontrolfactory.h @@ -66,6 +66,9 @@ public: static DebuggerRunControl *doCreate(const DebuggerStartParameters &sp, ProjectExplorer::RunConfiguration *rc, QString *errorMessage); + ProjectExplorer::IRunConfigurationAspect *createRunConfigurationAspect( + ProjectExplorer::RunConfiguration *rc); + private: QString displayName() const; ProjectExplorer::RunConfigWidget *createConfigurationWidget( diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index 02f7517ee1167b9e5c34c3f2720eecb74e8dac3e..ca128996f59de623e6a3b7bc39e761a73854f699 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -49,6 +49,7 @@ #include <projectexplorer/buildconfiguration.h> #include <projectexplorer/project.h> #include <projectexplorer/projectexplorer.h> +#include <projectexplorer/runconfiguration.h> #include <projectexplorer/target.h> #include <projectexplorer/taskhub.h> @@ -144,7 +145,7 @@ public: DebuggerRunConfigWidget::DebuggerRunConfigWidget(RunConfiguration *runConfiguration) { - m_aspect = runConfiguration->debuggerAspect(); + m_aspect = runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); m_useCppDebugger = new QCheckBox(tr("Enable C++"), this); m_useQmlDebugger = new QCheckBox(tr("Enable QML"), this); @@ -508,7 +509,8 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu } } - DebuggerRunConfigurationAspect *aspect = runConfiguration->debuggerAspect(); + DebuggerRunConfigurationAspect *aspect + = runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); sp.multiProcess = aspect->useMultiProcess(); if (aspect->useCppDebugger()) @@ -582,7 +584,8 @@ static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc, } if (rc) { - DebuggerRunConfigurationAspect *aspect = rc->debuggerAspect(); + DebuggerRunConfigurationAspect *aspect + = rc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); if (const Target *target = rc->target()) if (!fillParameters(&sp, target->kit(), errorMessage)) return false; @@ -634,6 +637,11 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate return new DebuggerRunControl(rc, sp); } +IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc) +{ + return new DebuggerRunConfigurationAspect(rc); +} + DebuggerRunControl *DebuggerRunControlFactory::createAndScheduleRun (const DebuggerStartParameters &sp, RunConfiguration *runConfiguration) { diff --git a/src/plugins/madde/maemorunconfiguration.cpp b/src/plugins/madde/maemorunconfiguration.cpp index edac56f3fa4eb3748dea989b0631b2e2a4525a51..de0a5af3b733ca26c7609318a2ab26dfe4fd5e39 100644 --- a/src/plugins/madde/maemorunconfiguration.cpp +++ b/src/plugins/madde/maemorunconfiguration.cpp @@ -78,7 +78,7 @@ void MaemoRunConfiguration::init() connect(m_remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged())); if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) != HarmattanOsType) - debuggerAspect()->suppressQmlDebuggingOptions(); + extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingOptions(); } bool MaemoRunConfiguration::isEnabled() const diff --git a/src/plugins/madde/maemorunconfigurationwidget.cpp b/src/plugins/madde/maemorunconfigurationwidget.cpp index f000b3a7e984f5753da7ac20e4ef1049beffbff1..4d1fdfdeebb6d32a83be89d6419d9c736368f456 100644 --- a/src/plugins/madde/maemorunconfigurationwidget.cpp +++ b/src/plugins/madde/maemorunconfigurationwidget.cpp @@ -83,7 +83,8 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget( subLayout->setMargin(0); addMountWidgets(subLayout); connect(m_runConfiguration->target(), SIGNAL(kitChanged()), this, SLOT(updateMountWarning())); - connect(m_runConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()), + connect(m_runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(), + SIGNAL(debuggersChanged()), SLOT(updateMountWarning())); updateMountWarning(); diff --git a/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp b/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp index 841cc46391f7a1de71e146c6f6ee72e4d3305e08..f133532989243cfa3f6c0b5a37710f9a8d88403b 100644 --- a/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp +++ b/src/plugins/projectexplorer/localapplicationrunconfiguration.cpp @@ -39,19 +39,11 @@ namespace ProjectExplorer { LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, const Core::Id id) : RunConfiguration(target, id) -{ - ctor(); -} +{ } LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc) : RunConfiguration(target, rc) -{ - ctor(); -} - -LocalApplicationRunConfiguration::~LocalApplicationRunConfiguration() -{ -} +{ } Utils::AbstractMacroExpander *LocalApplicationRunConfiguration::macroExpander() const { @@ -60,9 +52,4 @@ Utils::AbstractMacroExpander *LocalApplicationRunConfiguration::macroExpander() return Core::VariableManager::macroExpander(); } -void LocalApplicationRunConfiguration::ctor() -{ - debuggerAspect()->suppressQmlDebuggingSpinbox(); -} - } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/localapplicationrunconfiguration.h b/src/plugins/projectexplorer/localapplicationrunconfiguration.h index 8d9a57bd2aa9cf8ac9013650ddd08862a9a51ab2..e805fefcdd78bf64d3f9799d7440e9b8b3d29e30 100644 --- a/src/plugins/projectexplorer/localapplicationrunconfiguration.h +++ b/src/plugins/projectexplorer/localapplicationrunconfiguration.h @@ -49,7 +49,6 @@ public: Gui }; - virtual ~LocalApplicationRunConfiguration(); virtual QString executable() const = 0; virtual RunMode runMode() const = 0; virtual QString workingDirectory() const = 0; @@ -63,9 +62,6 @@ protected: explicit LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc); Utils::AbstractMacroExpander *macroExpander() const; - -private: - void ctor(); }; } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp index e7828bbd52f88e8572dbf25790b5f1dfdeadc836..05114f631f1589b627ca5ae8d5f05619fa887ee5 100644 --- a/src/plugins/projectexplorer/projectexplorer.cpp +++ b/src/plugins/projectexplorer/projectexplorer.cpp @@ -2370,14 +2370,15 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged() if (previousRunConfiguration) { disconnect(previousRunConfiguration, SIGNAL(enabledChanged()), this, SIGNAL(updateRunActions())); - disconnect(previousRunConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()), + disconnect(previousRunConfiguration->extraAspect<DebuggerRunConfigurationAspect>(), + SIGNAL(debuggersChanged()), this, SIGNAL(updateRunActions())); } previousRunConfiguration = rc; if (rc) { connect(rc, SIGNAL(enabledChanged()), this, SIGNAL(updateRunActions())); - connect(rc->debuggerAspect(), SIGNAL(debuggersChanged()), + connect(rc->extraAspect<DebuggerRunConfigurationAspect>(), SIGNAL(debuggersChanged()), this, SIGNAL(updateRunActions())); } emit updateRunActions(); diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 8d36b864dcc96766e96ff4de502597d9419360b8..718f082350430c09f7978f08dc63d45eb5da1d0c 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -272,7 +272,6 @@ DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(RunConfigu RunConfiguration::RunConfiguration(Target *target, const Core::Id id) : ProjectConfiguration(target, id), - m_debuggerAspect(new DebuggerRunConfigurationAspect(this)), m_aspectsInitialized(false) { Q_ASSERT(target); @@ -280,7 +279,6 @@ RunConfiguration::RunConfiguration(Target *target, const Core::Id id) : RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) : ProjectConfiguration(target, source), - m_debuggerAspect(source->debuggerAspect()->clone(this)), m_aspectsInitialized(true) { Q_ASSERT(target); @@ -293,7 +291,6 @@ RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) : RunConfiguration::~RunConfiguration() { - delete m_debuggerAspect; qDeleteAll(m_aspects); } @@ -359,8 +356,6 @@ QVariantMap RunConfiguration::toMap() const { QVariantMap map = ProjectConfiguration::toMap(); - map.unite(m_debuggerAspect->toMap()); - foreach (IRunConfigurationAspect *aspect, m_aspects) map.unite(aspect->toMap()); @@ -381,7 +376,6 @@ ProjectExplorer::Abi RunConfiguration::abi() const bool RunConfiguration::fromMap(const QVariantMap &map) { addExtraAspects(); - m_debuggerAspect->fromMap(map); foreach (IRunConfigurationAspect *aspect, m_aspects) aspect->fromMap(map); diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index d7fc752477321becff0beb1d663f9e9a2b2a17c0..728a1311d9912f839e2e3c29ec7686d9bcaad472 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -166,8 +166,6 @@ public: bool fromMap(const QVariantMap &map); QVariantMap toMap() const; - DebuggerRunConfigurationAspect *debuggerAspect() const { return m_debuggerAspect; } - QList<IRunConfigurationAspect *> extraAspects() const; template <typename T> T *extraAspect() const { @@ -198,7 +196,6 @@ protected: private: QList<IRunConfigurationAspect *> m_aspects; - DebuggerRunConfigurationAspect *m_debuggerAspect; bool m_aspectsInitialized; }; diff --git a/src/plugins/qmlprofiler/qmlprofilerengine.cpp b/src/plugins/qmlprofiler/qmlprofilerengine.cpp index 6914286dc66789ff8ba69c9c67056d47f91785bd..653599e8070cee0c6bbf10aab4967e2639fa1b48 100644 --- a/src/plugins/qmlprofiler/qmlprofilerengine.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerengine.cpp @@ -83,6 +83,8 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo AbstractQmlProfilerRunner *runner = 0; if (!runConfiguration) // attaching return 0; + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); if (QmlProjectManager::QmlProjectRunConfiguration *rc1 = qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration)) { // This is a "plain" .qmlproject. @@ -91,7 +93,7 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo conf.executableArguments = rc1->viewerArguments(); conf.workingDirectory = rc1->workingDirectory(); conf.environment = rc1->environment(); - conf.port = rc1->debuggerAspect()->qmlDebugServerPort(); + conf.port = aspect->qmlDebugServerPort(); runner = new LocalQmlProfilerRunner(conf, parent); } else if (LocalApplicationRunConfiguration *rc2 = qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) { @@ -101,7 +103,7 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo conf.executableArguments = rc2->commandLineArguments(); conf.workingDirectory = rc2->workingDirectory(); conf.environment = rc2->environment(); - conf.port = rc2->debuggerAspect()->qmlDebugServerPort(); + conf.port = aspect->qmlDebugServerPort(); runner = new LocalQmlProfilerRunner(conf, parent); } else if (RemoteLinux::RemoteLinuxRunConfiguration *rmConfig = qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) { diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 14a8750f9415d4da64ee936505f09e1c9545f709..7fe8013dda99f0f4b7ce88c18bd68295f76f4c03 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -299,6 +299,9 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration AnalyzerStartParameters sp; sp.startMode = StartQml; // FIXME: The parameter struct is not needed/not used. + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + // FIXME: This is only used to communicate the connParams settings. if (QmlProjectRunConfiguration *rc1 = qobject_cast<QmlProjectRunConfiguration *>(runConfiguration)) { @@ -309,7 +312,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration sp.debuggeeArgs = rc1->viewerArguments(); sp.displayName = rc1->displayName(); sp.connParams.host = QLatin1String("localhost"); - sp.connParams.port = rc1->debuggerAspect()->qmlDebugServerPort(); + sp.connParams.port = aspect->qmlDebugServerPort(); } else if (LocalApplicationRunConfiguration *rc2 = qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) { sp.environment = rc2->environment(); @@ -318,7 +321,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration sp.debuggeeArgs = rc2->commandLineArguments(); sp.displayName = rc2->displayName(); sp.connParams.host = QLatin1String("localhost"); - sp.connParams.port = rc2->debuggerAspect()->qmlDebugServerPort(); + sp.connParams.port = aspect->qmlDebugServerPort(); } else if (RemoteLinux::RemoteLinuxRunConfiguration *rc3 = qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) { sp.debuggee = rc3->remoteExecutableFilePath(); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index fc49e5b1418c1d102bb03731362000da91c84eb3..63512c98e080dba3506cd67bf577c471d979f3da 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -91,9 +91,11 @@ QString QmlProjectRunConfiguration::disabledReason() const void QmlProjectRunConfiguration::ctor() { // reset default settings in constructor - debuggerAspect()->setUseCppDebugger(false); - debuggerAspect()->setUseQmlDebugger(true); - debuggerAspect()->suppressQmlDebuggingSpinbox(); + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + aspect->setUseCppDebugger(false); + aspect->setUseQmlDebugger(true); + aspect->suppressQmlDebuggingSpinbox(); EditorManager *em = Core::EditorManager::instance(); connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)), diff --git a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp index 8612ab28ae05804741425a2eb1a83b84bb177f0b..b9096855cb1e440497a52299a412c36ff0e11804 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectruncontrol.cpp @@ -200,6 +200,8 @@ QString QmlProjectRunControlFactory::displayName() const RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig, QString *errorMessage) { Debugger::DebuggerStartParameters params; + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); params.startMode = Debugger::StartInternal; params.executable = runConfig->observerPath(); params.processArgs = runConfig->viewerArguments(); @@ -208,7 +210,7 @@ RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConf params.displayName = runConfig->displayName(); params.projectSourceDirectory = runConfig->target()->project()->projectDirectory(); params.projectSourceFiles = runConfig->target()->project()->files(Project::ExcludeGeneratedFiles); - if (runConfig->debuggerAspect()->useQmlDebugger()) { + if (aspect->useQmlDebugger()) { const ProjectExplorer::IDevice::ConstPtr device = DeviceKitInformation::device(runConfig->target()->kit()); params.qmlServerAddress = QLatin1String("127.0.0.1"); @@ -236,7 +238,7 @@ RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConf QString::fromLatin1("-qmljsdebugger=port:%1,block").arg( params.qmlServerPort)); } - if (runConfig->debuggerAspect()->useCppDebugger()) + if (aspect->useCppDebugger()) params.languages |= Debugger::CppLanguage; if (params.executable.isEmpty()) { diff --git a/src/plugins/qnx/blackberrycreatepackagestep.cpp b/src/plugins/qnx/blackberrycreatepackagestep.cpp index 5ad4b2beadb032aa95e1b521af3e00820a171d58..9dce5695120611307141bf8eed8c3dd744ec9075 100644 --- a/src/plugins/qnx/blackberrycreatepackagestep.cpp +++ b/src/plugins/qnx/blackberrycreatepackagestep.cpp @@ -191,10 +191,12 @@ bool BlackBerryCreatePackageStep::prepareAppDescriptorFile(const QString &appDes fileContent.replace(SRC_DIR_VAR, QDir::toNativeSeparators(target()->project()->projectDirectory()).toLatin1()); // Add parameter for QML debugging (if enabled) - if (target()->activeRunConfiguration()->debuggerAspect()->useQmlDebugger()) { + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = target()->activeRunConfiguration()->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + if (aspect->useQmlDebugger()) { if (!fileContent.contains("-qmljsdebugger")) { const QString argString = QString::fromLatin1("<arg>-qmljsdebugger=port:%1</arg>\n</qnx>") - .arg(target()->activeRunConfiguration()->debuggerAspect()->qmlDebugServerPort()); + .arg(aspect->qmlDebugServerPort()); fileContent.replace("</qnx>", argString.toLatin1()); } } diff --git a/src/plugins/qnx/blackberryruncontrolfactory.cpp b/src/plugins/qnx/blackberryruncontrolfactory.cpp index 62ef7629f3807706efe839bf4a0676a79de4315b..73e8e471bd51031c933adc2bb9a19747e315eaa8 100644 --- a/src/plugins/qnx/blackberryruncontrolfactory.cpp +++ b/src/plugins/qnx/blackberryruncontrolfactory.cpp @@ -147,15 +147,17 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters( params.displayName = runConfig->displayName(); params.remoteSetupNeeded = true; - if (runConfig->debuggerAspect()->useQmlDebugger()) { + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + if (aspect->useQmlDebugger()) { BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit()); if (device) { params.qmlServerAddress = device->sshParameters().host; - params.qmlServerPort = runConfig->debuggerAspect()->qmlDebugServerPort(); + params.qmlServerPort = aspect->qmlDebugServerPort(); params.languages |= Debugger::QmlLanguage; } } - if (runConfig->debuggerAspect()->useCppDebugger()) + if (aspect->useCppDebugger()) params.languages |= Debugger::CppLanguage; if (const ProjectExplorer::Project *project = runConfig->target()->project()) { diff --git a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp index 750dedccdda4f85c0326a68a0177ef48c85381bd..30903843070fe792a9ccf8883bd75482c6f39a26 100644 --- a/src/plugins/remotelinux/remotelinuxdebugsupport.cpp +++ b/src/plugins/remotelinux/remotelinuxdebugsupport.cpp @@ -61,8 +61,8 @@ public: LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig, DebuggerEngine *engine) : engine(engine), - qmlDebugging(runConfig->debuggerAspect()->useQmlDebugger()), - cppDebugging(runConfig->debuggerAspect()->useCppDebugger()), + qmlDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger()), + cppDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()), state(Inactive), gdbServerPort(-1), qmlPort(-1), device(DeviceKitInformation::device(runConfig->target()->kit())), @@ -105,12 +105,14 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin if (ToolChain *tc = ToolChainKitInformation::toolChain(k)) params.toolChainAbi = tc->targetAbi(); - if (runConfig->debuggerAspect()->useQmlDebugger()) { + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + if (aspect->useQmlDebugger()) { params.languages |= QmlLanguage; params.qmlServerAddress = device->sshParameters().host; params.qmlServerPort = 0; // port is selected later on } - if (runConfig->debuggerAspect()->useCppDebugger()) { + if (aspect->useCppDebugger()) { params.languages |= CppLanguage; params.processArgs = runConfig->arguments(); params.startMode = AttachToRemoteServer; diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp index 83f7230a523e22c7c12c86f99bfef27fb32b8b94..31a2508bb9561aa2d5394da426818d829c31a84b 100644 --- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp +++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp @@ -117,7 +117,7 @@ RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration() void RemoteLinuxRunConfiguration::init() { setDefaultDisplayName(defaultDisplayName()); - debuggerAspect()->suppressQmlDebuggingSpinbox(); + extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingSpinbox(); connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated())); connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated())); @@ -278,9 +278,11 @@ QString RemoteLinuxRunConfiguration::alternateRemoteExecutable() const int RemoteLinuxRunConfiguration::portsUsedByDebuggers() const { int ports = 0; - if (debuggerAspect()->useQmlDebugger()) + ProjectExplorer::DebuggerRunConfigurationAspect *aspect + = extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); + if (aspect->useQmlDebugger()) ++ports; - if (debuggerAspect()->useCppDebugger()) + if (aspect->useCppDebugger()) ++ports; return ports; diff --git a/src/plugins/valgrind/valgrindtool.cpp b/src/plugins/valgrind/valgrindtool.cpp index 37144fe933bc2a4bd5e5d75e37be3ab675b4e04a..816dd01b2a17008a9e2cb39be468a6051c826285 100644 --- a/src/plugins/valgrind/valgrindtool.cpp +++ b/src/plugins/valgrind/valgrindtool.cpp @@ -67,7 +67,8 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters( sp.debuggee = rc1->executable(); sp.debuggeeArgs = rc1->commandLineArguments(); sp.connParams.host = QLatin1String("localhost"); - sp.connParams.port = rc1->debuggerAspect()->qmlDebugServerPort(); + sp.connParams.port = rc1->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>() + ->qmlDebugServerPort(); } else if (RemoteLinuxRunConfiguration *rc2 = qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) { sp.startMode = Analyzer::StartRemote;