forked from qt-creator/qt-creator
Move DebuggerRunConfigurationAspect into Debugger
Change-Id: I03cab5d963a6d7c77171efe360a552d8109f6a8b Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -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
|
||||
|
212
src/plugins/debugger/debuggerrunconfigurationaspect.cpp
Normal file
212
src/plugins/debugger/debuggerrunconfigurationaspect.cpp
Normal 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
|
104
src/plugins/debugger/debuggerrunconfigurationaspect.h
Normal file
104
src/plugins/debugger/debuggerrunconfigurationaspect.h
Normal 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
|
@@ -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)
|
||||
{
|
||||
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
|
||||
@@ -275,6 +123,7 @@ RunConfiguration::RunConfiguration(Target *target, const Core::Id id) :
|
||||
m_aspectsInitialized(false)
|
||||
{
|
||||
Q_ASSERT(target);
|
||||
ctor();
|
||||
}
|
||||
|
||||
RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
|
||||
@@ -282,6 +131,7 @@ RunConfiguration::RunConfiguration(Target *target, RunConfiguration *source) :
|
||||
m_aspectsInitialized(true)
|
||||
{
|
||||
Q_ASSERT(target);
|
||||
ctor();
|
||||
foreach (IRunConfigurationAspect *aspect, source->m_aspects) {
|
||||
IRunConfigurationAspect *clone = aspect->clone(this);
|
||||
if (clone)
|
||||
@@ -305,6 +155,11 @@ void RunConfiguration::addExtraAspects()
|
||||
m_aspectsInitialized = true;
|
||||
}
|
||||
|
||||
void RunConfiguration::ctor()
|
||||
{
|
||||
connect(this, SIGNAL(enabledChanged()), this, SIGNAL(requestRunActionsUpdate()));
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Used to find out whether a runconfiguration is enabled
|
||||
*/
|
||||
|
@@ -47,7 +47,6 @@ namespace Utils { class OutputFormatter; }
|
||||
namespace ProjectExplorer {
|
||||
class Abi;
|
||||
class BuildConfiguration;
|
||||
class DebuggerRunConfigurationAspect;
|
||||
class RunConfiguration;
|
||||
class RunControl;
|
||||
class Target;
|
||||
@@ -86,64 +85,6 @@ protected:
|
||||
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.
|
||||
class PROJECTEXPLORER_EXPORT RunConfiguration : public ProjectConfiguration
|
||||
{
|
||||
@@ -186,6 +127,7 @@ public:
|
||||
|
||||
signals:
|
||||
void enabledChanged();
|
||||
void requestRunActionsUpdate();
|
||||
|
||||
protected:
|
||||
RunConfiguration(Target *parent, const Core::Id id);
|
||||
@@ -195,6 +137,8 @@ protected:
|
||||
BuildConfiguration *activeBuildConfiguration() const;
|
||||
|
||||
private:
|
||||
void ctor();
|
||||
|
||||
QList<IRunConfigurationAspect *> m_aspects;
|
||||
bool m_aspectsInitialized;
|
||||
};
|
||||
|
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <qmlprojectmanager/qmlprojectrunconfiguration.h>
|
||||
@@ -83,8 +84,8 @@ QmlProfilerEngine::QmlProfilerEnginePrivate::createRunner(ProjectExplorer::RunCo
|
||||
AbstractQmlProfilerRunner *runner = 0;
|
||||
if (!runConfiguration) // attaching
|
||||
return 0;
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
if (QmlProjectManager::QmlProjectRunConfiguration *rc1 =
|
||||
qobject_cast<QmlProjectManager::QmlProjectRunConfiguration *>(runConfiguration)) {
|
||||
// This is a "plain" .qmlproject.
|
||||
|
@@ -69,6 +69,8 @@
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/actionmanager/actioncontainer.h>
|
||||
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <QApplication>
|
||||
@@ -299,8 +301,8 @@ AnalyzerStartParameters QmlProfilerTool::createStartParameters(RunConfiguration
|
||||
AnalyzerStartParameters sp;
|
||||
sp.startMode = StartQml; // FIXME: The parameter struct is not needed/not used.
|
||||
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfiguration->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfiguration->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
|
||||
// FIXME: This is only used to communicate the connParams settings.
|
||||
if (QmlProjectRunConfiguration *rc1 =
|
||||
|
@@ -35,6 +35,7 @@
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
#include <coreplugin/editormanager/ieditor.h>
|
||||
#include <coreplugin/icore.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
@@ -91,8 +92,8 @@ QString QmlProjectRunConfiguration::disabledReason() const
|
||||
void QmlProjectRunConfiguration::ctor()
|
||||
{
|
||||
// reset default settings in constructor
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
aspect->setUseCppDebugger(false);
|
||||
aspect->setUseQmlDebugger(true);
|
||||
aspect->suppressQmlDebuggingSpinbox();
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "qmlprojectruncontrol.h"
|
||||
#include "qmlprojectrunconfiguration.h"
|
||||
#include <coreplugin/icore.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <projectexplorer/kit.h>
|
||||
@@ -200,8 +201,8 @@ QString QmlProjectRunControlFactory::displayName() const
|
||||
RunControl *QmlProjectRunControlFactory::createDebugRunControl(QmlProjectRunConfiguration *runConfig, QString *errorMessage)
|
||||
{
|
||||
Debugger::DebuggerStartParameters params;
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
params.startMode = Debugger::StartInternal;
|
||||
params.executable = runConfig->observerPath();
|
||||
params.processArgs = runConfig->viewerArguments();
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include "blackberrydeviceconfiguration.h"
|
||||
#include "blackberrydeployinformation.h"
|
||||
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.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());
|
||||
|
||||
// Add parameter for QML debugging (if enabled)
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= target()->activeRunConfiguration()->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= target()->activeRunConfiguration()->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
if (aspect->useQmlDebugger()) {
|
||||
if (!fileContent.contains("-qmljsdebugger")) {
|
||||
const QString argString = QString::fromLatin1("<arg>-qmljsdebugger=port:%1</arg>\n</qnx>")
|
||||
|
@@ -39,6 +39,7 @@
|
||||
#include "qnxutils.h"
|
||||
|
||||
#include <debugger/debuggerplugin.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <debugger/debuggerrunner.h>
|
||||
#include <debugger/debuggerkitinformation.h>
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
@@ -147,8 +148,8 @@ Debugger::DebuggerStartParameters BlackBerryRunControlFactory::startParameters(
|
||||
params.displayName = runConfig->displayName();
|
||||
params.remoteSetupNeeded = true;
|
||||
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
if (aspect->useQmlDebugger()) {
|
||||
BlackBerryDeviceConfiguration::ConstPtr device = BlackBerryDeviceConfiguration::device(runConfig->target()->kit());
|
||||
if (device) {
|
||||
|
@@ -32,6 +32,7 @@
|
||||
#include "remotelinuxrunconfiguration.h"
|
||||
|
||||
#include <debugger/debuggerengine.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <debugger/debuggerstartparameters.h>
|
||||
#include <debugger/debuggerkitinformation.h>
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
@@ -61,8 +62,8 @@ public:
|
||||
LinuxDeviceDebugSupportPrivate(const RemoteLinuxRunConfiguration *runConfig,
|
||||
DebuggerEngine *engine)
|
||||
: engine(engine),
|
||||
qmlDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useQmlDebugger()),
|
||||
cppDebugging(runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->useCppDebugger()),
|
||||
qmlDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useQmlDebugger()),
|
||||
cppDebugging(runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>()->useCppDebugger()),
|
||||
state(Inactive),
|
||||
gdbServerPort(-1), qmlPort(-1),
|
||||
device(DeviceKitInformation::device(runConfig->target()->kit())),
|
||||
@@ -105,8 +106,8 @@ DebuggerStartParameters LinuxDeviceDebugSupport::startParameters(const RemoteLin
|
||||
if (ToolChain *tc = ToolChainKitInformation::toolChain(k))
|
||||
params.toolChainAbi = tc->targetAbi();
|
||||
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= runConfig->extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
if (aspect->useQmlDebugger()) {
|
||||
params.languages |= QmlLanguage;
|
||||
params.qmlServerAddress = device->sshParameters().host;
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "remotelinuxrunconfigurationwidget.h"
|
||||
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <projectexplorer/buildtargetinfo.h>
|
||||
#include <projectexplorer/deploymentdata.h>
|
||||
#include <projectexplorer/project.h>
|
||||
@@ -117,7 +118,7 @@ RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
|
||||
void RemoteLinuxRunConfiguration::init()
|
||||
{
|
||||
setDefaultDisplayName(defaultDisplayName());
|
||||
extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingSpinbox();
|
||||
extraAspect<Debugger::DebuggerRunConfigurationAspect>()->suppressQmlDebuggingSpinbox();
|
||||
|
||||
connect(target(), SIGNAL(deploymentDataChanged()), SLOT(handleBuildSystemDataUpdated()));
|
||||
connect(target(), SIGNAL(applicationTargetsChanged()), SLOT(handleBuildSystemDataUpdated()));
|
||||
@@ -278,8 +279,8 @@ QString RemoteLinuxRunConfiguration::alternateRemoteExecutable() const
|
||||
int RemoteLinuxRunConfiguration::portsUsedByDebuggers() const
|
||||
{
|
||||
int ports = 0;
|
||||
ProjectExplorer::DebuggerRunConfigurationAspect *aspect
|
||||
= extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>();
|
||||
Debugger::DebuggerRunConfigurationAspect *aspect
|
||||
= extraAspect<Debugger::DebuggerRunConfigurationAspect>();
|
||||
if (aspect->useQmlDebugger())
|
||||
++ports;
|
||||
if (aspect->useCppDebugger())
|
||||
|
@@ -31,6 +31,7 @@
|
||||
|
||||
#include <remotelinux/remotelinuxrunconfiguration.h>
|
||||
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <projectexplorer/localapplicationrunconfiguration.h>
|
||||
#include <projectexplorer/kitinformation.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
@@ -67,7 +68,7 @@ Analyzer::AnalyzerStartParameters ValgrindTool::createStartParameters(
|
||||
sp.debuggee = rc1->executable();
|
||||
sp.debuggeeArgs = rc1->commandLineArguments();
|
||||
sp.connParams.host = QLatin1String("localhost");
|
||||
sp.connParams.port = rc1->extraAspect<ProjectExplorer::DebuggerRunConfigurationAspect>()
|
||||
sp.connParams.port = rc1->extraAspect<Debugger::DebuggerRunConfigurationAspect>()
|
||||
->qmlDebugServerPort();
|
||||
} else if (RemoteLinuxRunConfiguration *rc2 =
|
||||
qobject_cast<RemoteLinuxRunConfiguration *>(runConfiguration)) {
|
||||
|
Reference in New Issue
Block a user