diff options
author | Kai Koehne <kai.koehne@nokia.com> | 2011-06-08 09:01:26 (GMT) |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2011-06-08 10:09:11 (GMT) |
commit | c038e3505309bb954123493cb5f96c73e114f3d0 (patch) | |
tree | 78d957fb4d1c88284b95d15dd1b46823b4a69010 /src/declarative/debugger/qjsdebuggeragent.cpp | |
parent | 7602be09663d37f01cfd640a7f1be959ce4317b7 (diff) | |
download | Qt-c038e3505309bb954123493cb5f96c73e114f3d0.zip Qt-c038e3505309bb954123493cb5f96c73e114f3d0.tar.gz Qt-c038e3505309bb954123493cb5f96c73e114f3d0.tar.bz2 |
QDeclarativeDebug: Fix QJSDebugService if launched with ',block'
If the debugger is launched in blocking mode the service will be enabled
from the start.
Reviewed-by: Thorbjorn Lindeijer
Diffstat (limited to 'src/declarative/debugger/qjsdebuggeragent.cpp')
-rw-r--r-- | src/declarative/debugger/qjsdebuggeragent.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/declarative/debugger/qjsdebuggeragent.cpp b/src/declarative/debugger/qjsdebuggeragent.cpp index 9b76592..dff637b 100644 --- a/src/declarative/debugger/qjsdebuggeragent.cpp +++ b/src/declarative/debugger/qjsdebuggeragent.cpp @@ -56,7 +56,7 @@ class QJSDebuggerAgentPrivate { public: QJSDebuggerAgentPrivate(QJSDebuggerAgent *q) - : q(q), state(NoState) + : q(q), state(NoState), isInitialized(false) {} void continueExec(); @@ -79,6 +79,7 @@ public: QHash<QString, JSAgentBreakpointData> fileNameToBreakpoints; QStringList watchExpressions; QSet<qint64> knownObjectIds; + bool isInitialized; }; namespace { @@ -252,6 +253,14 @@ QJSDebuggerAgent::~QJSDebuggerAgent() delete d; } +/*! + Indicates whether the agent got the list of breakpoints. + */ +bool QJSDebuggerAgent::isInitialized() const +{ + return d->isInitialized; +} + void QJSDebuggerAgent::setBreakpoints(const JSAgentBreakpoints &breakpoints) { d->breakpoints = breakpoints; @@ -259,6 +268,8 @@ void QJSDebuggerAgent::setBreakpoints(const JSAgentBreakpoints &breakpoints) d->fileNameToBreakpoints.clear(); foreach (const JSAgentBreakpointData &bp, breakpoints) d->fileNameToBreakpoints.insertMulti(fileName(QString::fromUtf8(bp.fileUrl)), bp); + + d->isInitialized = true; } void QJSDebuggerAgent::setWatchExpressions(const QStringList &watchExpressions) |