Commit e474b6ed authored by Tobias Hunger's avatar Tobias Hunger

Demote debuggerrunconfigurationaspect

NOTE: Next patch will be "Move DRCA to Debugger plugin" and is
needed to make this functional.

Change-Id: Ie405a0e4fbdc0fb35ff16d34c725e7aee5153a4a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 21da8c64
......@@ -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()));
......
......@@ -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())) {
......
......@@ -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;
}
}
......
......@@ -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
......
......@@ -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(
......
......@@ -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)
{
......
......@@ -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
......
......@@ -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();
......
......@@ -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
......@@ -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
......
......@@ -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();
......
......@@ -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);
......
......@@ -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;
};
......
......@@ -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)) {
......
......@@ -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();
......
......@@ -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*)),
......
......@@ -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()) {
......
......@@ -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());
}
}
......
......@@ -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()) {
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment