From 33ec5eb246c8ca04ff82a45ff898e8c18939331d Mon Sep 17 00:00:00 2001
From: Kai Koehne <kai.koehne@nokia.com>
Date: Mon, 14 May 2012 11:21:01 +0200
Subject: [PATCH] Debugger: Rename actions dealing with watched expressions

Unify naming: Expressions are added/removed inside an "Expression Evaluator".

Task-number: QTCREATORBUG-7308
Change-Id: I47c8f7bee3673fe8378fab7977d8b57e5e4ad1c1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com>
---
 src/plugins/debugger/debuggerplugin.cpp |  4 ++--
 src/plugins/debugger/watchhandler.cpp   |  2 +-
 src/plugins/debugger/watchwindow.cpp    | 18 +++++++++---------
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index f1670ad6b7e..a2ad99e0a53 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -2996,10 +2996,10 @@ void DebuggerPluginPrivate::extensionsInitialized()
 
     act = m_breakAction = new QAction(tr("Toggle Breakpoint"), this);
 
-    act = m_watchAction1 = new QAction(tr("Add to Watch Window"), this);
+    act = m_watchAction1 = new QAction(tr("Add Expression Evaluator"), this);
     connect(act, SIGNAL(triggered()), SLOT(handleAddToWatchWindow()));
 
-    act = m_watchAction2 = new QAction(tr("Add to Watch Window"), this);
+    act = m_watchAction2 = new QAction(tr("Add Expression Evaluator"), this);
     connect(act, SIGNAL(triggered()), SLOT(handleAddToWatchWindow()));
 
     //m_snapshotAction = new QAction(tr("Create Snapshot"), this);
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 12f9a587440..9bc729f404a 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -166,7 +166,7 @@ WatchModel::WatchModel(WatchHandler *handler, WatchType type)
             break;
         case WatchersWatch:
             m_root->iname = "watch";
-            m_root->name = WatchHandler::tr("Watchers");
+            m_root->name = WatchHandler::tr("Expressions");
             break;
         case TooltipsWatch:
             m_root->iname = "tooltip";
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index a044d8f100b..9cb91ce7c0a 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -577,24 +577,24 @@ void WatchTreeView::mouseDoubleClickEvent(QMouseEvent *ev)
 static QString addWatchActionText(QString exp)
 {
     if (exp.isEmpty())
-        return WatchTreeView::tr("Evaluate Expression");
+        return WatchTreeView::tr("Add Expression Evaluator");
     if (exp.size() > 30) {
         exp.truncate(30);
         exp.append(QLatin1String("..."));
     }
-    return WatchTreeView::tr("Evaluate Expression \"%1\"").arg(exp);
+    return WatchTreeView::tr("Add Expression Evaluator for \"%1\"").arg(exp);
 }
 
 // Text for add watch action with truncated expression.
 static QString removeWatchActionText(QString exp)
 {
     if (exp.isEmpty())
-        return WatchTreeView::tr("Remove Evaluated Expression");
+        return WatchTreeView::tr("Remove Expression Evaluator");
     if (exp.size() > 30) {
         exp.truncate(30);
         exp.append(QLatin1String("..."));
     }
-    return WatchTreeView::tr("Remove Evaluated Expression \"%1\"").arg(exp);
+    return WatchTreeView::tr("Remove Expression Evaluator for \"%1\"").arg(exp);
 }
 
 static void copyToClipboard(const QString &clipboardText)
@@ -766,9 +766,9 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
 
     QMenu menu;
     QAction *actInsertNewWatchItem =
-        menu.addAction(tr("Insert New Evaluated Expression"));
+        menu.addAction(tr("Insert New Expression Evaluator"));
     actInsertNewWatchItem->setEnabled(canHandleWatches && canInsertWatches);
-    QAction *actSelectWidgetToWatch = menu.addAction(tr("Select Widget to Watch"));
+    QAction *actSelectWidgetToWatch = menu.addAction(tr("Select Widget to Add into Expression Evaluator"));
     actSelectWidgetToWatch->setEnabled(canHandleWatches
            && engine->hasCapability(WatchWidgetsCapability));
     QAction *actEditTypeFormats = menu.addAction(tr("Change Global Display Formats..."));
@@ -787,7 +787,7 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
     actRemoveWatchExpression->setEnabled(
         (canHandleWatches || state == DebuggerNotReady) && !exp.isEmpty());
     QAction *actRemoveWatches =
-        new QAction(tr("Remove All Evaluated Expressions"), &menu);
+        new QAction(tr("Remove All Expression Evaluators"), &menu);
     actRemoveWatches->setEnabled(!WatchHandler::watcherNames().isEmpty());
 
     if (m_type == LocalsType)
@@ -895,7 +895,7 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
         ;
     } else if (act == actInsertNewWatchItem) {
         bool ok;
-        QString newExp = QInputDialog::getText(this, tr("Enter watch expression"),
+        QString newExp = QInputDialog::getText(this, tr("Enter Expression for Evaluator"),
                                    tr("Expression:"), QLineEdit::Normal,
                                    QString(), &ok);
         if (ok && !newExp.isEmpty())
@@ -945,7 +945,7 @@ void WatchTreeView::contextMenuEvent(QContextMenuEvent *ev)
         setModelData(LocalsIndividualFormatRole, -1, mi1);
     } else if (act == actShowInEditor) {
         QString contents = handler->editorContents();
-        debuggerCore()->openTextEditor(tr("Locals & Watchers"), contents);
+        debuggerCore()->openTextEditor(tr("Locals & Expressions"), contents);
     } else if (act == showUnprintableUnicode) {
         handler->setUnprintableBase(0);
     } else if (act == showUnprintableEscape) {
-- 
GitLab