aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/watchhandler.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2010-09-08 17:00:13 +0200
committerhjk <[email protected]>2010-09-08 17:01:47 +0200
commit88f3c894e457c60c01f3d1533f57b8c91e0c037f (patch)
tree2c6c68f4d284a85eba7b135411c3e170b1e4c1fb /src/plugins/debugger/watchhandler.cpp
parent1c702357a6617ce2fac1ecb4c4dab7d639a76bbf (diff)
debugger: make some of the dumper generated static strings translatable
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r--src/plugins/debugger/watchhandler.cpp15
1 files changed, 15 insertions, 0 deletions
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;
}