summaryrefslogtreecommitdiffstats
path: root/src/scripttools
diff options
context:
space:
mode:
authorJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-08 12:03:05 (GMT)
committerJedrzej Nowacki <jedrzej.nowacki@nokia.com>2009-09-08 12:13:41 (GMT)
commitb8e6f86ed8b27504f22da2167cb6aa9ecf829a71 (patch)
tree578a2e351a8a3b03329efe84d640487d635535c9 /src/scripttools
parent89982a2c1678f2c42c9abf1021b35ed45004278c (diff)
downloadQt-b8e6f86ed8b27504f22da2167cb6aa9ecf829a71.zip
Qt-b8e6f86ed8b27504f22da2167cb6aa9ecf829a71.tar.gz
Qt-b8e6f86ed8b27504f22da2167cb6aa9ecf829a71.tar.bz2
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')
-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 2efff04..feaea63 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();
}
/*!