From a92d6fbcd8403bf9fa9c2e1cd8be9f6769ef6e13 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Wed, 7 Oct 2009 14:29:55 +0200
Subject: [PATCH] debugger: disable l&w 'alternative formats' submenu if there
 aren't any alternatives.

---
 src/plugins/debugger/watchwindow.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index db3f33057b7..5cf8f4ff534 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -237,6 +237,10 @@ void WatchWindow::contextMenuEvent(QContextMenuEvent *ev)
             individualFormatMenu.addAction(act);
             individualFormatActions.append(act);
         }
+        if (alternativeFormats.isEmpty()) {
+            typeFormatMenu.setEnabled(false);
+            individualFormatMenu.setEnabled(false);
+        }
     } else {
         typeFormatMenu.setTitle(tr("Change format for type"));
         typeFormatMenu.setEnabled(false);
-- 
GitLab