JSDebugger: Enable break on events.

The user can request Javascript break on event. The user can provide
this info in the Breakpoints Window and provide the slot which will
be called when the event occurs. For example: specify "onTriggered" if
you need to break on Timer triggered event.

Change-Id: If936d7402f5978a182132fdcca75515588364e16
Reviewed-on: http://codereview.qt-project.org/4758
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2011-09-13 12:47:46 +02:00
parent 1285a63852
commit f05683ac7e
13 changed files with 76 additions and 27 deletions

View File

@@ -603,7 +603,18 @@ void QmlEngine::attemptBreakpointSynchronization()
bool QmlEngine::acceptsBreakpoint(BreakpointModelId id) const
{
return !DebuggerEngine::isCppBreakpoint(breakHandler()->breakpointData(id));
if (!DebuggerEngine::isCppBreakpoint(breakHandler()->breakpointData(id)))
return true;
//If it is a Cpp Breakpoint query if the type can be also handled by the debugger client
//TODO: enable setting of breakpoints before start of debug session
//For now, the event breakpoint can be set after the activeDebuggerClient is known
//This is because the older client does not support BreakpointOnSignalHandler
bool acceptBreakpoint = false;
if (d->m_adapter.activeDebuggerClient()) {
acceptBreakpoint = d->m_adapter.activeDebuggerClient()->acceptsBreakpoint(id);
}
return acceptBreakpoint;
}
void QmlEngine::loadSymbols(const QString &moduleName)