From b2f4679c208427a35bea0583622bc5cefcde6e6d Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Wed, 16 May 2012 12:31:07 +0200
Subject: [PATCH] Debugger: Remove 'Change Global Display Formats...'

Remove 'Change Global Display Formats...' from the Locals & Expressions
context menu. The dialog only works right now if one is currently debugging,
changes are not stored across runs ...

Change-Id: I7d16a7f8eaa9990e5fe1d7148022aa3db2c0fd05
Reviewed-by: hjk <qthjk@ovi.com>
---
 src/plugins/debugger/watchwindow.cpp | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 6db85de55fa..e0082b4867f 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -765,11 +765,11 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
     QAction *actInsertNewWatchItem =
         menu.addAction(tr("Insert New Expression Evaluator"));
     actInsertNewWatchItem->setEnabled(canHandleWatches && canInsertWatches);
-    QAction *actSelectWidgetToWatch = menu.addAction(tr("Select Widget to Add into Expression Evaluator"));
+    QAction *actSelectWidgetToWatch =
+        menu.addAction(tr("Select Widget to Add into Expression Evaluator"));
     actSelectWidgetToWatch->setEnabled(canHandleWatches && canInsertWatches
-                                       && engine->hasCapability(WatchWidgetsCapability));
-    QAction *actEditTypeFormats = menu.addAction(tr("Change Global Display Formats..."));
-    actEditTypeFormats->setEnabled(true);
+           && engine->hasCapability(WatchWidgetsCapability));
+
     menu.addSeparator();
 
     QAction *actWatchExpression = new QAction(addWatchActionText(exp), &menu);
@@ -858,7 +858,6 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
 
     menu.addAction(actInsertNewWatchItem);
     menu.addAction(actSelectWidgetToWatch);
-    menu.addAction(actEditTypeFormats);
     menu.addMenu(&formatMenu);
     menu.addMenu(&memoryMenu);
     menu.addMenu(&breakpointMenu);
@@ -927,8 +926,6 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
         handler->removeData(p.data(LocalsINameRole).toByteArray());
     } else if (act == actCopy) {
         copyToClipboard(DebuggerToolTipWidget::treeModelClipboardContents(model()));
-    } else if (act == actEditTypeFormats) {
-        handler->editTypeFormats(true, mi0.data(LocalsINameRole).toByteArray());
     } else if (act == actCopyValue) {
         copyToClipboard(mi1.data().toString());
     } else if (act == actRemoveWatches) {
-- 
GitLab