diff options
author | hjk <[email protected]> | 2010-06-14 17:23:25 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2010-06-14 17:24:13 +0200 |
commit | b3aff6b9192c77617bba63babaac3ba0d422c76d (patch) | |
tree | 02ae464225fa657969029288970b604581ff650e /src/plugins/debugger/debuggerrunner.cpp | |
parent | 6ed9830971017759e7ee96f3ca798328c653cb78 (diff) |
debugger: more of the RunControl refactoring
Pass output through the RunControl instead of the DebuggerManager.
Diffstat (limited to 'src/plugins/debugger/debuggerrunner.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerrunner.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/src/plugins/debugger/debuggerrunner.cpp b/src/plugins/debugger/debuggerrunner.cpp index a5b4fe1e2c3..41bcd22dd12 100644 --- a/src/plugins/debugger/debuggerrunner.cpp +++ b/src/plugins/debugger/debuggerrunner.cpp @@ -29,6 +29,7 @@ #include "debuggerrunner.h" #include "debuggermanager.h" +#include "debuggeroutputwindow.h" #include <projectexplorer/debugginghelper.h> #include <projectexplorer/environment.h> @@ -48,6 +49,8 @@ #include <QtGui/QTextDocument> using namespace ProjectExplorer; +using namespace Debugger::Internal; + namespace Debugger { @@ -147,9 +150,6 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager, connect(m_manager, SIGNAL(debuggingFinished()), this, SLOT(debuggingFinished()), Qt::QueuedConnection); - connect(m_manager, SIGNAL(applicationOutputAvailable(QString, bool)), - this, SLOT(slotAddToOutputWindowInline(QString, bool)), - Qt::QueuedConnection); connect(m_manager, SIGNAL(messageAvailable(QString, bool)), this, SLOT(slotMessageAvailable(QString, bool))); connect(m_manager, SIGNAL(inferiorPidChanged(qint64)), @@ -161,6 +161,7 @@ DebuggerRunControl::DebuggerRunControl(DebuggerManager *manager, if (m_startParameters.environment.empty()) m_startParameters.environment = ProjectExplorer::Environment().toStringList(); m_startParameters.useTerminal = false; + } QString DebuggerRunControl::displayName() const @@ -183,21 +184,19 @@ void DebuggerRunControl::start() QString errorMessage; QString settingsCategory; QString settingsPage; - if (m_manager->checkDebugConfiguration(m_startParameters.toolChainType, &errorMessage, - &settingsCategory, &settingsPage)) { + if (m_manager->checkDebugConfiguration(m_startParameters.toolChainType, + &errorMessage, &settingsCategory, &settingsPage)) { m_manager->startNewDebugger(this); emit started(); } else { appendMessage(this, errorMessage, true); emit finished(); - Core::ICore::instance()->showWarningWithOptions(tr("Debugger"), errorMessage, - QString(), - settingsCategory, settingsPage); + Core::ICore::instance()->showWarningWithOptions(tr("Debugger"), + errorMessage, QString(), settingsCategory, settingsPage); } } -void DebuggerRunControl::slotAddToOutputWindowInline(const QString &data, - bool onStdErr) +void DebuggerRunControl::showApplicationOutput(const QString &data, bool onStdErr) { emit addToOutputWindowInline(this, data, onStdErr); } @@ -207,6 +206,20 @@ void DebuggerRunControl::slotMessageAvailable(const QString &data, bool isError) emit appendMessage(this, data, isError); } +void DebuggerRunControl::showDebuggerOutput(const QString &output, int channel) +{ + DebuggerOutputWindow *ow = m_manager->debuggerOutputWindow(); + QTC_ASSERT(ow, return); + ow->showOutput(channel, output); +} + +void DebuggerRunControl::showDebuggerInput(const QString &input, int channel) +{ + DebuggerOutputWindow *ow = m_manager->debuggerOutputWindow(); + QTC_ASSERT(ow, return); + ow->showInput(channel, input); +} + void DebuggerRunControl::stop() { m_running = false; |