Commit 6b8b2e63 authored by Aurindam Jana's avatar Aurindam Jana

Refactoring v8debuggerclient and scriptdebuggerclient

Change-Id: Ifa2e9a9901a166907bd7c3999421146b07bd1c59
Reviewed-on: http://codereview.qt.nokia.com/3328Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarChristiaan Janssen <christiaan.janssen@nokia.com>
parent 2b84f9f3
......@@ -65,9 +65,9 @@ public:
virtual void activateFrame(int index) = 0;
virtual void insertBreakpoint(BreakpointModelId id, BreakHandler *handler) = 0;
virtual void removeBreakpoint(BreakpointModelId id, BreakHandler *handler) = 0;
virtual void changeBreakpoint(BreakpointModelId id, BreakHandler *handler) = 0;
virtual void insertBreakpoint(BreakpointModelId id) = 0;
virtual void removeBreakpoint(BreakpointModelId id) = 0;
virtual void changeBreakpoint(BreakpointModelId id) = 0;
virtual void updateBreakpoints() = 0;
virtual void assignValueInDebugger(const QByteArray expr, const quint64 &id,
......
......@@ -502,10 +502,10 @@ void QmlEngine::insertBreakpoint(BreakpointModelId id)
handler->notifyBreakpointInsertProceeding(id);
if (d->m_adapter.activeDebuggerClient()) {
d->m_adapter.activeDebuggerClient()->insertBreakpoint(id,handler);
d->m_adapter.activeDebuggerClient()->insertBreakpoint(id);
} else {
foreach (QmlDebuggerClient *client, d->m_adapter.debuggerClients()) {
client->insertBreakpoint(id,handler);
client->insertBreakpoint(id);
}
}
......@@ -522,10 +522,10 @@ void QmlEngine::removeBreakpoint(BreakpointModelId id)
handler->notifyBreakpointRemoveProceeding(id);
if (d->m_adapter.activeDebuggerClient()) {
d->m_adapter.activeDebuggerClient()->removeBreakpoint(id,handler);
d->m_adapter.activeDebuggerClient()->removeBreakpoint(id);
} else {
foreach (QmlDebuggerClient *client, d->m_adapter.debuggerClients()) {
client->removeBreakpoint(id,handler);
client->removeBreakpoint(id);
}
}
......@@ -542,10 +542,10 @@ void QmlEngine::changeBreakpoint(BreakpointModelId id)
handler->notifyBreakpointChangeProceeding(id);
if (d->m_adapter.activeDebuggerClient()) {
d->m_adapter.activeDebuggerClient()->changeBreakpoint(id,handler);
d->m_adapter.activeDebuggerClient()->changeBreakpoint(id);
} else {
foreach (QmlDebuggerClient *client, d->m_adapter.debuggerClients()) {
client->changeBreakpoint(id,handler);
client->changeBreakpoint(id);
}
}
......
......@@ -221,8 +221,9 @@ void QmlV8DebuggerClient::activateFrame(int index)
setLocals(index);
}
void QmlV8DebuggerClient::insertBreakpoint(BreakpointModelId id, BreakHandler *handler)
void QmlV8DebuggerClient::insertBreakpoint(BreakpointModelId id)
{
BreakHandler *handler = d->engine->breakHandler();
QByteArray request;
JsonInputStream(request) << '{' << INITIALPARAMS ;
......@@ -243,7 +244,7 @@ void QmlV8DebuggerClient::insertBreakpoint(BreakpointModelId id, BreakHandler *h
sendMessage(packMessage(request));
}
void QmlV8DebuggerClient::removeBreakpoint(BreakpointModelId id, BreakHandler * /*handler*/)
void QmlV8DebuggerClient::removeBreakpoint(BreakpointModelId id)
{
QList<int> breakpoints = d->breakpoints.values(id);
d->breakpoints.remove(id);
......@@ -264,7 +265,7 @@ void QmlV8DebuggerClient::removeBreakpoint(BreakpointModelId id, BreakHandler *
}
}
void QmlV8DebuggerClient::changeBreakpoint(BreakpointModelId /*id*/, BreakHandler * /*handler*/)
void QmlV8DebuggerClient::changeBreakpoint(BreakpointModelId /*id*/)
{
}
......
......@@ -65,9 +65,9 @@ public:
void activateFrame(int index);
void insertBreakpoint(BreakpointModelId id, BreakHandler *handler);
void removeBreakpoint(BreakpointModelId id, BreakHandler *handler);
void changeBreakpoint(BreakpointModelId id, BreakHandler *handler);
void insertBreakpoint(BreakpointModelId id);
void removeBreakpoint(BreakpointModelId id);
void changeBreakpoint(BreakpointModelId id);
void updateBreakpoints();
void assignValueInDebugger(const QByteArray expr, const quint64 &id,
......
......@@ -210,8 +210,9 @@ void QScriptDebuggerClient::activateFrame(int index)
sendMessage(reply);
}
void QScriptDebuggerClient::insertBreakpoint(BreakpointModelId id, BreakHandler *handler)
void QScriptDebuggerClient::insertBreakpoint(BreakpointModelId id)
{
BreakHandler *handler = d->engine->breakHandler();
JSAgentBreakpointData bp;
bp.fileUrl = QUrl::fromLocalFile(handler->fileName(id)).toString().toUtf8();
bp.lineNumber = handler->lineNumber(id);
......@@ -219,8 +220,9 @@ void QScriptDebuggerClient::insertBreakpoint(BreakpointModelId id, BreakHandler
d->breakpoints.insert(bp);
}
void QScriptDebuggerClient::removeBreakpoint(BreakpointModelId id, BreakHandler *handler)
void QScriptDebuggerClient::removeBreakpoint(BreakpointModelId id)
{
BreakHandler *handler = d->engine->breakHandler();
JSAgentBreakpointData bp;
bp.fileUrl = QUrl::fromLocalFile(handler->fileName(id)).toString().toUtf8();
bp.lineNumber = handler->lineNumber(id);
......@@ -228,7 +230,7 @@ void QScriptDebuggerClient::removeBreakpoint(BreakpointModelId id, BreakHandler
d->breakpoints.remove(bp);
}
void QScriptDebuggerClient::changeBreakpoint(BreakpointModelId /*id*/, BreakHandler * /*handler*/)
void QScriptDebuggerClient::changeBreakpoint(BreakpointModelId /*id*/)
{
}
......
......@@ -64,9 +64,9 @@ public:
void activateFrame(int index);
void insertBreakpoint(BreakpointModelId id, BreakHandler *handler);
void removeBreakpoint(BreakpointModelId id, BreakHandler *handler);
void changeBreakpoint(BreakpointModelId id, BreakHandler *handler);
void insertBreakpoint(BreakpointModelId id);
void removeBreakpoint(BreakpointModelId id);
void changeBreakpoint(BreakpointModelId id);
void updateBreakpoints();
void assignValueInDebugger(const QByteArray expr, const quint64 &id,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment