Move DebuggerRunConfigurationAspect into Debugger

Change-Id: I03cab5d963a6d7c77171efe360a552d8109f6a8b
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Tobias Hunger
2013-03-27 13:03:15 +01:00
parent e474b6ed8f
commit 533644290f
28 changed files with 391 additions and 259 deletions

View File

@@ -37,6 +37,7 @@
#include <debugger/debuggerengine.h> #include <debugger/debuggerengine.h>
#include <debugger/debuggerplugin.h> #include <debugger/debuggerplugin.h>
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerrunner.h> #include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h> #include <debugger/debuggerstartparameters.h>
@@ -91,8 +92,8 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.displayName = AndroidManager::packageName(target); params.displayName = AndroidManager::packageName(target);
params.remoteSetupNeeded = true; params.remoteSetupNeeded = true;
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (aspect->useCppDebugger()) { if (aspect->useCppDebugger()) {
params.languages |= CppLanguage; params.languages |= CppLanguage;
Kit *kit = target->kit(); Kit *kit = target->kit();
@@ -133,8 +134,8 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig,
m_gdbServerPort(5039), m_gdbServerPort(5039),
m_qmlPort(0) m_qmlPort(0)
{ {
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
m_qmlPort = aspect->qmlDebugServerPort(); m_qmlPort = aspect->qmlDebugServerPort();
Q_ASSERT(aspect->useCppDebugger() || aspect->useQmlDebugger()); Q_ASSERT(aspect->useCppDebugger() || aspect->useQmlDebugger());

View File

@@ -35,6 +35,7 @@
#include "androidrunconfiguration.h" #include "androidrunconfiguration.h"
#include "androidmanager.h" #include "androidmanager.h"
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <QTime> #include <QTime>
@@ -46,8 +47,8 @@ namespace Internal {
AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode) AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode)
: QThread(parent) : QThread(parent)
{ {
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
m_useCppDebugger = debuggingMode && aspect->useCppDebugger(); m_useCppDebugger = debuggingMode && aspect->useCppDebugger();
m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger(); m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger();
m_remoteGdbChannel = runConfig->remoteChannel(); m_remoteGdbChannel = runConfig->remoteChannel();

View File

@@ -29,6 +29,7 @@ HEADERS += \
debuggermainwindow.h \ debuggermainwindow.h \
debuggerplugin.h \ debuggerplugin.h \
debuggerprotocol.h \ debuggerprotocol.h \
debuggerrunconfigurationaspect.h \
debuggerrunner.h \ debuggerrunner.h \
debuggerstartparameters.h \ debuggerstartparameters.h \
debuggerstreamops.h \ debuggerstreamops.h \
@@ -82,6 +83,7 @@ SOURCES += \
debuggermainwindow.cpp \ debuggermainwindow.cpp \
debuggerplugin.cpp \ debuggerplugin.cpp \
debuggerprotocol.cpp \ debuggerprotocol.cpp \
debuggerrunconfigurationaspect.cpp \
debuggerrunner.cpp \ debuggerrunner.cpp \
debuggerstreamops.cpp \ debuggerstreamops.cpp \
debuggerkitconfigwidget.cpp \ debuggerkitconfigwidget.cpp \

View File

@@ -81,6 +81,10 @@ const char DOCKWIDGET_DEFAULT_AREA[] = "Debugger.Docks.DefaultArea";
const char TASK_CATEGORY_DEBUGGER_TEST[] = "DebuggerTest"; const char TASK_CATEGORY_DEBUGGER_TEST[] = "DebuggerTest";
const char TASK_CATEGORY_DEBUGGER_DEBUGINFO[] = "Debuginfo"; const char TASK_CATEGORY_DEBUGGER_DEBUGINFO[] = "Debuginfo";
const char TASK_CATEGORY_DEBUGGER_RUNTIME[] = "DebugRuntime"; const char TASK_CATEGORY_DEBUGGER_RUNTIME[] = "DebugRuntime";
// Run Configuration Aspect defaults:
const int QML_DEFAULT_DEBUG_SERVER_PORT = 3768;
} // namespace Constants } // namespace Constants
enum DebuggerState enum DebuggerState

View File

@@ -36,6 +36,7 @@
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/toolchain.h> #include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/fancylineedit.h> #include <utils/fancylineedit.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>

View File

@@ -30,6 +30,7 @@
#include "debuggermainwindow.h" #include "debuggermainwindow.h"
#include "debuggercore.h" #include "debuggercore.h"
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggerrunconfigurationaspect.h"
#include <utils/appmainwindow.h> #include <utils/appmainwindow.h>
#include <utils/styledbar.h> #include <utils/styledbar.h>
@@ -200,14 +201,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->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(), disconnect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()), 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->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(), connect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()), SIGNAL(debuggersChanged()),
SLOT(updateUiForCurrentRunConfiguration())); SLOT(updateUiForCurrentRunConfiguration()));
} }
@@ -225,9 +226,9 @@ void DebuggerMainWindowPrivate::updateActiveLanguages()
newLanguages = m_engineDebugLanguages; newLanguages = m_engineDebugLanguages;
else { else {
if (m_previousRunConfiguration) { if (m_previousRunConfiguration) {
if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()) if (m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger())
newLanguages |= CppLanguage; newLanguages |= CppLanguage;
if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger()) if (m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger())
newLanguages |= QmlLanguage; newLanguages |= QmlLanguage;
} }
} }

