summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/debuggerprotocol.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-07-20 14:23:54 +0200
committerhjk <hjk@theqtcompany.com>2015-07-21 10:59:51 +0000
commit9130cdfc05d52ba7924de8d32e2857287c75fee0 (patch)
treedbbfdefb9b11332bfb8d2699576a3607641172b2 /src/plugins/debugger/debuggerprotocol.cpp
parent902db4fa289b8ce46485aecfaa059992f15f9973 (diff)
downloadqt-creator-9130cdfc05d52ba7924de8d32e2857287c75fee0.tar.gz
Debugger: Use special values for translatable strings
... when passing data from the dumpers to the GUI. This reduces the need to guess whether a value contains a translatable string. Change-Id: I5e2210b8d028bd71f0087a2ba5c7c5b04331b882 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/debuggerprotocol.cpp')
-rw-r--r--src/plugins/debugger/debuggerprotocol.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerprotocol.cpp b/src/plugins/debugger/debuggerprotocol.cpp
index 5be634c83f..824edc6473 100644
--- a/src/plugins/debugger/debuggerprotocol.cpp
+++ b/src/plugins/debugger/debuggerprotocol.cpp
@@ -728,6 +728,36 @@ QString decodeData(const QByteArray &ba, int encoding)
union { char c[8]; double d; } u = { { s[7], s[6], s[5], s[4], s[3], s[2], s[1], s[0] } };
return QString::number(u.d);
}
+ case SpecialEmptyValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<empty>");
+ }
+ case SpecialUninitializedValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<uninitialized>");
+ }
+ case SpecialInvalidValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<invalid>");
+ }
+ case SpecialNotAccessibleValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<not accessible>");
+ }
+ case SpecialItemCountValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<%n items>", nullptr, ba.toInt());
+ }
+ case SpecialMinimumItemCountValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<at least %n items>", nullptr, ba.toInt());
+ }
+ case SpecialNotCallableValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<not callable>");
+ }
+ case SpecialNullReferenceValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<null reference>");
+ }
+ case SpecialOptimizedOutValue: {
+ return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<optimized out>");
+ }
+ case SpecialEmptyStructureValue: {
+ return QLatin1String("{...}");
+ }
}
qDebug() << "ENCODING ERROR: " << encoding;
return QCoreApplication::translate("Debugger", "<Encoding error>");