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:
Friedemann Kleint
2009-10-07 13:36:48 +02:00
parent e2e9c77323
commit 1fb8f60e03
9 changed files with 62 additions and 10 deletions

View File

@@ -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 =