View File

@@ -37,6 +37,7 @@
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggermainwindow.h" #include "debuggermainwindow.h"
#include "debuggerrunner.h" #include "debuggerrunner.h"
#include "debuggerrunconfigurationaspect.h"
#include "debuggerruncontrolfactory.h" #include "debuggerruncontrolfactory.h"
#include "debuggerstringutils.h" #include "debuggerstringutils.h"
#include "debuggerkitinformation.h" #include "debuggerkitinformation.h"
@@ -478,7 +479,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->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()) if (activeRc->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger())
return cap & (WatchpointByAddressCapability return cap & (WatchpointByAddressCapability
| BreakConditionCapability | BreakConditionCapability
| TracePointCapability | TracePointCapability

View File

@@ -0,0 +1,212 @@
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "debuggerrunconfigurationaspect.h"
#include "debuggerconstants.h"
#include <coreplugin/icontext.h>
#include <projectexplorer/project.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
static const char USE_CPP_DEBUGGER_KEY[] = "RunConfiguration.UseCppDebugger";
static const char USE_QML_DEBUGGER_KEY[] = "RunConfiguration.UseQmlDebugger";
static const char USE_QML_DEBUGGER_AUTO_KEY[] = "RunConfiguration.UseQmlDebuggerAuto";
static const char QML_DEBUG_SERVER_PORT_KEY[] = "RunConfiguration.QmlDebugServerPort";
static const char USE_MULTIPROCESS_KEY[] = "RunConfiguration.UseMultiProcess";
namespace Debugger {
/*!
\class Debugger::DebuggerRunConfigurationAspect
*/
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(
ProjectExplorer::RunConfiguration *rc) :
m_runConfiguration(rc),
m_useCppDebugger(true),
m_useQmlDebugger(AutoEnableQmlDebugger),
m_qmlDebugServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
m_useMultiProcess(false),
m_suppressDisplay(false),
m_suppressQmlDebuggingOptions(false),
m_suppressCppDebuggingOptions(false),
m_suppressQmlDebuggingSpinbox(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),
m_suppressDisplay(other->m_suppressDisplay),
m_suppressQmlDebuggingOptions(other->m_suppressQmlDebuggingOptions),
m_suppressCppDebuggingOptions(other->m_suppressCppDebuggingOptions),
m_suppressQmlDebuggingSpinbox(other->m_suppressQmlDebuggingSpinbox)
{
ctor();
}
ProjectExplorer::RunConfiguration *DebuggerRunConfigurationAspect::runConfiguration()
{
return m_runConfiguration;
}
void DebuggerRunConfigurationAspect::setUseQmlDebugger(bool value)
{
m_useQmlDebugger = value ? EnableQmlDebugger : DisableQmlDebugger;
emit debuggersChanged();
}
void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value)
{
m_useCppDebugger = value;
emit debuggersChanged();
}
bool DebuggerRunConfigurationAspect::useCppDebugger() const
{
return m_useCppDebugger;
}
bool DebuggerRunConfigurationAspect::useQmlDebugger() const
{
if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnableQmlDebugger)
return m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS);
return m_useQmlDebugger == DebuggerRunConfigurationAspect::EnableQmlDebugger;
}
uint DebuggerRunConfigurationAspect::qmlDebugServerPort() const
{
return m_qmlDebugServerPort;
}
void DebuggerRunConfigurationAspect::setQmllDebugServerPort(uint port)
{
m_qmlDebugServerPort = port;
}
bool DebuggerRunConfigurationAspect::useMultiProcess() const
{
return m_useMultiProcess;
}
void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value)
{
m_useMultiProcess = value;
}
void DebuggerRunConfigurationAspect::suppressDisplay()
{
m_suppressDisplay = true;
}
void DebuggerRunConfigurationAspect::suppressQmlDebuggingOptions()
{
m_suppressQmlDebuggingOptions = true;
}
void DebuggerRunConfigurationAspect::suppressCppDebuggingOptions()
{
m_suppressCppDebuggingOptions = true;
}
void DebuggerRunConfigurationAspect::suppressQmlDebuggingSpinbox()
{
m_suppressQmlDebuggingSpinbox = true;
}
bool DebuggerRunConfigurationAspect::isDisplaySuppressed() const
{
return m_suppressDisplay;
}
bool DebuggerRunConfigurationAspect::areQmlDebuggingOptionsSuppressed() const
{
return m_suppressQmlDebuggingOptions;
}
bool DebuggerRunConfigurationAspect::areCppDebuggingOptionsSuppressed() const
{
return m_suppressCppDebuggingOptions;
}
bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const
{
return m_suppressQmlDebuggingSpinbox;
}
QString DebuggerRunConfigurationAspect::displayName() const
{
return tr("Debugger settings");
}
QVariantMap DebuggerRunConfigurationAspect::toMap() const
{
QVariantMap map;
map.insert(QLatin1String(USE_CPP_DEBUGGER_KEY), m_useCppDebugger);
map.insert(QLatin1String(USE_QML_DEBUGGER_KEY), m_useQmlDebugger == EnableQmlDebugger);
map.insert(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), m_useQmlDebugger == AutoEnableQmlDebugger);
map.insert(QLatin1String(QML_DEBUG_SERVER_PORT_KEY), m_qmlDebugServerPort);
map.insert(QLatin1String(USE_MULTIPROCESS_KEY), m_useMultiProcess);
return map;
}
void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
{
m_useCppDebugger = map.value(QLatin1String(USE_CPP_DEBUGGER_KEY), true).toBool();
if (map.value(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), false).toBool()) {
m_useQmlDebugger = AutoEnableQmlDebugger;
} else {
bool useQml = map.value(QLatin1String(USE_QML_DEBUGGER_KEY), false).toBool();
m_useQmlDebugger = useQml ? EnableQmlDebugger : DisableQmlDebugger;
}
m_useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
}
DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(
ProjectExplorer::RunConfiguration *parent) const
{
return new DebuggerRunConfigurationAspect(parent, this);
}
void DebuggerRunConfigurationAspect::ctor()
{
connect(this, SIGNAL(debuggersChanged()),
m_runConfiguration, SIGNAL(requestRunActionsUpdate()));
}
} // namespace Debugger

View File

@@ -0,0 +1,104 @@
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef DEBUGGERRUNCONFIGURATIONASPECT_H
#define DEBUGGERRUNCONFIGURATIONASPECT_H
#include "debugger_global.h"
#include <projectexplorer/runconfiguration.h>
namespace Debugger {
namespace Internal { class DebuggerRunConfigWidget; }
class DEBUGGER_EXPORT DebuggerRunConfigurationAspect
: public QObject, public ProjectExplorer::IRunConfigurationAspect
{
Q_OBJECT
public:
DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration);
DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration,
const DebuggerRunConfigurationAspect *other);
enum QmlDebuggerStatus {
DisableQmlDebugger = 0,
EnableQmlDebugger,
AutoEnableQmlDebugger
};
QVariantMap toMap() const;
void fromMap(const QVariantMap &map);
DebuggerRunConfigurationAspect *clone(ProjectExplorer::RunConfiguration *parent) const;
QString displayName() const;
bool useCppDebugger() const;
void setUseCppDebugger(bool value);
bool useQmlDebugger() const;
void setUseQmlDebugger(bool value);
uint qmlDebugServerPort() const;
void setQmllDebugServerPort(uint port);
bool useMultiProcess() const;
void setUseMultiProcess(bool on);
void suppressDisplay();
void suppressQmlDebuggingOptions();
void suppressCppDebuggingOptions();
void suppressQmlDebuggingSpinbox();
bool isDisplaySuppressed() const;
bool areQmlDebuggingOptionsSuppressed() const;
bool areCppDebuggingOptionsSuppressed() const;
bool isQmlDebuggingSpinboxSuppressed() const;
ProjectExplorer::RunConfiguration *runConfiguration();
signals:
void debuggersChanged();
private:
void ctor();
ProjectExplorer::RunConfiguration *m_runConfiguration;
bool m_useCppDebugger;
QmlDebuggerStatus m_useQmlDebugger;
uint m_qmlDebugServerPort;
bool m_useMultiProcess;
bool m_suppressDisplay;
bool m_suppressQmlDebuggingOptions;
bool m_suppressCppDebuggingOptions;
bool m_suppressQmlDebuggingSpinbox;
friend class Internal::DebuggerRunConfigWidget;
};
} // namespace Debugger
#endif // DEBUGGERRUNCONFIGURATIONASPECT_H

