Commit e84f7f33 authored by hjk's avatar hjk

Debugger: Disable inapplicable context menu entries for sub-breakpoints

Task-Number: QTCREATORBUG-9984

Change-Id: Id4197b8d0db917606eb0e2767d2b05195e6cfbcd
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent adc98176
......@@ -748,11 +748,14 @@ void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
selectedIndices.append(indexUnderMouse);
BreakHandler *handler = breakHandler();
BreakpointModelIds selectedIds = handler->findBreakpointsByIndex(selectedIndices);
BreakpointModelIds selectedIds;
foreach (BreakpointModelId id, handler->findBreakpointsByIndex(selectedIndices))
if (id.isMajor())
selectedIds.append(id);
const int rowCount = model()->rowCount();
QAction *deleteAction = new QAction(tr("Delete Breakpoint"), &menu);
deleteAction->setEnabled(!selectedIds.isEmpty());
deleteAction->setEnabled(!selectedIds.empty());
QAction *deleteAllAction = new QAction(tr("Delete All Breakpoints"), &menu);
deleteAllAction->setEnabled(model()->rowCount() > 0);
......
......@@ -6767,8 +6767,15 @@ namespace sanity {
} // namespace sanity
template <class X> int ffff(X x)
{
return sizeof(x);
}
int main(int argc, char *argv[])
{
int z = ffff(3) + ffff(2.0);
#if USE_GUILIB
QApplication app(argc, argv);
#else
......
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