From 1fb8f60e03a267941822eb96ab8e6faedc6036f1 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 7 Oct 2009 13:36:48 +0200 Subject: Debugger: Fix crash toggling Stack/"Derefence Pointers" without project Enable debugger actions correctly. Reviewed-by: hjk --- src/plugins/debugger/moduleswindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/plugins/debugger/moduleswindow.cpp') diff --git a/src/plugins/debugger/moduleswindow.cpp b/src/plugins/debugger/moduleswindow.cpp index f5d48db088..6d46dda03c 100644 --- a/src/plugins/debugger/moduleswindow.cpp +++ b/src/plugins/debugger/moduleswindow.cpp @@ -105,11 +105,15 @@ void ModulesWindow::contextMenuEvent(QContextMenuEvent *ev) if (index.isValid()) name = model()->data(index).toString(); + QMenu menu; + const bool enabled = Debugger::DebuggerManager::instance()->debuggerActionsEnabled(); QAction *act0 = new QAction(tr("Update module list"), &menu); - QAction *act3 = new QAction(tr("Show source files for module \"%1\"").arg(name), - &menu); + act0->setEnabled(enabled); + QAction *act3 = new QAction(tr("Show source files for module \"%1\"").arg(name), &menu); + act3->setEnabled(enabled); QAction *act4 = new QAction(tr("Load symbols for all modules"), &menu); + act4->setEnabled(enabled); QAction *act5 = 0; QAction *act6 = 0; QAction *act7 = 0; -- cgit v1.2.1