forked from qt-creator/qt-creator
Demote debuggerrunconfigurationaspect
NOTE: Next patch will be "Move DRCA to Debugger plugin" and is needed to make this functional. Change-Id: Ie405a0e4fbdc0fb35ff16d34c725e7aee5153a4a Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -91,7 +91,9 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
|||||||
params.displayName = AndroidManager::packageName(target);
|
params.displayName = AndroidManager::packageName(target);
|
||||||
params.remoteSetupNeeded = true;
|
params.remoteSetupNeeded = true;
|
||||||
|
|
||||||
if (runConfig->debuggerAspect()->useCppDebugger()) {
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
|
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
|
if (aspect->useCppDebugger()) {
|
||||||
params.languages |= CppLanguage;
|
params.languages |= CppLanguage;
|
||||||
Kit *kit = target->kit();
|
Kit *kit = target->kit();
|
||||||
params.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
|
params.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
|
||||||
@@ -108,10 +110,10 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
|||||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
||||||
params.solibSearchPath.append(qtSoPaths(version));
|
params.solibSearchPath.append(qtSoPaths(version));
|
||||||
}
|
}
|
||||||
if (runConfig->debuggerAspect()->useQmlDebugger()) {
|
if (aspect->useQmlDebugger()) {
|
||||||
params.languages |= QmlLanguage;
|
params.languages |= QmlLanguage;
|
||||||
params.qmlServerAddress = QLatin1String("localhost");
|
params.qmlServerAddress = QLatin1String("localhost");
|
||||||
params.qmlServerPort = runConfig->debuggerAspect()->qmlDebugServerPort();
|
params.qmlServerPort = aspect->qmlDebugServerPort();
|
||||||
//TODO: Not sure if these are the right paths.
|
//TODO: Not sure if these are the right paths.
|
||||||
params.projectSourceDirectory = project->projectDirectory();
|
params.projectSourceDirectory = project->projectDirectory();
|
||||||
params.projectSourceFiles = project->files(Qt4Project::ExcludeGeneratedFiles);
|
params.projectSourceFiles = project->files(Qt4Project::ExcludeGeneratedFiles);
|
||||||
@@ -128,9 +130,13 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig,
|
|||||||
DebuggerRunControl *runControl)
|
DebuggerRunControl *runControl)
|
||||||
: QObject(runControl), m_runControl(runControl),
|
: QObject(runControl), m_runControl(runControl),
|
||||||
m_runner(new AndroidRunner(this, runConfig, true)),
|
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()),
|
connect(m_runControl->engine(), SIGNAL(requestRemoteSetup()),
|
||||||
m_runner, SLOT(start()));
|
m_runner, SLOT(start()));
|
||||||
|
@@ -46,10 +46,12 @@ namespace Internal {
|
|||||||
AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode)
|
AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode)
|
||||||
: QThread(parent)
|
: QThread(parent)
|
||||||
{
|
{
|
||||||
m_useCppDebugger = debuggingMode && runConfig->debuggerAspect()->useCppDebugger();
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
m_useQmlDebugger = debuggingMode && runConfig->debuggerAspect()->useQmlDebugger();
|
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
|
m_useCppDebugger = debuggingMode && aspect->useCppDebugger();
|
||||||
|
m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger();
|
||||||
m_remoteGdbChannel = runConfig->remoteChannel();
|
m_remoteGdbChannel = runConfig->remoteChannel();
|
||||||
m_qmlPort = runConfig->debuggerAspect()->qmlDebugServerPort();
|
m_qmlPort = aspect->qmlDebugServerPort();
|
||||||
ProjectExplorer::Target *target = runConfig->target();
|
ProjectExplorer::Target *target = runConfig->target();
|
||||||
AndroidDeployStep *ds = runConfig->deployStep();
|
AndroidDeployStep *ds = runConfig->deployStep();
|
||||||
if ((m_useLocalQtLibs = ds->useLocalQtLibs())) {
|
if ((m_useLocalQtLibs = ds->useLocalQtLibs())) {
|
||||||
|
@@ -200,13 +200,14 @@ void DebuggerMainWindowPrivate::updateUiForTarget(Target *target)
|
|||||||
void DebuggerMainWindowPrivate::updateUiForRunConfiguration(RunConfiguration *rc)
|
void DebuggerMainWindowPrivate::updateUiForRunConfiguration(RunConfiguration *rc)
|
||||||
{
|
{
|
||||||
if (m_previousRunConfiguration)
|
if (m_previousRunConfiguration)
|
||||||
disconnect(m_previousRunConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()),
|
disconnect(m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(),
|
||||||
|
SIGNAL(debuggersChanged()),
|
||||||
this, SLOT(updateUiForCurrentRunConfiguration()));
|
this, SLOT(updateUiForCurrentRunConfiguration()));
|
||||||
m_previousRunConfiguration = rc;
|
m_previousRunConfiguration = rc;
|
||||||
updateUiForCurrentRunConfiguration();
|
updateUiForCurrentRunConfiguration();
|
||||||
if (!rc)
|
if (!rc)
|
||||||
return;
|
return;
|
||||||
connect(m_previousRunConfiguration->debuggerAspect(),
|
connect(m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(),
|
||||||
SIGNAL(debuggersChanged()),
|
SIGNAL(debuggersChanged()),
|
||||||
SLOT(updateUiForCurrentRunConfiguration()));
|
SLOT(updateUiForCurrentRunConfiguration()));
|
||||||
}
|
}
|
||||||
@@ -224,9 +225,9 @@ void DebuggerMainWindowPrivate::updateActiveLanguages()
|
|||||||
newLanguages = m_engineDebugLanguages;
|
newLanguages = m_engineDebugLanguages;
|
||||||
else {
|
else {
|
||||||
if (m_previousRunConfiguration) {
|
if (m_previousRunConfiguration) {
|
||||||
if (m_previousRunConfiguration->debuggerAspect()->useCppDebugger())
|
if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger())
|
||||||
newLanguages |= CppLanguage;
|
newLanguages |= CppLanguage;
|
||||||
if (m_previousRunConfiguration->debuggerAspect()->useQmlDebugger())
|
if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger())
|
||||||
newLanguages |= QmlLanguage;
|
newLanguages |= QmlLanguage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -478,7 +478,7 @@ bool DummyEngine::hasCapability(unsigned cap) const
|
|||||||
QTC_ASSERT(activeRc, return 0);
|
QTC_ASSERT(activeRc, return 0);
|
||||||
|
|
||||||
// This is a non-started Cdb or Gdb engine:
|
// This is a non-started Cdb or Gdb engine:
|
||||||
if (activeRc->debuggerAspect()->useCppDebugger())
|
if (activeRc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger())
|
||||||
return cap & (WatchpointByAddressCapability
|
return cap & (WatchpointByAddressCapability
|
||||||
| BreakConditionCapability
|
| BreakConditionCapability
|
||||||
| TracePointCapability
|
| TracePointCapability
|
||||||
|
@@ -66,6 +66,9 @@ public:
|
|||||||
static DebuggerRunControl *doCreate(const DebuggerStartParameters &sp,
|
static DebuggerRunControl *doCreate(const DebuggerStartParameters &sp,
|
||||||
ProjectExplorer::RunConfiguration *rc, QString *errorMessage);
|
ProjectExplorer::RunConfiguration *rc, QString *errorMessage);
|
||||||
|
|
||||||
|
ProjectExplorer::IRunConfigurationAspect *createRunConfigurationAspect(
|
||||||
|
ProjectExplorer::RunConfiguration *rc);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
ProjectExplorer::RunConfigWidget *createConfigurationWidget(
|
ProjectExplorer::RunConfigWidget *createConfigurationWidget(
|
||||||
|
@@ -49,6 +49,7 @@
|
|||||||
#include <projectexplorer/buildconfiguration.h>
|
#include <projectexplorer/buildconfiguration.h>
|
||||||
#include <projectexplorer/project.h>
|
#include <projectexplorer/project.h>
|
||||||
#include <projectexplorer/projectexplorer.h>
|
#include <projectexplorer/projectexplorer.h>
|
||||||
|
#include <projectexplorer/runconfiguration.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/taskhub.h>
|
#include <projectexplorer/taskhub.h>
|
||||||
|
|
||||||
@@ -144,7 +145,7 @@ public:
|
|||||||
|
|
||||||
DebuggerRunConfigWidget::DebuggerRunConfigWidget(RunConfiguration *runConfiguration)
|
DebuggerRunConfigWidget::DebuggerRunConfigWidget(RunConfiguration *runConfiguration)
|
||||||
{
|
{
|
||||||
m_aspect = runConfiguration->debuggerAspect();
|
m_aspect = runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
|
|
||||||
m_useCppDebugger = new QCheckBox(tr("Enable C++"), this);
|
m_useCppDebugger = new QCheckBox(tr("Enable C++"), this);
|
||||||
m_useQmlDebugger = new QCheckBox(tr("Enable QML"), 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();
|
sp.multiProcess = aspect->useMultiProcess();
|
||||||
|
|
||||||
if (aspect->useCppDebugger())
|
if (aspect->useCppDebugger())
|
||||||
@@ -582,7 +584,8 @@ static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rc) {
|
if (rc) {
|
||||||
DebuggerRunConfigurationAspect *aspect = rc->debuggerAspect();
|
DebuggerRunConfigurationAspect *aspect
|
||||||
|
= rc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
if (const Target *target = rc->target())
|
if (const Target *target = rc->target())
|
||||||
if (!fillParameters(&sp, target->kit(), errorMessage))
|
if (!fillParameters(&sp, target->kit(), errorMessage))
|
||||||
return false;
|
return false;
|
||||||
@@ -634,6 +637,11 @@ DebuggerRunControl *DebuggerRunControlFactory::doCreate
|
|||||||
return new DebuggerRunControl(rc, sp);
|
return new DebuggerRunControl(rc, sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IRunConfigurationAspect *DebuggerRunControlFactory::createRunConfigurationAspect(RunConfiguration *rc)
|
||||||
|
{
|
||||||
|
return new DebuggerRunConfigurationAspect(rc);
|
||||||
|
}
|
||||||
|
|
||||||
DebuggerRunControl *DebuggerRunControlFactory::createAndScheduleRun
|
DebuggerRunControl *DebuggerRunControlFactory::createAndScheduleRun
|
||||||
(const DebuggerStartParameters &sp, RunConfiguration *runConfiguration)
|
(const DebuggerStartParameters &sp, RunConfiguration *runConfiguration)
|
||||||
{
|
{
|
||||||
|
@@ -78,7 +78,7 @@ void MaemoRunConfiguration::init()
|
|||||||
connect(m_remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged()));
|
connect(m_remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged()));
|
||||||
|
|
||||||
if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) != HarmattanOsType)
|
if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) != HarmattanOsType)
|
||||||
debuggerAspect()->suppressQmlDebuggingOptions();
|
extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MaemoRunConfiguration::isEnabled() const
|
bool MaemoRunConfiguration::isEnabled() const
|
||||||
|
@@ -83,7 +83,8 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
|
|||||||
subLayout->setMargin(0);
|
subLayout->setMargin(0);
|
||||||
addMountWidgets(subLayout);
|
addMountWidgets(subLayout);
|
||||||
connect(m_runConfiguration->target(), SIGNAL(kitChanged()), this, SLOT(updateMountWarning()));
|
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()));
|
SLOT(updateMountWarning()));
|
||||||
updateMountWarning();
|
updateMountWarning();
|
||||||
|
|
||||||
|
@@ -39,19 +39,11 @@ namespace ProjectExplorer {
|
|||||||
|
|
||||||
LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, const Core::Id id) :
|
LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, const Core::Id id) :
|
||||||
RunConfiguration(target, id)
|
RunConfiguration(target, id)
|
||||||
{
|
{ }
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc) :
|
LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc) :
|
||||||
RunConfiguration(target, rc)
|
RunConfiguration(target, rc)
|
||||||
{
|
{ }
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
LocalApplicationRunConfiguration::~LocalApplicationRunConfiguration()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils::AbstractMacroExpander *LocalApplicationRunConfiguration::macroExpander() const
|
Utils::AbstractMacroExpander *LocalApplicationRunConfiguration::macroExpander() const
|
||||||
{
|
{
|
||||||
@@ -60,9 +52,4 @@ Utils::AbstractMacroExpander *LocalApplicationRunConfiguration::macroExpander()
|
|||||||
return Core::VariableManager::macroExpander();
|
return Core::VariableManager::macroExpander();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalApplicationRunConfiguration::ctor()
|
|
||||||
{
|
|
||||||
debuggerAspect()->suppressQmlDebuggingSpinbox();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -49,7 +49,6 @@ public:
|
|||||||
Gui
|
Gui
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~LocalApplicationRunConfiguration();
|
|
||||||
virtual QString executable() const = 0;
|
virtual QString executable() const = 0;
|
||||||
virtual RunMode runMode() const = 0;
|
virtual RunMode runMode() const = 0;
|
||||||
virtual QString workingDirectory() const = 0;
|
virtual QString workingDirectory() const = 0;
|
||||||
@@ -63,9 +62,6 @@ protected:
|
|||||||
explicit LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc);
|
explicit LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc);
|
||||||
|
|
||||||
Utils::AbstractMacroExpander *macroExpander() const;
|
Utils::AbstractMacroExpander *macroExpander() const;
|
||||||
|
|
||||||
private:
|
|
||||||
void ctor();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
@@ -2370,14 +2370,15 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged()
|
|||||||
if (previousRunConfiguration) {
|
if (previousRunConfiguration) {
|
||||||
disconnect(previousRunConfiguration, SIGNAL(enabledChanged()),
|
disconnect(previousRunConfiguration, SIGNAL(enabledChanged()),
|
||||||
this, SIGNAL(updateRunActions()));
|
this, SIGNAL(updateRunActions()));
|
||||||
disconnect(previousRunConfiguration->debuggerAspect(), SIGNAL(debuggersChanged()),
|
disconnect(previousRunConfiguration->extraAspect<DebuggerRunConfigurationAspect>(),
|
||||||
|
SIGNAL(debuggersChanged()),
|
||||||
this, SIGNAL(updateRunActions()));
|
this, SIGNAL(updateRunActions()));
|
||||||
}
|
}
|
||||||
previousRunConfiguration = rc;
|
previousRunConfiguration = rc;
|
||||||
if (rc) {
|
if (rc) {
|
||||||
connect(rc, SIGNAL(enabledChanged()),
|
connect(rc, SIGNAL(enabledChanged()),
|
||||||
this, SIGNAL(updateRunActions()));
|
this, SIGNAL(updateRunActions()));
|
||||||
connect(rc->debuggerAspect(), SIGNAL(debuggersChanged()),
|
connect(rc->extraAspect<DebuggerRunConfigurationAspect>(), SIGNAL(debuggersChanged()),
|
||||||
this, SIGNAL(updateRunActions()));
|
this, SIGNAL(updateRunActions()));
|
||||||
}
|
}
|
||||||
emit updateRunActions();
|
emit updateRunActions();
|
||||||
|
@@ -272,7 +272,6 @@ DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(RunConfigu
|
|||||||
|
|
||||||
RunConfiguration::RunConfiguration(Target *target, const Core::Id id) :
|
RunConfiguration::RunConfiguration(Target *target, const Core::Id id) :
|
||||||
ProjectConfiguration(target, id),
|
ProjectConfiguration(target, id),
|
||||||
m_debuggerAspect(new DebuggerRunConfigurationAspect(this)),
|
|
||||||
m_aspectsInitialized(false)
|
m_aspectsInitialized(false)
|
||||||
{
|
{
|
||||||
Q_ASSERT(target);
|
Q_ASSERT(target);
|
||||||
@@ -280,7 +279,6 @@ RunConfiguration::RunConfiguration(Target *target, const Core::Id id) :
|
|||||||
|
|
||||||
RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
|
RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
|
||||||
ProjectConfiguration(target, source),
|
ProjectConfiguration(target, source),
|
||||||
m_debuggerAspect(source->debuggerAspect()->clone(this)),
|
|
||||||
m_aspectsInitialized(true)
|
m_aspectsInitialized(true)
|
||||||
{
|
{
|
||||||
Q_ASSERT(target);
|
Q_ASSERT(target);
|
||||||
@@ -293,7 +291,6 @@ RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
|
|||||||
|
|
||||||
RunConfiguration::~RunConfiguration()
|
RunConfiguration::~RunConfiguration()
|
||||||
{
|
{
|
||||||
delete m_debuggerAspect;
|
|
||||||
qDeleteAll(m_aspects);
|
qDeleteAll(m_aspects);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -359,8 +356,6 @@ QVariantMap RunConfiguration::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map = ProjectConfiguration::toMap();
|
QVariantMap map = ProjectConfiguration::toMap();
|
||||||
|
|
||||||
map.unite(m_debuggerAspect->toMap());
|
|
||||||
|
|
||||||
foreach (IRunConfigurationAspect *aspect, m_aspects)
|
foreach (IRunConfigurationAspect *aspect, m_aspects)
|
||||||
map.unite(aspect->toMap());
|
map.unite(aspect->toMap());
|
||||||
|
|
||||||
@@ -381,7 +376,6 @@ ProjectExplorer::Abi RunConfiguration::abi() const
|
|||||||
bool RunConfiguration::fromMap(const QVariantMap &map)
|
bool RunConfiguration::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
addExtraAspects();
|
addExtraAspects();
|
||||||
m_debuggerAspect->fromMap(map);
|
|
||||||
|
|
||||||
foreach (IRunConfigurationAspect *aspect, m_aspects)
|
foreach (IRunConfigurationAspect *aspect, m_aspects)
|
||||||
aspect->fromMap(map);
|
aspect->fromMap(map);
|
||||||
|
@@ -166,8 +166,6 @@ public:
|
|||||||
bool fromMap(const QVariantMap &map);
|
bool fromMap(const QVariantMap &map);
|
||||||
QVariantMap toMap() const;
|
QVariantMap toMap() const;
|
||||||
|
|
||||||
DebuggerRunConfigurationAspect *debuggerAspect() const { return m_debuggerAspect; }
|
|
||||||
|
|
||||||
QList<IRunConfigurationAspect *> extraAspects() const;
|
QList<IRunConfigurationAspect *> extraAspects() const;
|
||||||
template <typename T> T *extraAspect() const
|
template <typename T> T *extraAspect() const
|
||||||
{
|
{
|
||||||
@@ -198,7 +196,6 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QList<IRunConfigurationAspect *> m_aspects;
|
QList<IRunConfigurationAspect *> m_aspects;
|
||||||
DebuggerRunConfigurationAspect *m_debuggerAspect;
|
|
||||||
bool m_aspectsInitialized;
|
bool m_aspectsInitialized;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -83,6 +83,8 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo
|
|||||||
AbstractQmlProfilerRunner *runner = 0;
|
AbstractQmlProfilerRunner *runner = 0;
|
||||||
if (!runConfiguration) // attaching
|
if (!runConfiguration) // attaching
|
||||||
return 0;
|
return 0;
|
||||||
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
|
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
if (QmlProjectManager::QmlProjectRunConfiguration *rc1 =
|
if (QmlProjectManager::QmlProjectRunConfiguration *rc1 =
|
||||||
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration)) {
|
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration)) {
|
||||||
// This is a "plain" .qmlproject.
|
// This is a "plain" .qmlproject.
|
||||||
@@ -91,7 +93,7 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo
|
|||||||
conf.executableArguments = rc1->viewerArguments();
|
conf.executableArguments = rc1->viewerArguments();
|
||||||
conf.workingDirectory = rc1->workingDirectory();
|
conf.workingDirectory = rc1->workingDirectory();
|
||||||
conf.environment = rc1->environment();
|
conf.environment = rc1->environment();
|
||||||
conf.port = rc1->debuggerAspect()->qmlDebugServerPort();
|
conf.port = aspect->qmlDebugServerPort();
|
||||||
runner = new LocalQmlProfilerRunner(conf, parent);
|
runner = new LocalQmlProfilerRunner(conf, parent);
|
||||||
} else if (LocalApplicationRunConfiguration *rc2 =
|
} else if (LocalApplicationRunConfiguration *rc2 =
|
||||||
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
|
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
|
||||||
@@ -101,7 +103,7 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo
|
|||||||
conf.executableArguments = rc2->commandLineArguments();
|
conf.executableArguments = rc2->commandLineArguments();
|
||||||
conf.workingDirectory = rc2->workingDirectory();
|
conf.workingDirectory = rc2->workingDirectory();
|
||||||
conf.environment = rc2->environment();
|
conf.environment = rc2->environment();
|
||||||
conf.port = rc2->debuggerAspect()->qmlDebugServerPort();
|
conf.port = aspect->qmlDebugServerPort();
|
||||||
runner = new LocalQmlProfilerRunner(conf, parent);
|
runner = new LocalQmlProfilerRunner(conf, parent);
|
||||||
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rmConfig =
|
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rmConfig =
|
||||||
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
||||||
|
@@ -299,6 +299,9 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
|
|||||||
AnalyzerStartParameters sp;
|
AnalyzerStartParameters sp;
|
||||||
sp.startMode = StartQml; // FIXME: The parameter struct is not needed/not used.
|
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.
|
// FIXME: This is only used to communicate the connParams settings.
|
||||||
if (QmlProjectRunConfiguration *rc1 =
|
if (QmlProjectRunConfiguration *rc1 =
|
||||||
qobject_cast<QmlProjectRunConfiguration *>(runConfiguration)) {
|
qobject_cast<QmlProjectRunConfiguration *>(runConfiguration)) {
|
||||||
@@ -309,7 +312,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
|
|||||||
sp.debuggeeArgs = rc1->viewerArguments();
|
sp.debuggeeArgs = rc1->viewerArguments();
|
||||||
sp.displayName = rc1->displayName();
|
sp.displayName = rc1->displayName();
|
||||||
sp.connParams.host = QLatin1String("localhost");
|
sp.connParams.host = QLatin1String("localhost");
|
||||||
sp.connParams.port = rc1->debuggerAspect()->qmlDebugServerPort();
|
sp.connParams.port = aspect->qmlDebugServerPort();
|
||||||
} else if (LocalApplicationRunConfiguration *rc2 =
|
} else if (LocalApplicationRunConfiguration *rc2 =
|
||||||
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
|
qobject_cast<LocalApplicationRunConfiguration *>(runConfiguration)) {
|
||||||
sp.environment = rc2->environment();
|
sp.environment = rc2->environment();
|
||||||
@@ -318,7 +321,7 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
|
|||||||
sp.debuggeeArgs = rc2->commandLineArguments();
|
sp.debuggeeArgs = rc2->commandLineArguments();
|
||||||
sp.displayName = rc2->displayName();
|
sp.displayName = rc2->displayName();
|
||||||
sp.connParams.host = QLatin1String("localhost");
|
sp.connParams.host = QLatin1String("localhost");
|
||||||
sp.connParams.port = rc2->debuggerAspect()->qmlDebugServerPort();
|
sp.connParams.port = aspect->qmlDebugServerPort();
|
||||||
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rc3 =
|
} else if (RemoteLinux::RemoteLinuxRunConfiguration *rc3 =
|
||||||
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
qobject_cast<RemoteLinux::RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
||||||
sp.debuggee = rc3->remoteExecutableFilePath();
|
sp.debuggee = rc3->remoteExecutableFilePath();
|
||||||
|
@@ -91,9 +91,11 @@ QString QmlProjectRunConfiguration::disabledReason() const
|
|||||||
void QmlProjectRunConfiguration::ctor()
|
void QmlProjectRunConfiguration::ctor()
|
||||||
{
|
{
|
||||||
// reset default settings in constructor
|
// reset default settings in constructor
|
||||||
debuggerAspect()->setUseCppDebugger(false);
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
debuggerAspect()->setUseQmlDebugger(true);
|
= extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
debuggerAspect()->suppressQmlDebuggingSpinbox();
|
aspect->setUseCppDebugger(false);
|
||||||
|
aspect->setUseQmlDebugger(true);
|
||||||
|
aspect->suppressQmlDebuggingSpinbox();
|
||||||
|
|
||||||
EditorManager *em = Core::EditorManager::instance();
|
EditorManager *em = Core::EditorManager::instance();
|
||||||
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
|
connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)),
|
||||||
|
@@ -200,6 +200,8 @@ QString QmlProjectRunControlFactory::displayName() const
|
|||||||
RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig, QString *errorMessage)
|
RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Debugger::DebuggerStartParameters params;
|
Debugger::DebuggerStartParameters params;
|
||||||
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
|
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
params.startMode = Debugger::StartInternal;
|
params.startMode = Debugger::StartInternal;
|
||||||
params.executable = runConfig->observerPath();
|
params.executable = runConfig->observerPath();
|
||||||
params.processArgs = runConfig->viewerArguments();
|
params.processArgs = runConfig->viewerArguments();
|
||||||
@@ -208,7 +210,7 @@ RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConf
|
|||||||
params.displayName = runConfig->displayName();
|
params.displayName = runConfig->displayName();
|
||||||
params.projectSourceDirectory = runConfig->target()->project()->projectDirectory();
|
params.projectSourceDirectory = runConfig->target()->project()->projectDirectory();
|
||||||
params.projectSourceFiles = runConfig->target()->project()->files(Project::ExcludeGeneratedFiles);
|
params.projectSourceFiles = runConfig->target()->project()->files(Project::ExcludeGeneratedFiles);
|
||||||
if (runConfig->debuggerAspect()->useQmlDebugger()) {
|
if (aspect->useQmlDebugger()) {
|
||||||
const ProjectExplorer::IDevice::ConstPtr device =
|
const ProjectExplorer::IDevice::ConstPtr device =
|
||||||
DeviceKitInformation::device(runConfig->target()->kit());
|
DeviceKitInformation::device(runConfig->target()->kit());
|
||||||
params.qmlServerAddress = QLatin1String("127.0.0.1");
|
params.qmlServerAddress = QLatin1String("127.0.0.1");
|
||||||
@@ -236,7 +238,7 @@ RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConf
|
|||||||
QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(
|
QString::fromLatin1("-qmljsdebugger=port:%1,block").arg(
|
||||||
params.qmlServerPort));
|
params.qmlServerPort));
|
||||||
}
|
}
|
||||||
if (runConfig->debuggerAspect()->useCppDebugger())
|
if (aspect->useCppDebugger())
|
||||||
params.languages |= Debugger::CppLanguage;
|
params.languages |= Debugger::CppLanguage;
|
||||||
|
|
||||||
if (params.executable.isEmpty()) {
|
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());
|
fileContent.replace(SRC_DIR_VAR, QDir::toNativeSeparators(target()->project()->projectDirectory()).toLatin1());
|
||||||
|
|
||||||
// Add parameter for QML debugging (if enabled)
|
// 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")) {
|
if (!fileContent.contains("-qmljsdebugger")) {
|
||||||
const QString argString = QString::fromLatin1("<arg>-qmljsdebugger=port:%1</arg>\n</qnx>")
|
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());
|
fileContent.replace("</qnx>", argString.toLatin1());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -147,15 +147,17 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
|
|||||||
params.displayName = runConfig->displayName();
|
params.displayName = runConfig->displayName();
|
||||||
params.remoteSetupNeeded = true;
|
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());
|
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
|
||||||
if (device) {
|
if (device) {
|
||||||
params.qmlServerAddress = device->sshParameters().host;
|
params.qmlServerAddress = device->sshParameters().host;
|
||||||
params.qmlServerPort = runConfig->debuggerAspect()->qmlDebugServerPort();
|
params.qmlServerPort = aspect->qmlDebugServerPort();
|
||||||
params.languages |= Debugger::QmlLanguage;
|
params.languages |= Debugger::QmlLanguage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (runConfig->debuggerAspect()->useCppDebugger())
|
if (aspect->useCppDebugger())
|
||||||
params.languages |= Debugger::CppLanguage;
|
params.languages |= Debugger::CppLanguage;
|
||||||
|
|
||||||
if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
|
if (const ProjectExplorer::Project *project = runConfig->target()->project()) {
|
||||||
|
@@ -61,8 +61,8 @@ public:
|
|||||||
LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig,
|
LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig,
|
||||||
DebuggerEngine *engine)
|
DebuggerEngine *engine)
|
||||||
: engine(engine),
|
: engine(engine),
|
||||||
qmlDebugging(runConfig->debuggerAspect()->useQmlDebugger()),
|
qmlDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger()),
|
||||||
cppDebugging(runConfig->debuggerAspect()->useCppDebugger()),
|
cppDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()),
|
||||||
state(Inactive),
|
state(Inactive),
|
||||||
gdbServerPort(-1), qmlPort(-1),
|
gdbServerPort(-1), qmlPort(-1),
|
||||||
device(DeviceKitInformation::device(runConfig->target()->kit())),
|
device(DeviceKitInformation::device(runConfig->target()->kit())),
|
||||||
@@ -105,12 +105,14 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
|
|||||||
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
||||||
params.toolChainAbi = tc->targetAbi();
|
params.toolChainAbi = tc->targetAbi();
|
||||||
|
|
||||||
if (runConfig->debuggerAspect()->useQmlDebugger()) {
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
|
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
|
if (aspect->useQmlDebugger()) {
|
||||||
params.languages |= QmlLanguage;
|
params.languages |= QmlLanguage;
|
||||||
params.qmlServerAddress = device->sshParameters().host;
|
params.qmlServerAddress = device->sshParameters().host;
|
||||||
params.qmlServerPort = 0; // port is selected later on
|
params.qmlServerPort = 0; // port is selected later on
|
||||||
}
|
}
|
||||||
if (runConfig->debuggerAspect()->useCppDebugger()) {
|
if (aspect->useCppDebugger()) {
|
||||||
params.languages |= CppLanguage;
|
params.languages |= CppLanguage;
|
||||||
params.processArgs = runConfig->arguments();
|
params.processArgs = runConfig->arguments();
|
||||||
params.startMode = AttachToRemoteServer;
|
params.startMode = AttachToRemoteServer;
|
||||||
|
@@ -117,7 +117,7 @@ RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
|
|||||||
void RemoteLinuxRunConfiguration::init()
|
void RemoteLinuxRunConfiguration::init()
|
||||||
{
|
{
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
debuggerAspect()->suppressQmlDebuggingSpinbox();
|
extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingSpinbox();
|
||||||
|
|
||||||
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated()));
|
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated()));
|
||||||
connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated()));
|
connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated()));
|
||||||
@@ -278,9 +278,11 @@ QString RemoteLinuxRunConfiguration::alternateRemoteExecutable() const
|
|||||||
int RemoteLinuxRunConfiguration::portsUsedByDebuggers() const
|
int RemoteLinuxRunConfiguration::portsUsedByDebuggers() const
|
||||||
{
|
{
|
||||||
int ports = 0;
|
int ports = 0;
|
||||||
if (debuggerAspect()->useQmlDebugger())
|
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||||
|
= extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||||
|
if (aspect->useQmlDebugger())
|
||||||
++ports;
|
++ports;
|
||||||
if (debuggerAspect()->useCppDebugger())
|
if (aspect->useCppDebugger())
|
||||||
++ports;
|
++ports;
|
||||||
|
|
||||||
return ports;
|
return ports;
|
||||||
|
@@ -67,7 +67,8 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters(
|
|||||||
sp.debuggee = rc1->executable();
|
sp.debuggee = rc1->executable();
|
||||||
sp.debuggeeArgs = rc1->commandLineArguments();
|
sp.debuggeeArgs = rc1->commandLineArguments();
|
||||||
sp.connParams.host = QLatin1String("localhost");
|
sp.connParams.host = QLatin1String("localhost");
|
||||||
sp.connParams.port = rc1->debuggerAspect()->qmlDebugServerPort();
|
sp.connParams.port = rc1->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()
|
||||||
|
->qmlDebugServerPort();
|
||||||
} else if (RemoteLinuxRunConfiguration *rc2 =
|
} else if (RemoteLinuxRunConfiguration *rc2 =
|
||||||
qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
||||||
sp.startMode = Analyzer::StartRemote;
|
sp.startMode = Analyzer::StartRemote;
|
||||||
|
Reference in New Issue
Block a user