forked from qt-creator/qt-creator
Debugger: Fix crash toggling Stack/"Derefence Pointers" without project
Enable debugger actions correctly. Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -245,16 +245,15 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
}
|
||||
|
||||
QMenu menu;
|
||||
//QAction *actWatchExpressionInWindow
|
||||
// = theDebuggerAction(WatchExpressionInWindow);
|
||||
//menu.addAction(actWatchExpressionInWindow);
|
||||
|
||||
QAction *actInsertNewWatchItem = menu.addAction(tr("Insert new watch item"));
|
||||
QAction *actSelectWidgetToWatch = menu.addAction(tr("Select widget to watch"));
|
||||
|
||||
const QString address = model()->data(mi0, AddressRole).toString();
|
||||
QAction *actWatchKnownMemory = 0;
|
||||
QAction *actWatchUnknownMemory = new QAction(tr("Open memory editor..."), &menu);;
|
||||
QAction *actWatchUnknownMemory = new QAction(tr("Open memory editor..."), &menu);
|
||||
actWatchUnknownMemory->setEnabled(m_manager->debuggerActionsEnabled());
|
||||
|
||||
if (!address.isEmpty())
|
||||
actWatchKnownMemory = new QAction(tr("Open memory editor at %1").arg(address), &menu);
|
||||
menu.addSeparator();
|
||||
@@ -270,6 +269,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addAction(actWatchKnownMemory);
|
||||
menu.addAction(actWatchUnknownMemory);
|
||||
menu.addSeparator();
|
||||
|
||||
menu.addAction(theDebuggerAction(RecheckDebuggingHelpers));
|
||||
menu.addAction(theDebuggerAction(UseDebuggingHelpers));
|
||||
|
||||
@@ -277,8 +277,7 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
|
||||
menu.addAction(theDebuggerAction(UseToolTipsInLocalsView));
|
||||
|
||||
menu.addAction(theDebuggerAction(AutoDerefPointers));
|
||||
theDebuggerAction(AutoDerefPointers)->
|
||||
setEnabled(m_manager->currentEngine()->isGdbEngine());
|
||||
|
||||
QAction *actAdjustColumnWidths =
|
||||
menu.addAction(tr("Adjust column widths to contents"));
|
||||
QAction *actAlwaysAdjustColumnWidth =
|
||||
|
||||
Reference in New Issue
Block a user