summaryrefslogtreecommitdiffstats
path: root/src/scripttools/debugging
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-08 14:03:05 +0200
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-08 14:13:41 +0200
commitb8e6f86ed8b27504f22da2167cb6aa9ecf829a71 (patch)
tree578a2e351a8a3b03329efe84d640487d635535c9 /src/scripttools/debugging
parent89982a2c1678f2c42c9abf1021b35ed45004278c (diff)
QScriptDebuggerBackend crash fix.
QScriptDebuggerBackend::contextCount() method was trying to count number of context push & pop and result was not equal to elements count in QScriptDebuggerBackend::contextIds() list. Patch change QScriptDebuggerBackend::contextCount() to call count() on ids list. Task-number: 260719 Reviewed-by: Kent Hansen
Diffstat (limited to 'src/scripttools/debugging')
-rw-r--r--src/scripttools/debugging/qscriptdebuggerbackend.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/scripttools/debugging/qscriptdebuggerbackend.cpp b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
index 2efff0428f..feaea63b2b 100644
--- a/src/scripttools/debugging/qscriptdebuggerbackend.cpp
+++ b/src/scripttools/debugging/qscriptdebuggerbackend.cpp
@@ -805,13 +805,7 @@ int QScriptDebuggerBackend::contextCount() const
{
if (!engine())
return 0;
- int count = 0;
- QScriptContext *ctx = engine()->currentContext();
- while (ctx) {
- ++count;
- ctx = ctx->parentContext();
- }
- return count;
+ return contextIds().count();
}
/*!