qml debugger: make the application output work

This commit is contained in:
Olivier Goffart
2010-08-25 16:48:35 +02:00
parent d0f794b65e
commit af46c3d947
4 changed files with 24 additions and 2 deletions

View File

@@ -35,6 +35,7 @@
#include "debuggerdialogs.h"
#include "debuggerstringutils.h"
#include "debuggeruiswitcher.h"
#include "debuggerrunner.h"
#include "breakhandler.h"
#include "moduleshandler.h"
@@ -129,7 +130,15 @@ void QmlEngine::setupInferior()
{
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state());
connect(&m_applicationLauncher, SIGNAL(processExited(int)), SLOT(disconnected()));
connect(&m_applicationLauncher, SIGNAL(processExited(int)),
this, SLOT(disconnected()));
connect(&m_applicationLauncher, SIGNAL(appendMessage(QString,bool)),
this, SLOT(slotMessage(QString, bool)));
connect(&m_applicationLauncher, SIGNAL(appendOutput(QString, bool)),
this, SLOT(slotAddToOutputWindow(QString, bool)));
connect(&m_applicationLauncher, SIGNAL(bringToForegroundRequested(qint64)),
runControl(), SLOT(bringApplicationToForeground(qint64)));
m_applicationLauncher.setEnvironment(startParameters().environment);
m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);
@@ -638,6 +647,15 @@ void QmlEngine::disconnected()
notifyInferiorExited();
}
void QmlEngine::slotAddToOutputWindow(QString line, bool onStdErr)
{
emit runControl()->addToOutputWindowInline(runControl(), line, onStdErr);
}
void QmlEngine::slotMessage(QString err , bool isError)
{
emit runControl()->appendMessage(runControl(), err, isError);
}
} // namespace Internal
} // namespace Debugger