forked from qt-creator/qt-creator
Debugger: Disable inapplicable context menu entries for sub-breakpoints
Task-Number: QTCREATORBUG-9984 Change-Id: Id4197b8d0db917606eb0e2767d2b05195e6cfbcd Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
@@ -748,11 +748,14 @@ void BreakTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
selectedIndices.append(indexUnderMouse);
|
selectedIndices.append(indexUnderMouse);
|
||||||
|
|
||||||
BreakHandler *handler = breakHandler();
|
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();
|
const int rowCount = model()->rowCount();
|
||||||
QAction *deleteAction = new QAction(tr("Delete Breakpoint"), &menu);
|
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);
|
QAction *deleteAllAction = new QAction(tr("Delete All Breakpoints"), &menu);
|
||||||
deleteAllAction->setEnabled(model()->rowCount() > 0);
|
deleteAllAction->setEnabled(model()->rowCount() > 0);
|
||||||
|
|||||||
@@ -6767,8 +6767,15 @@ namespace sanity {
|
|||||||
} // namespace sanity
|
} // namespace sanity
|
||||||
|
|
||||||
|
|
||||||
|
template <class X> int ffff(X x)
|
||||||
|
{
|
||||||
|
return sizeof(x);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
int z = ffff(3) + ffff(2.0);
|
||||||
|
|
||||||
#if USE_GUILIB
|
#if USE_GUILIB
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user