From 9130cdfc05d52ba7924de8d32e2857287c75fee0 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 20 Jul 2015 14:23:54 +0200 Subject: 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 --- src/plugins/debugger/debuggerprotocol.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/plugins/debugger/debuggerprotocol.cpp') 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", ""); + } + case SpecialUninitializedValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", ""); + } + case SpecialInvalidValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", ""); + } + case SpecialNotAccessibleValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", ""); + } + case SpecialItemCountValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", "<%n items>", nullptr, ba.toInt()); + } + case SpecialMinimumItemCountValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", "", nullptr, ba.toInt()); + } + case SpecialNotCallableValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", ""); + } + case SpecialNullReferenceValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", ""); + } + case SpecialOptimizedOutValue: { + return QCoreApplication::translate("Debugger::Internal::WatchHandler", ""); + } + case SpecialEmptyStructureValue: { + return QLatin1String("{...}"); + } } qDebug() << "ENCODING ERROR: " << encoding; return QCoreApplication::translate("Debugger", ""); -- cgit v1.2.1