forked from qt-creator/qt-creator
debugger: re-enable "Delete all breakpoints" etc
This commit is contained in:
@@ -352,6 +352,14 @@ BreakpointId BreakHandler::findBreakpointByIndex(const QModelIndex &index) const
|
|||||||
return BreakpointId(-1);
|
return BreakpointId(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BreakpointIds BreakHandler::findBreakpointsByIndex(const QList<QModelIndex> &list) const
|
||||||
|
{
|
||||||
|
BreakpointIds ids;
|
||||||
|
foreach (const QModelIndex &index, list)
|
||||||
|
ids.append(findBreakpointByIndex(index));
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
QVariant BreakHandler::data(const QModelIndex &mi, int role) const
|
||||||
{
|
{
|
||||||
static const QString empty = QString(QLatin1Char('-'));
|
static const QString empty = QString(QLatin1Char('-'));
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ public:
|
|||||||
BreakpointId findWatchpointByAddress(quint64 address) const;
|
BreakpointId findWatchpointByAddress(quint64 address) const;
|
||||||
BreakpointId findBreakpointByFunction(const QString &functionName) const;
|
BreakpointId findBreakpointByFunction(const QString &functionName) const;
|
||||||
BreakpointId findBreakpointByIndex(const QModelIndex &index) const;
|
BreakpointId findBreakpointByIndex(const QModelIndex &index) const;
|
||||||
|
BreakpointIds findBreakpointsByIndex(const QList<QModelIndex> &list) const;
|
||||||
void setWatchpointByAddress(quint64 address);
|
void setWatchpointByAddress(quint64 address);
|
||||||
bool hasWatchpointAt(quint64 address) const;
|
bool hasWatchpointAt(quint64 address) const;
|
||||||
void updateMarkers();
|
void updateMarkers();
|
||||||
|
|||||||
@@ -379,22 +379,22 @@ void BreakWindow::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
void BreakWindow::setBreakpointsEnabled(const QModelIndexList &list, bool enabled)
|
void BreakWindow::setBreakpointsEnabled(const QModelIndexList &list, bool enabled)
|
||||||
{
|
{
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
foreach (const QModelIndex &index, list)
|
foreach (const BreakpointId id, handler->findBreakpointsByIndex(list))
|
||||||
handler->setEnabled(handler->findBreakpointByIndex(index), enabled);
|
handler->setEnabled(id, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BreakWindow::setBreakpointsFullPath(const QModelIndexList &list, bool fullpath)
|
void BreakWindow::setBreakpointsFullPath(const QModelIndexList &list, bool fullpath)
|
||||||
{
|
{
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
foreach (const QModelIndex &index, list)
|
foreach (const BreakpointId id, handler->findBreakpointsByIndex(list))
|
||||||
handler->setUseFullPath(handler->findBreakpointByIndex(index), fullpath);
|
handler->setUseFullPath(id, fullpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BreakWindow::deleteBreakpoints(const QModelIndexList &list)
|
void BreakWindow::deleteBreakpoints(const QModelIndexList &list)
|
||||||
{
|
{
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
foreach (const QModelIndex &index, list)
|
foreach (const BreakpointId id, handler->findBreakpointsByIndex(list))
|
||||||
handler->removeBreakpoint(handler->findBreakpointByIndex(index));
|
handler->removeBreakpoint(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BreakWindow::editBreakpoint(BreakpointId id, QWidget *parent)
|
void BreakWindow::editBreakpoint(BreakpointId id, QWidget *parent)
|
||||||
@@ -416,7 +416,8 @@ void BreakWindow::editBreakpoints(const QModelIndexList &list)
|
|||||||
QTC_ASSERT(!list.isEmpty(), return);
|
QTC_ASSERT(!list.isEmpty(), return);
|
||||||
|
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
const BreakpointId id = handler->findBreakpointByIndex(list.at(0));
|
const BreakpointIds ids = handler->findBreakpointsByIndex(list);
|
||||||
|
const BreakpointId id = ids.at(0);
|
||||||
|
|
||||||
if (list.size() == 1) {
|
if (list.size() == 1) {
|
||||||
editBreakpoint(id, this);
|
editBreakpoint(id, this);
|
||||||
@@ -451,8 +452,7 @@ void BreakWindow::editBreakpoints(const QModelIndexList &list)
|
|||||||
&& newThreadSpec == oldThreadSpec)
|
&& newThreadSpec == oldThreadSpec)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (const QModelIndex &idx, list) {
|
foreach (const BreakpointId id, handler->findBreakpointsByIndex(list)) {
|
||||||
BreakpointId id = handler->findBreakpointByIndex(idx);
|
|
||||||
handler->setCondition(id, newCondition.toLatin1());
|
handler->setCondition(id, newCondition.toLatin1());
|
||||||
handler->setIgnoreCount(id, newIgnoreCount.toInt());
|
handler->setIgnoreCount(id, newIgnoreCount.toInt());
|
||||||
handler->setThreadSpec(id, newThreadSpec.toLatin1());
|
handler->setThreadSpec(id, newThreadSpec.toLatin1());
|
||||||
@@ -463,8 +463,8 @@ void BreakWindow::associateBreakpoint(const QModelIndexList &list, int threadId)
|
|||||||
{
|
{
|
||||||
BreakHandler *handler = breakHandler();
|
BreakHandler *handler = breakHandler();
|
||||||
QByteArray spec = QByteArray::number(threadId);
|
QByteArray spec = QByteArray::number(threadId);
|
||||||
foreach (const QModelIndex &index, list)
|
foreach (const BreakpointId id, handler->findBreakpointsByIndex(list))
|
||||||
handler->setThreadSpec(handler->findBreakpointByIndex(index), spec);
|
handler->setThreadSpec(id, spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BreakWindow::resizeColumnsToContents()
|
void BreakWindow::resizeColumnsToContents()
|
||||||
|
|||||||
Reference in New Issue
Block a user