diff --git a/src/plugins/debugger/debuggerengine.h b/src/plugins/debugger/debuggerengine.h index 4c041f9262be9a893750ed95001fe5da8c8814dd..ab30b99fb2ef027208e989e6ecd862db62938c6b 100644 --- a/src/plugins/debugger/debuggerengine.h +++ b/src/plugins/debugger/debuggerengine.h @@ -326,7 +326,7 @@ protected: void setState(DebuggerState state, bool forced = false); void setRunInWrapperEngine(bool value); -private: +protected: DebuggerRunControl *runControl() const; private: diff --git a/src/plugins/debugger/debuggerrunner.h b/src/plugins/debugger/debuggerrunner.h index a369efb937facff0257ca2a4eaefddcd766e3b35..724ba495c0c749384ef759a2f13977c3b86d61c3 100644 --- a/src/plugins/debugger/debuggerrunner.h +++ b/src/plugins/debugger/debuggerrunner.h @@ -47,6 +47,7 @@ class DebuggerStartParameters; namespace Internal { class DebuggerEngine; +class QmlEngine; } //DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &); @@ -136,6 +137,7 @@ private: DebuggerEngineType m_enabledEngines; QString m_errorMessage; QString m_settingsIdHint; + friend class Internal::QmlEngine; }; } // namespace Debugger diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index f0b3577213b4cecd931f030c4fbeee70bdd9a405..6eeb9aa0465bfce6be8b4102bcd8514a777f76d4 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -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 diff --git a/src/plugins/debugger/qml/qmlengine.h b/src/plugins/debugger/qml/qmlengine.h index 2a25a0e6ce9683cdb7443b281f8c72768ecac10b..81e98774369947aa68c548f4a37e81cf06286724 100644 --- a/src/plugins/debugger/qml/qmlengine.h +++ b/src/plugins/debugger/qml/qmlengine.h @@ -123,6 +123,8 @@ private slots: void connectionStartupFailed(); void connectionError(); + void slotMessage(QString, bool); + void slotAddToOutputWindow(QString, bool); private: void expandObject(const QByteArray &iname, quint64 objectId); void sendPing();