From 88f3c894e457c60c01f3d1533f57b8c91e0c037f Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Wed, 8 Sep 2010 17:00:13 +0200
Subject: [PATCH] debugger: make some of the dumper generated static strings
 translatable

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

diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 9a062a420a1..13bdfb288a9 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -451,6 +451,21 @@ static inline QString formattedValue(const WatchData &data, int format)
     }
     QString result = data.value;
     result.replace(QLatin1Char('\n'), QLatin1String("\\n"));
+    if (result.startsWith(QLatin1Char('<'))) {
+        if (result == QLatin1String("<Edit>"))
+            result = WatchHandler::tr("<Edit>");
+        else if (result == QLatin1String("<empty>"))
+            result = WatchHandler::tr("<empty>");
+        else if (result == QLatin1String("<uninitialized>"))
+            result = WatchHandler::tr("<uninitialized>");
+        else if (result == QLatin1String("<invalid>"))
+            result = WatchHandler::tr("<invalid>");
+        else if (result == QLatin1String("<not accessible>"))
+            result = WatchHandler::tr("<not accessible>");
+        else if (result.endsWith(" items>"))
+            result = WatchHandler::tr("<%1 items>")
+                .arg(result.mid(1, result.indexOf(' ') - 1));
+    }
     return result;
 }
 
-- 
GitLab