forked from qt-creator/qt-creator
Debugger: Disable L&E context submenu without useful contents
Task-number: QTCREATORBUG-14578 Change-Id: I6bc3b69601d8330ca2b267424260d48dd489a7e7 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
@@ -751,6 +751,8 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
QMenu formatMenu(tr("Change Local Display Format"));
|
QMenu formatMenu(tr("Change Local Display Format"));
|
||||||
if (mi0.isValid())
|
if (mi0.isValid())
|
||||||
fillFormatMenu(&formatMenu, mi0);
|
fillFormatMenu(&formatMenu, mi0);
|
||||||
|
else
|
||||||
|
formatMenu.setEnabled(false);
|
||||||
|
|
||||||
QMenu memoryMenu(tr("Open Memory Editor"));
|
QMenu memoryMenu(tr("Open Memory Editor"));
|
||||||
QAction actOpenMemoryEditAtObjectAddress(0);
|
QAction actOpenMemoryEditAtObjectAddress(0);
|
||||||
@@ -809,6 +811,9 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
|
|||||||
breakpointMenu.addAction(&actSetWatchpointAtObjectAddress);
|
breakpointMenu.addAction(&actSetWatchpointAtObjectAddress);
|
||||||
breakpointMenu.addAction(&actSetWatchpointAtPointerAddress);
|
breakpointMenu.addAction(&actSetWatchpointAtPointerAddress);
|
||||||
breakpointMenu.addAction(&actSetWatchpointAtExpression);
|
breakpointMenu.addAction(&actSetWatchpointAtExpression);
|
||||||
|
breakpointMenu.setEnabled(actSetWatchpointAtObjectAddress.isEnabled()
|
||||||
|
|| actSetWatchpointAtPointerAddress.isEnabled()
|
||||||
|
|| actSetWatchpointAtExpression.isEnabled());
|
||||||
|
|
||||||
QAction actCopy(tr("Copy View Contents to Clipboard"), 0);
|
QAction actCopy(tr("Copy View Contents to Clipboard"), 0);
|
||||||
QAction actCopyValue(tr("Copy Value to Clipboard"), 0);
|
QAction actCopyValue(tr("Copy Value to Clipboard"), 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user