Debugger: Re-enable breakpoint state handling with keyboard

This patch re-enables disabling or enabling breakpoints using
the respective keyboard shortcut.
Had been disabled since d6911fd10c.

Change-Id: Iea3ce679bafcc78910be07984fd03b4a6e66eb8b
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2018-10-16 13:47:52 +02:00
parent 326adef0de
commit a2a29d1861
2 changed files with 11 additions and 11 deletions

View File

@@ -2565,17 +2565,17 @@ bool BreakpointManager::setData(const QModelIndex &idx, const QVariant &value, i
// setCurrentIndex(index(row, 0)); FIXME
return true;
}
// if (kev->key() == Qt::Key_Space) {
// const QModelIndexList selectedIds = ev.selectedRows();
// if (!selectedIds.isEmpty()) {
// const GlobalBreakpoints gbps = findBreakpointsByIndex(selectedIds);
// const bool isEnabled = gbps.isEmpty() || gbps.at(0)->isEnabled();
// for (GlobalBreakpoint gbp : gbps)
// gbp->m_parameters.enabled = isEnabled;
if (kev->key() == Qt::Key_Space) {
const QModelIndexList selectedIds = ev.selectedRows();
if (!selectedIds.isEmpty()) {
const GlobalBreakpoints gbps = findBreakpointsByIndex(selectedIds);
const bool isEnabled = gbps.isEmpty() || gbps.at(0)->isEnabled();
for (GlobalBreakpoint gbp : gbps)
gbp->setEnabled(!isEnabled);
// scheduleSynchronization();
// return true;
// }
// }
return true;
}
}
}
if (ev.as<QMouseEvent>(QEvent::MouseButtonDblClick)) {