QmlDebug: Parse application output to track debugees state

Setting up the debugger connection might fail for a couple of reasons.
Check the application output to show the user a more detailed error
message.

Reviewed-by: hjk
This commit is contained in:
Kai Koehne
2011-02-21 17:01:40 +01:00
parent fa6fbcc83b
commit 1a3ed101cb
7 changed files with 102 additions and 9 deletions

View File

@@ -36,6 +36,7 @@
#include "debuggercore.h"
#include "debuggerstartparameters.h"
#include "stackhandler.h"
#include "qmlengine.h"
#include <utils/qtcassert.h>
@@ -53,7 +54,7 @@ DebuggerEngine *createCdbEngine(const DebuggerStartParameters &,
DebuggerEngine *masterEngine, QString *);
DebuggerEngine *createGdbEngine(const DebuggerStartParameters &,
DebuggerEngine *masterEngine);
DebuggerEngine *createQmlEngine(const DebuggerStartParameters &,
QmlEngine *createQmlEngine(const DebuggerStartParameters &,
DebuggerEngine *masterEngine);
DebuggerEngine *createQmlCppEngine(const DebuggerStartParameters &sp)
@@ -88,7 +89,7 @@ private slots:
private:
friend class QmlCppEngine;
QmlCppEngine *q;
DebuggerEngine *m_qmlEngine;
QmlEngine *m_qmlEngine;
DebuggerEngine *m_cppEngine;
DebuggerEngine *m_activeEngine;
int m_stackBoundary;
@@ -664,6 +665,15 @@ void QmlCppEngine::handleRemoteSetupFailed(const QString &message)
d->m_cppEngine->handleRemoteSetupFailed(message);
}
void QmlCppEngine::showMessage(const QString &msg, int channel, int timeout) const
{
if (channel == AppOutput || channel == AppError) {
// message is from CppEngine, allow qml engine to process
d->m_qmlEngine->filterApplicationMessage(msg, channel);
}
DebuggerEngine::showMessage(msg, channel, timeout);
}
DebuggerEngine *QmlCppEngine::cppEngine() const
{
return d->m_cppEngine;