Commit af46c3d9 authored by Olivier Goffart's avatar Olivier Goffart
Browse files

qml debugger: make the application output work

parent d0f794b6
...@@ -326,7 +326,7 @@ protected: ...@@ -326,7 +326,7 @@ protected:
void setState(DebuggerState state, bool forced = false); void setState(DebuggerState state, bool forced = false);
void setRunInWrapperEngine(bool value); void setRunInWrapperEngine(bool value);
private: protected:
DebuggerRunControl *runControl() const; DebuggerRunControl *runControl() const;
private: private:
......
...@@ -47,6 +47,7 @@ class DebuggerStartParameters; ...@@ -47,6 +47,7 @@ class DebuggerStartParameters;
namespace Internal { namespace Internal {
class DebuggerEngine; class DebuggerEngine;
class QmlEngine;
} }
//DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &); //DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &);
...@@ -136,6 +137,7 @@ private: ...@@ -136,6 +137,7 @@ private:
DebuggerEngineType m_enabledEngines; DebuggerEngineType m_enabledEngines;
QString m_errorMessage; QString m_errorMessage;
QString m_settingsIdHint; QString m_settingsIdHint;
friend class Internal::QmlEngine;
}; };
} // namespace Debugger } // namespace Debugger
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "debuggerdialogs.h" #include "debuggerdialogs.h"
#include "debuggerstringutils.h" #include "debuggerstringutils.h"
#include "debuggeruiswitcher.h" #include "debuggeruiswitcher.h"
#include "debuggerrunner.h"
#include "breakhandler.h" #include "breakhandler.h"
#include "moduleshandler.h" #include "moduleshandler.h"
...@@ -129,7 +130,15 @@ void QmlEngine::setupInferior() ...@@ -129,7 +130,15 @@ void QmlEngine::setupInferior()
{ {
QTC_ASSERT(state() == InferiorSetupRequested, qDebug() << state()); 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.setEnvironment(startParameters().environment);
m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory); m_applicationLauncher.setWorkingDirectory(startParameters().workingDirectory);
...@@ -638,6 +647,15 @@ void QmlEngine::disconnected() ...@@ -638,6 +647,15 @@ void QmlEngine::disconnected()
notifyInferiorExited(); 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 Internal
} // namespace Debugger } // namespace Debugger
......
...@@ -123,6 +123,8 @@ private slots: ...@@ -123,6 +123,8 @@ private slots:
void connectionStartupFailed(); void connectionStartupFailed();
void connectionError(); void connectionError();
void slotMessage(QString, bool);
void slotAddToOutputWindow(QString, bool);
private: private:
void expandObject(const QByteArray &iname, quint64 objectId); void expandObject(const QByteArray &iname, quint64 objectId);
void sendPing(); void sendPing();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment