debugger: split BreakpointIndex into plugin and debugger specific part

Change-Id: I21d10cf42eb039c74475e106537b6e107d155196
Reviewed-on: http://codereview.qt.nokia.com/745
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-06-24 16:25:30 +02:00
committed by hjk
parent c4713f5ab2
commit c041286753
34 changed files with 563 additions and 456 deletions

View File

@@ -329,13 +329,13 @@ void PdbEngine::selectThread(int index)
Q_UNUSED(index)
}
bool PdbEngine::acceptsBreakpoint(BreakpointId id) const
bool PdbEngine::acceptsBreakpoint(BreakpointModelId id) const
{
const QString fileName = breakHandler()->fileName(id);
return fileName.endsWith(QLatin1String(".py"));
}
void PdbEngine::insertBreakpoint(BreakpointId id)
void PdbEngine::insertBreakpoint(BreakpointModelId id)
{
BreakHandler *handler = breakHandler();
QTC_ASSERT(handler->state(id) == BreakpointInsertRequested, /**/);
@@ -355,7 +355,7 @@ void PdbEngine::handleBreakInsert(const PdbResponse &response)
{
//qDebug() << "BP RESPONSE: " << response.data;
// "Breakpoint 1 at /pdb/math.py:10"
BreakpointId id(response.cookie.toInt());
BreakpointModelId id(response.cookie.toInt());
BreakHandler *handler = breakHandler();
QTC_ASSERT(response.data.startsWith("Breakpoint "), return);
int pos1 = response.data.indexOf(" at ");
@@ -365,13 +365,13 @@ void PdbEngine::handleBreakInsert(const PdbResponse &response)
QByteArray file = response.data.mid(pos1 + 4, pos2 - pos1 - 4);
QByteArray line = response.data.mid(pos2 + 1);
BreakpointResponse br;
br.id = BreakpointId(bpnr);
br.id = BreakpointResponseId(bpnr);
br.fileName = _(file);
br.lineNumber = line.toInt();
handler->setResponse(id, br);
}
void PdbEngine::removeBreakpoint(BreakpointId id)
void PdbEngine::removeBreakpoint(BreakpointModelId id)
{
BreakHandler *handler = breakHandler();
QTC_ASSERT(handler->state(id) == BreakpointRemoveRequested, /**/);