View File

@@ -35,6 +35,7 @@
#include "debuggerengine.h" #include "debuggerengine.h"
#include "debuggerkitinformation.h" #include "debuggerkitinformation.h"
#include "debuggerplugin.h" #include "debuggerplugin.h"
#include "debuggerrunconfigurationaspect.h"
#include "debuggerstartparameters.h" #include "debuggerstartparameters.h"
#include "debuggerstringutils.h" #include "debuggerstringutils.h"
#include "debuggertooltipmanager.h" #include "debuggertooltipmanager.h"
@@ -145,7 +146,7 @@ public:
DebuggerRunConfigWidget::DebuggerRunConfigWidget(RunConfiguration *runConfiguration) DebuggerRunConfigWidget::DebuggerRunConfigWidget(RunConfiguration *runConfiguration)
{ {
m_aspect = runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); m_aspect = runConfiguration->extraAspect<Debugger::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);
@@ -510,7 +511,7 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
} }
DebuggerRunConfigurationAspect *aspect DebuggerRunConfigurationAspect *aspect
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
sp.multiProcess = aspect->useMultiProcess(); sp.multiProcess = aspect->useMultiProcess();
if (aspect->useCppDebugger()) if (aspect->useCppDebugger())
@@ -585,7 +586,7 @@ static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc,
if (rc) { if (rc) {
DebuggerRunConfigurationAspect *aspect DebuggerRunConfigurationAspect *aspect
= rc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = rc->extraAspect<Debugger::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;

View File

@@ -38,7 +38,6 @@
#include <utils/environment.h> #include <utils/environment.h>
#include <projectexplorer/abi.h> #include <projectexplorer/abi.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QMetaType> #include <QMetaType>
@@ -67,7 +66,7 @@ public:
multiProcess(false), multiProcess(false),
languages(AnyLanguage), languages(AnyLanguage),
qmlServerAddress(QLatin1String("127.0.0.1")), qmlServerAddress(QLatin1String("127.0.0.1")),
qmlServerPort(ProjectExplorer::Constants::QML_DEFAULT_DEBUG_SERVER_PORT), qmlServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
remoteSetupNeeded(false), remoteSetupNeeded(false),
startMode(NoStartMode), startMode(NoStartMode),
closeMode(KillAtClose), closeMode(KillAtClose),

View File

@@ -38,6 +38,7 @@
#include "stackhandler.h" #include "stackhandler.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/qtsupportconstants.h> #include <qtsupport/qtsupportconstants.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/savedaction.h> #include <utils/savedaction.h>

View File

@@ -33,6 +33,7 @@
#include "debuggerdialogs.h" #include "debuggerdialogs.h"
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <ssh/sftpfilesystemmodel.h> #include <ssh/sftpfilesystemmodel.h>
#include <utils/pathchooser.h> #include <utils/pathchooser.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>

View File

@@ -35,6 +35,7 @@
#include "maemorunconfigurationwidget.h" #include "maemorunconfigurationwidget.h"
#include <debugger/debuggerconstants.h> #include <debugger/debuggerconstants.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
@@ -78,7 +79,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)
extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingOptions(); extraAspect<Debugger::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingOptions();
} }
bool MaemoRunConfiguration::isEnabled() const bool MaemoRunConfiguration::isEnabled() const

View File

@@ -36,6 +36,7 @@
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/environmentwidget.h> #include <projectexplorer/environmentwidget.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
@@ -83,7 +84,7 @@ 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->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(), connect(m_runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()), SIGNAL(debuggersChanged()),
SLOT(updateMountWarning())); SLOT(updateMountWarning()));
updateMountWarning(); updateMountWarning();

View File

