diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/qml/qmlobserver/jsdebuggeragent.cpp | 18 | ||||
-rw-r--r-- | src/tools/qml/qmlobserver/jsdebuggeragent.h | 4 |
2 files changed, 18 insertions, 4 deletions
diff --git a/src/tools/qml/qmlobserver/jsdebuggeragent.cpp b/src/tools/qml/qmlobserver/jsdebuggeragent.cpp index 0eb01c21b1..29c3d40031 100644 --- a/src/tools/qml/qmlobserver/jsdebuggeragent.cpp +++ b/src/tools/qml/qmlobserver/jsdebuggeragent.cpp @@ -273,13 +273,11 @@ void JSDebuggerAgent::positionChange(qint64 scriptId, } } - switch (state) { case NoState: case Stopped: // Do nothing break; - case SteppingOutState: if (stepDepth >= 0) break; @@ -318,6 +316,22 @@ void JSDebuggerAgent::exceptionCatch(qint64 scriptId, Q_UNUSED(exception); } +bool JSDebuggerAgent::supportsExtension(QScriptEngineAgent::Extension extension) const +{ + return extension == QScriptEngineAgent::DebuggerInvocationRequest; +} + +QVariant JSDebuggerAgent::extension(QScriptEngineAgent::Extension extension, const QVariant& argument) +{ + if (extension == QScriptEngineAgent::DebuggerInvocationRequest) { + stopped(); + return QVariant(); + } + return QScriptEngineAgent::extension(extension, argument); +} + + + void JSDebuggerAgent::messageReceived(const QByteArray& message) { QDataStream ds(message); diff --git a/src/tools/qml/qmlobserver/jsdebuggeragent.h b/src/tools/qml/qmlobserver/jsdebuggeragent.h index acd7b18c92..0618dcc055 100644 --- a/src/tools/qml/qmlobserver/jsdebuggeragent.h +++ b/src/tools/qml/qmlobserver/jsdebuggeragent.h @@ -93,9 +93,9 @@ public: void exceptionCatch(qint64 scriptId, const QScriptValue &exception); -/* bool supportsExtension(Extension extension) const; + bool supportsExtension(Extension extension) const; QVariant extension(Extension extension, - const QVariant &argument = QVariant());*/ + const QVariant &argument = QVariant()); void messageReceived(const QByteArray &); void enabledChanged(bool); |