Changed the behaviour of setting breakpoints in qml files.

Delegates setting of breakpoints to functions that set/reset/change the breakpoint one at a time.
Change-Id: I553a74b05cf19c9d2436344db67bc962da18457f
Reviewed-on: http://codereview.qt.nokia.com/3082
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
This commit is contained in:
Aurindam Jana
2011-08-17 11:47:42 +02:00
parent 2f92eae7bc
commit 1b2f1f102e
7 changed files with 142 additions and 82 deletions

View File

@@ -202,21 +202,29 @@ void QScriptDebuggerClient::activateFrame(int index)
sendMessage(reply);
}
void QScriptDebuggerClient::insertBreakpoints(BreakHandler *handler, BreakpointModelId *id)
void QScriptDebuggerClient::insertBreakpoint(BreakpointModelId id, BreakHandler *handler)
{
JSAgentBreakpointData bp;
bp.fileUrl = QUrl::fromLocalFile(handler->fileName(*id)).toString().toUtf8();
bp.lineNumber = handler->lineNumber(*id);
bp.functionName = handler->functionName(*id).toUtf8();
bp.fileUrl = QUrl::fromLocalFile(handler->fileName(id)).toString().toUtf8();
bp.lineNumber = handler->lineNumber(id);
bp.functionName = handler->functionName(id).toUtf8();
d->breakpoints.insert(bp);
}
void QScriptDebuggerClient::removeBreakpoints(BreakpointModelId * /*id*/)
void QScriptDebuggerClient::removeBreakpoint(BreakpointModelId id, BreakHandler *handler)
{
JSAgentBreakpointData bp;
bp.fileUrl = QUrl::fromLocalFile(handler->fileName(id)).toString().toUtf8();
bp.lineNumber = handler->lineNumber(id);
bp.functionName = handler->functionName(id).toUtf8();
d->breakpoints.remove(bp);
}
void QScriptDebuggerClient::setBreakpoints()
void QScriptDebuggerClient::changeBreakpoint(BreakpointModelId /*id*/, BreakHandler * /*handler*/)
{
}
void QScriptDebuggerClient::updateBreakpoints()
{
QByteArray reply;
QDataStream rs(&reply, QIODevice::WriteOnly);
@@ -224,8 +232,6 @@ void QScriptDebuggerClient::setBreakpoints()
rs << cmd
<< d->breakpoints;
sendMessage(reply);
d->breakpoints.clear();
}
void QScriptDebuggerClient::assignValueInDebugger(const QByteArray expr, const quint64 &id,