@@ -2368,17 +2368,12 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged()
if (rc == previousRunConfiguration) if (rc == previousRunConfiguration)
return; return;
if (previousRunConfiguration) { if (previousRunConfiguration) {
disconnect(previousRunConfiguration, SIGNAL(enabledChanged()), disconnect(previousRunConfiguration, SIGNAL(requestRunActionsUpdate()),
this, SIGNAL(updateRunActions()));
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(requestRunActionsUpdate()),
this, SIGNAL(updateRunActions()));
connect(rc->extraAspect<DebuggerRunConfigurationAspect>(), SIGNAL(debuggersChanged()),
this, SIGNAL(updateRunActions())); this, SIGNAL(updateRunActions()));
} }
emit updateRunActions(); emit updateRunActions();

View File

@@ -226,9 +226,6 @@ const char MSVC_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.Msvc";
const char WINCE_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.WinCE"; const char WINCE_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.WinCE";
const char CUSTOM_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.Custom"; const char CUSTOM_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.Custom";
// Run Configuration defaults:
const int QML_DEFAULT_DEBUG_SERVER_PORT = 3768;
// Default directory to run custom (build) commands in. // Default directory to run custom (build) commands in.
const char DEFAULT_WORKING_DIR[] = "%{buildDir}"; const char DEFAULT_WORKING_DIR[] = "%{buildDir}";

View File

