Commit aa69b190 authored by Nikolai Kosjar's avatar Nikolai Kosjar Committed by hjk

Debugger: Enable/Disable breakpoints with Space

Change-Id: I0eaee9589d9299c2238e2e29ab11a18d579de7dc
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 420eefd8
......@@ -705,6 +705,18 @@ void BreakTreeView::keyPressEvent(QKeyEvent *ev)
int row = qMin(model()->rowCount() - ids.size() - 1, currentIndex().row());
deleteBreakpoints(ids);
setCurrentIndex(si.at(0).sibling(row, 0));
} else if (ev->key() == Qt::Key_Space) {
QItemSelectionModel *sm = selectionModel();
QTC_ASSERT(sm, return);
const QModelIndexList selectedIds = sm->selectedIndexes();
if (!selectedIds.isEmpty()) {
BreakHandler *handler = breakHandler();
const BreakpointModelIds validIds = handler->findBreakpointsByIndex(selectedIds);
const bool isEnabled = validIds.isEmpty() || handler->isEnabled(validIds.at(0));
setBreakpointsEnabled(validIds, !isEnabled);
foreach (const QModelIndex &id, selectedIds)
update(id);
}
}
QTreeView::keyPressEvent(ev);
}
......
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