Commit 53364429 authored by Tobias Hunger's avatar Tobias Hunger

Move DebuggerRunConfigurationAspect into Debugger

Change-Id: I03cab5d963a6d7c77171efe360a552d8109f6a8b
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent e474b6ed
......@@ -37,6 +37,7 @@
#include <debugger/debuggerengine.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerkitinformation.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerstartparameters.h>
......@@ -91,8 +92,8 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.displayName = AndroidManager::packageName(target);
params.remoteSetupNeeded = true;
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (aspect->useCppDebugger()) {
params.languages |= CppLanguage;
Kit *kit = target->kit();
......@@ -133,8 +134,8 @@ AndroidDebugSupport::AndroidDebugSupport(AndroidRunConfiguration *runConfig,
m_gdbServerPort(5039),
m_qmlPort(0)
{
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
m_qmlPort = aspect->qmlDebugServerPort();
Q_ASSERT(aspect->useCppDebugger() || aspect->useQmlDebugger());
......
......@@ -35,6 +35,7 @@
#include "androidrunconfiguration.h"
#include "androidmanager.h"
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/target.h>
#include <QTime>
......@@ -46,8 +47,8 @@ namespace Internal {
AndroidRunner::AndroidRunner(QObject *parent, AndroidRunConfiguration *runConfig, bool debuggingMode)
: QThread(parent)
{
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
Debugger::DebuggerRunConfigurationAspect *aspect
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
m_useCppDebugger = debuggingMode && aspect->useCppDebugger();
m_useQmlDebugger = debuggingMode && aspect->useQmlDebugger();
m_remoteGdbChannel = runConfig->remoteChannel();
......
......@@ -29,6 +29,7 @@ HEADERS += \
debuggermainwindow.h \
debuggerplugin.h \
debuggerprotocol.h \
debuggerrunconfigurationaspect.h \
debuggerrunner.h \
debuggerstartparameters.h \
debuggerstreamops.h \
......@@ -82,6 +83,7 @@ SOURCES += \
debuggermainwindow.cpp \
debuggerplugin.cpp \
debuggerprotocol.cpp \
debuggerrunconfigurationaspect.cpp \
debuggerrunner.cpp \
debuggerstreamops.cpp \
debuggerkitconfigwidget.cpp \
......
......@@ -81,6 +81,10 @@ const char DOCKWIDGET_DEFAULT_AREA[] = "Debugger.Docks.DefaultArea";
const char TASK_CATEGORY_DEBUGGER_TEST[] = "DebuggerTest";
const char TASK_CATEGORY_DEBUGGER_DEBUGINFO[] = "Debuginfo";
const char TASK_CATEGORY_DEBUGGER_RUNTIME[] = "DebugRuntime";
// Run Configuration Aspect defaults:
const int QML_DEFAULT_DEBUG_SERVER_PORT = 3768;
} // namespace Constants
enum DebuggerState
......
......@@ -36,6 +36,7 @@
#include <coreplugin/icore.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/pathchooser.h>
#include <utils/fancylineedit.h>
#include <utils/qtcassert.h>
......
......@@ -30,6 +30,7 @@
#include "debuggermainwindow.h"
#include "debuggercore.h"
#include "debuggerengine.h"
#include "debuggerrunconfigurationaspect.h"
#include <utils/appmainwindow.h>
#include <utils/styledbar.h>
......@@ -200,14 +201,14 @@ void DebuggerMainWindowPrivate::updateUiForTarget(Target *target)
void DebuggerMainWindowPrivate::updateUiForRunConfiguration(RunConfiguration *rc)
{
if (m_previousRunConfiguration)
disconnect(m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(),
disconnect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()),
this, SLOT(updateUiForCurrentRunConfiguration()));
m_previousRunConfiguration = rc;
updateUiForCurrentRunConfiguration();
if (!rc)
return;
connect(m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(),
connect(m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()),
SLOT(updateUiForCurrentRunConfiguration()));
}
......@@ -225,9 +226,9 @@ void DebuggerMainWindowPrivate::updateActiveLanguages()
newLanguages = m_engineDebugLanguages;
else {
if (m_previousRunConfiguration) {
if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger())
if (m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger())
newLanguages |= CppLanguage;
if (m_previousRunConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger())
if (m_previousRunConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger())
newLanguages |= QmlLanguage;
}
}
......
......@@ -37,6 +37,7 @@
#include "debuggerengine.h"
#include "debuggermainwindow.h"
#include "debuggerrunner.h"
#include "debuggerrunconfigurationaspect.h"
#include "debuggerruncontrolfactory.h"
#include "debuggerstringutils.h"
#include "debuggerkitinformation.h"
......@@ -478,7 +479,7 @@ bool DummyEngine::hasCapability(unsigned cap) const
QTC_ASSERT(activeRc, return 0);
// This is a non-started Cdb or Gdb engine:
if (activeRc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger())
if (activeRc->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger())
return cap & (WatchpointByAddressCapability
| BreakConditionCapability
| TracePointCapability
......
/****************************************************************************
**
** 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
/****************************************************************************
**
** 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
......@@ -35,6 +35,7 @@
#include "debuggerengine.h"
#include "debuggerkitinformation.h"
#include "debuggerplugin.h"
#include "debuggerrunconfigurationaspect.h"
#include "debuggerstartparameters.h"
#include "debuggerstringutils.h"
#include "debuggertooltipmanager.h"
......@@ -145,7 +146,7 @@ public:
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_useQmlDebugger = new QCheckBox(tr("Enable QML"), this);
......@@ -510,7 +511,7 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
}
DebuggerRunConfigurationAspect *aspect
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
= runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
sp.multiProcess = aspect->useMultiProcess();
if (aspect->useCppDebugger())
......@@ -585,7 +586,7 @@ static bool fixupEngineTypes(DebuggerStartParameters &sp, RunConfiguration *rc,
if (rc) {
DebuggerRunConfigurationAspect *aspect
= rc->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
= rc->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
if (const Target *target = rc->target())
if (!fillParameters(&sp, target->kit(), errorMessage))
return false;
......
......@@ -38,7 +38,6 @@
#include <utils/environment.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QMetaType>
......@@ -67,7 +66,7 @@ public:
multiProcess(false),
languages(AnyLanguage),
qmlServerAddress(QLatin1String("127.0.0.1")),
qmlServerPort(ProjectExplorer::Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
qmlServerPort(Constants::QML_DEFAULT_DEBUG_SERVER_PORT),
remoteSetupNeeded(false),
startMode(NoStartMode),
closeMode(KillAtClose),
......
......@@ -38,6 +38,7 @@
#include "stackhandler.h"
#include <coreplugin/icore.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/qtsupportconstants.h>
#include <utils/qtcassert.h>
#include <utils/savedaction.h>
......
......@@ -33,6 +33,7 @@
#include "debuggerdialogs.h"
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <ssh/sftpfilesystemmodel.h>
#include <utils/pathchooser.h>
#include <utils/qtcassert.h>
......
......@@ -35,6 +35,7 @@
#include "maemorunconfigurationwidget.h"
#include <debugger/debuggerconstants.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/project.h>
......@@ -78,7 +79,7 @@ void MaemoRunConfiguration::init()
connect(m_remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged()));
if (DeviceTypeKitInformation::deviceTypeId(target()->kit()) != HarmattanOsType)
extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingOptions();
extraAspect<Debugger::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingOptions();
}
bool MaemoRunConfiguration::isEnabled() const
......
......@@ -36,6 +36,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <debugger/debuggerrunconfigurationaspect.h>
#include <projectexplorer/environmentwidget.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/target.h>
......@@ -83,7 +84,7 @@ MaemoRunConfigurationWidget::MaemoRunConfigurationWidget(
subLayout->setMargin(0);
addMountWidgets(subLayout);
connect(m_runConfiguration->target(), SIGNAL(kitChanged()), this, SLOT(updateMountWarning()));
connect(m_runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>(),
connect(m_runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()),
SLOT(updateMountWarning()));
updateMountWarning();
......
......@@ -2368,17 +2368,12 @@ void ProjectExplorerPlugin::activeRunConfigurationChanged()
if (rc == previousRunConfiguration)
return;
if (previousRunConfiguration) {
disconnect(previousRunConfiguration, SIGNAL(enabledChanged()),
this, SIGNAL(updateRunActions()));
disconnect(previousRunConfiguration->extraAspect<DebuggerRunConfigurationAspect>(),
SIGNAL(debuggersChanged()),
disconnect(previousRunConfiguration, SIGNAL(requestRunActionsUpdate()),
this, SIGNAL(updateRunActions()));
}
previousRunConfiguration = rc;
if (rc) {
connect(rc, SIGNAL(enabledChanged()),
this, SIGNAL(updateRunActions()));
connect(rc->extraAspect<DebuggerRunConfigurationAspect>(), SIGNAL(debuggersChanged()),
connect(rc, SIGNAL(requestRunActionsUpdate()),
this, SIGNAL(updateRunActions()));
}
emit updateRunActions();
......
......@@ -226,9 +226,6 @@ const char MSVC_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.Msvc";
const char WINCE_TOOLCHAIN_ID[] = "ProjectExplorer.ToolChain.WinCE";
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.
const char DEFAULT_WORKING_DIR[] = "%{buildDir}";
......
......@@ -103,158 +103,6 @@ bool ProcessHandle::equals(const ProcessHandle &rhs) const
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)