@@ -103,158 +103,6 @@ bool ProcessHandle::equals(const ProcessHandle &rhs) const
return m_pid == rhs.m_pid; return m_pid == rhs.m_pid;
} }
/*!
\class ProjectExplorer::DebuggerRunConfigurationAspect
*/
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(RunConfiguration *rc) :
m_runConfiguration(rc),
m_useCppDebugger(true),
m_useQmlDebugger(AutoEnableQmlDebugger),
m_qmlDebugServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
m_useMultiProcess(false),
m_suppressDisplay(false),
m_suppressQmlDebuggingOptions(false),
m_suppressCppDebuggingOptions(false),
m_suppressQmlDebuggingSpinbox(false)
{}
DebuggerRunConfigurationAspect::DebuggerRunConfigurationAspect(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),
m_suppressDisplay(other->m_suppressDisplay),
m_suppressQmlDebuggingOptions(other->m_suppressQmlDebuggingOptions),
m_suppressCppDebuggingOptions(other->m_suppressCppDebuggingOptions),
m_suppressQmlDebuggingSpinbox(other->m_suppressQmlDebuggingSpinbox)
{}
RunConfiguration *DebuggerRunConfigurationAspect::runConfiguration()
{
return m_runConfiguration;
}
void DebuggerRunConfigurationAspect::setUseQmlDebugger(bool value)
{
m_useQmlDebugger = value ? EnableQmlDebugger : DisableQmlDebugger;
emit debuggersChanged();
}
void DebuggerRunConfigurationAspect::setUseCppDebugger(bool value)
{
m_useCppDebugger = value;
emit debuggersChanged();
}
bool DebuggerRunConfigurationAspect::useCppDebugger() const
{
return m_useCppDebugger;
}
bool DebuggerRunConfigurationAspect::useQmlDebugger() const
{
if (m_useQmlDebugger == DebuggerRunConfigurationAspect::AutoEnableQmlDebugger)
return m_runConfiguration->target()->project()->projectLanguages().contains(
ProjectExplorer::Constants::LANG_QMLJS);
return m_useQmlDebugger == DebuggerRunConfigurationAspect::EnableQmlDebugger;
}
uint DebuggerRunConfigurationAspect::qmlDebugServerPort() const
{
return m_qmlDebugServerPort;
}
void DebuggerRunConfigurationAspect::setQmllDebugServerPort(uint port)
{
m_qmlDebugServerPort = port;
}
bool DebuggerRunConfigurationAspect::useMultiProcess() const
{
return m_useMultiProcess;
}
void DebuggerRunConfigurationAspect::setUseMultiProcess(bool value)
{
m_useMultiProcess = value;
}
void DebuggerRunConfigurationAspect::suppressDisplay()
{
m_suppressDisplay = true;
}
void DebuggerRunConfigurationAspect::suppressQmlDebuggingOptions()
{
m_suppressQmlDebuggingOptions = true;
}
void DebuggerRunConfigurationAspect::suppressCppDebuggingOptions()
{
m_suppressCppDebuggingOptions = true;
}
void DebuggerRunConfigurationAspect::suppressQmlDebuggingSpinbox()
{
m_suppressQmlDebuggingSpinbox = true;
}
bool DebuggerRunConfigurationAspect::isDisplaySuppressed() const
{
return m_suppressDisplay;
}
bool DebuggerRunConfigurationAspect::areQmlDebuggingOptionsSuppressed() const
{
return m_suppressQmlDebuggingOptions;
}
bool DebuggerRunConfigurationAspect::areCppDebuggingOptionsSuppressed() const
{
return m_suppressCppDebuggingOptions;
}
bool DebuggerRunConfigurationAspect::isQmlDebuggingSpinboxSuppressed() const
{
return m_suppressQmlDebuggingSpinbox;
}
QString DebuggerRunConfigurationAspect::displayName() const
{
return tr("Debugger settings");
}
QVariantMap DebuggerRunConfigurationAspect::toMap() const
{
QVariantMap map;
map.insert(QLatin1String(USE_CPP_DEBUGGER_KEY), m_useCppDebugger);
map.insert(QLatin1String(USE_QML_DEBUGGER_KEY), m_useQmlDebugger == EnableQmlDebugger);
map.insert(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), m_useQmlDebugger == AutoEnableQmlDebugger);
map.insert(QLatin1String(QML_DEBUG_SERVER_PORT_KEY), m_qmlDebugServerPort);
map.insert(QLatin1String(USE_MULTIPROCESS_KEY), m_useMultiProcess);
return map;
}
void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
{
m_useCppDebugger = map.value(QLatin1String(USE_CPP_DEBUGGER_KEY), true).toBool();
if (map.value(QLatin1String(USE_QML_DEBUGGER_AUTO_KEY), false).toBool()) {
m_useQmlDebugger = AutoEnableQmlDebugger;
} else {
bool useQml = map.value(QLatin1String(USE_QML_DEBUGGER_KEY), false).toBool();
m_useQmlDebugger = useQml ? EnableQmlDebugger : DisableQmlDebugger;
}
m_useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
}
DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::clone(RunConfiguration *parent) const
{
return new DebuggerRunConfigurationAspect(parent, this);
}
/*! /*!
\class ProjectExplorer::RunConfiguration \class ProjectExplorer::RunConfiguration
@@ -275,6 +123,7 @@ RunConfiguration::RunConfiguration(Target *target, const Core::Id id) :
m_aspectsInitialized(false) m_aspectsInitialized(false)
{ {
Q_ASSERT(target); Q_ASSERT(target);
ctor();
} }
RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) : RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
@@ -282,6 +131,7 @@ RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
m_aspectsInitialized(true) m_aspectsInitialized(true)
{ {
Q_ASSERT(target); Q_ASSERT(target);
ctor();
foreach (IRunConfigurationAspect *aspect, source->m_aspects) { foreach (IRunConfigurationAspect *aspect, source->m_aspects) {
IRunConfigurationAspect *clone = aspect->clone(this); IRunConfigurationAspect *clone = aspect->clone(this);
if (clone) if (clone)
@@ -305,6 +155,11 @@ void RunConfiguration::addExtraAspects()
m_aspectsInitialized = true; m_aspectsInitialized = true;
} }
void RunConfiguration::ctor()
{
connect(this, SIGNAL(enabledChanged()), this, SIGNAL(requestRunActionsUpdate()));
}
/*! /*!
\brief Used to find out whether a runconfiguration is enabled \brief Used to find out whether a runconfiguration is enabled
*/ */

View File

