summaryrefslogtreecommitdiffstats
path: root/src/scripttools
diff options
context:
space:
mode:
authorKent Hansen <khansen@trolltech.com>2009-06-17 11:17:16 (GMT)
committerKent Hansen <khansen@trolltech.com>2009-06-17 11:17:16 (GMT)
commitf136f7410a30b090646a58c1791e15adfa18de85 (patch)
tree823e5adc4ee03eaf65aa10d26b60fd9d2665ffff /src/scripttools
parente97b1187391e16208a2da0e4c7f9e6daa540aa93 (diff)
downloadQt-f136f7410a30b090646a58c1791e15adfa18de85.zip
Qt-f136f7410a30b090646a58c1791e15adfa18de85.tar.gz
Qt-f136f7410a30b090646a58c1791e15adfa18de85.tar.bz2
fix the QScriptEngineDebugger::state() logic, add test, improve docs
Diffstat (limited to 'src/scripttools')
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index ae58c89..f2245cc 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -126,7 +126,7 @@ public:
mode in which it accepts input from the user. The
evaluationResumed() signal is emitted when script evaluation is
resumed, i.e, when execution control is given back to the script
- engine.
+ engine. The state() function returns the debugger's current state.
When calling QScriptEngine::evaluate() it is useful to pass a
descriptive script name (file name) as second argument, as this is
@@ -228,6 +228,7 @@ public:
/*!
\enum QScriptEngineDebugger::DebuggerState
+ \since 4.6
This enum specifies the current state of the debugger.
@@ -396,6 +397,8 @@ void QScriptEngineDebugger::detach()
}
/*!
+ \since 4.6
+
Returns the current state of the debugger.
\sa evaluationResumed()
@@ -404,7 +407,7 @@ void QScriptEngineDebugger::detach()
QScriptEngineDebugger::DebuggerState QScriptEngineDebugger::state() const
{
Q_D(const QScriptEngineDebugger);
- return (d->debugger && d->debugger->isInteractive() ? SuspendedState : RunningState);
+ return !d->debugger || !d->debugger->isInteractive() ? SuspendedState : RunningState;
}
/*!