@@ -47,7 +47,6 @@ namespace Utils { class OutputFormatter; }
namespace ProjectExplorer { namespace ProjectExplorer {
class Abi; class Abi;
class BuildConfiguration; class BuildConfiguration;
class DebuggerRunConfigurationAspect;
class RunConfiguration; class RunConfiguration;
class RunControl; class RunControl;
class Target; class Target;
@@ -86,64 +85,6 @@ protected:
virtual void fromMap(const QVariantMap &map) = 0; virtual void fromMap(const QVariantMap &map) = 0;
}; };
class PROJECTEXPLORER_EXPORT DebuggerRunConfigurationAspect
: public QObject, public ProjectExplorer::IRunConfigurationAspect
{
Q_OBJECT
public:
DebuggerRunConfigurationAspect(RunConfiguration *runConfiguration);
DebuggerRunConfigurationAspect(RunConfiguration *runConfiguration,
const DebuggerRunConfigurationAspect *other);
enum QmlDebuggerStatus {
DisableQmlDebugger = 0,
EnableQmlDebugger,
AutoEnableQmlDebugger
};
QVariantMap toMap() const;
void fromMap(const QVariantMap &map);
DebuggerRunConfigurationAspect *clone(RunConfiguration *parent) const;
QString displayName() const;
bool useCppDebugger() const;
void setUseCppDebugger(bool value);
bool useQmlDebugger() const;
void setUseQmlDebugger(bool value);
uint qmlDebugServerPort() const;
void setQmllDebugServerPort(uint port);
bool useMultiProcess() const;
void setUseMultiProcess(bool on);
void suppressDisplay();
void suppressQmlDebuggingOptions();
void suppressCppDebuggingOptions();
void suppressQmlDebuggingSpinbox();
bool isDisplaySuppressed() const;
bool areQmlDebuggingOptionsSuppressed() const;
bool areCppDebuggingOptionsSuppressed() const;
bool isQmlDebuggingSpinboxSuppressed() const;
RunConfiguration *runConfiguration();
signals:
void debuggersChanged();
public:
RunConfiguration *m_runConfiguration;
bool m_useCppDebugger;
QmlDebuggerStatus m_useQmlDebugger;
uint m_qmlDebugServerPort;
bool m_useMultiProcess;
bool m_suppressDisplay;
bool m_suppressQmlDebuggingOptions;
bool m_suppressCppDebuggingOptions;
bool m_suppressQmlDebuggingSpinbox;
};
// Documentation inside. // Documentation inside.
class PROJECTEXPLORER_EXPORT RunConfiguration : public ProjectConfiguration class PROJECTEXPLORER_EXPORT RunConfiguration : public ProjectConfiguration
{ {
@@ -186,6 +127,7 @@ public:
signals: signals:
void enabledChanged(); void enabledChanged();
void requestRunActionsUpdate();
protected: protected:
RunConfiguration(Target *parent, const Core::Id id); RunConfiguration(Target *parent, const Core::Id id);
@@ -195,6 +137,8 @@ protected:
BuildConfiguration *activeBuildConfiguration() const; BuildConfiguration *activeBuildConfiguration() const;
private: private:
void ctor();
QList<IRunConfigurationAspect *> m_aspects; QList<IRunConfigurationAspect *> m_aspects;
bool m_aspectsInitialized; bool m_aspectsInitialized;
}; };

View File

@@ -34,6 +34,7 @@
#include <analyzerbase/analyzermanager.h> #include <analyzerbase/analyzermanager.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <coreplugin/helpmanager.h> #include <coreplugin/helpmanager.h>
#include <qmlprojectmanager/qmlprojectrunconfiguration.h> #include <qmlprojectmanager/qmlprojectrunconfiguration.h>
@@ -83,8 +84,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 Debugger::DebuggerRunConfigurationAspect *aspect
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfiguration->extraAspect<Debugger::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.

View File

@@ -69,6 +69,8 @@
#include <coreplugin/actionmanager/actionmanager.h> #include <coreplugin/actionmanager/actionmanager.h>
#include <coreplugin/actionmanager/actioncontainer.h> #include <coreplugin/actionmanager/actioncontainer.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <qtsupport/qtkitinformation.h> #include <qtsupport/qtkitinformation.h>
#include <QApplication> #include <QApplication>
@@ -299,8 +301,8 @@ 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 Debugger::DebuggerRunConfigurationAspect *aspect
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfiguration->extraAspect<Debugger::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 =

View File

@@ -35,6 +35,7 @@
#include <coreplugin/editormanager/editormanager.h> #include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/editormanager/ieditor.h> #include <coreplugin/editormanager/ieditor.h>
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/qtcprocess.h> #include <utils/qtcprocess.h>
@@ -91,8 +92,8 @@ QString QmlProjectRunConfiguration::disabledReason() const
void QmlProjectRunConfiguration::ctor() void QmlProjectRunConfiguration::ctor()
{ {
// reset default settings in constructor // reset default settings in constructor
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = extraAspect<Debugger::DebuggerRunConfigurationAspect>();
aspect->setUseCppDebugger(false); aspect->setUseCppDebugger(false);
aspect->setUseQmlDebugger(true); aspect->setUseQmlDebugger(true);
aspect->suppressQmlDebuggingSpinbox(); aspect->suppressQmlDebuggingSpinbox();

View File

@@ -30,6 +30,7 @@
#include "qmlprojectruncontrol.h" #include "qmlprojectruncontrol.h"
#include "qmlprojectrunconfiguration.h" #include "qmlprojectrunconfiguration.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/kit.h> #include <projectexplorer/kit.h>
@@ -200,8 +201,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 Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfig->extraAspect<Debugger::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();

View File

@@ -39,6 +39,7 @@
#include "blackberrydeviceconfiguration.h" #include "blackberrydeviceconfiguration.h"
#include "blackberrydeployinformation.h" #include "blackberrydeployinformation.h"
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
@@ -191,8 +192,8 @@ 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)
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= target()->activeRunConfiguration()->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = target()->activeRunConfiguration()->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (aspect->useQmlDebugger()) { 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>")

View File

@@ -39,6 +39,7 @@
#include "qnxutils.h" #include "qnxutils.h"
#include <debugger/debuggerplugin.h> #include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerrunner.h> #include <debugger/debuggerrunner.h>
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
#include <projectexplorer/deployconfiguration.h> #include <projectexplorer/deployconfiguration.h>
@@ -147,8 +148,8 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
params.displayName = runConfig->displayName(); params.displayName = runConfig->displayName();
params.remoteSetupNeeded = true; params.remoteSetupNeeded = true;
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (aspect->useQmlDebugger()) { if (aspect->useQmlDebugger()) {
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit()); BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
if (device) { if (device) {

View File

@@ -32,6 +32,7 @@
#include "remotelinuxrunconfiguration.h" #include "remotelinuxrunconfiguration.h"
#include <debugger/debuggerengine.h> #include <debugger/debuggerengine.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerstartparameters.h> #include <debugger/debuggerstartparameters.h>
#include <debugger/debuggerkitinformation.h> #include <debugger/debuggerkitinformation.h>
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
@@ -61,8 +62,8 @@ public:
LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig, LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig,
DebuggerEngine *engine) DebuggerEngine *engine)
: engine(engine), : engine(engine),
qmlDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger()), qmlDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger()),
cppDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()), cppDebugging(runConfig->extraAspect<Debugger::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,8 +106,8 @@ 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();
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (aspect->useQmlDebugger()) { if (aspect->useQmlDebugger()) {
params.languages |= QmlLanguage; params.languages |= QmlLanguage;
params.qmlServerAddress = device->sshParameters().host; params.qmlServerAddress = device->sshParameters().host;

View File

@@ -31,6 +31,7 @@
#include "remotelinuxrunconfigurationwidget.h" #include "remotelinuxrunconfigurationwidget.h"
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/buildtargetinfo.h> #include <projectexplorer/buildtargetinfo.h>
#include <projectexplorer/deploymentdata.h> #include <projectexplorer/deploymentdata.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
@@ -117,7 +118,7 @@ RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
void RemoteLinuxRunConfiguration::init() void RemoteLinuxRunConfiguration::init()
{ {
setDefaultDisplayName(defaultDisplayName()); setDefaultDisplayName(defaultDisplayName());
extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingSpinbox(); extraAspect<Debugger::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,8 +279,8 @@ QString RemoteLinuxRunConfiguration::alternateRemoteExecutable() const
int RemoteLinuxRunConfiguration::portsUsedByDebuggers() const int RemoteLinuxRunConfiguration::portsUsedByDebuggers() const
{ {
int ports = 0; int ports = 0;
ProjectExplorer::DebuggerRunConfigurationAspect *aspect Debugger::DebuggerRunConfigurationAspect *aspect
= extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(); = extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (aspect->useQmlDebugger()) if (aspect->useQmlDebugger())
++ports; ++ports;
if (aspect->useCppDebugger()) if (aspect->useCppDebugger())

View File

@@ -31,6 +31,7 @@
#include <remotelinux/remotelinuxrunconfiguration.h> #include <remotelinux/remotelinuxrunconfiguration.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/localapplicationrunconfiguration.h> #include <projectexplorer/localapplicationrunconfiguration.h>
#include <projectexplorer/kitinformation.h> #include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
@@ -67,7 +68,7 @@ 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->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>() sp.connParams.port = rc1->extraAspect<Debugger::DebuggerRunConfigurationAspect>()
->qmlDebugServerPort(); ->qmlDebugServerPort();
} else if (RemoteLinuxRunConfiguration *rc2 = } else if (RemoteLinuxRunConfiguration *rc2 =
qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) { qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) {