OSDN Git Service

Name watchutils encoding types consistently.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Mon, 8 Aug 2011 13:03:34 +0000 (15:03 +0200)
committerhjk <qthjk@ovi.com>
Wed, 10 Aug 2011 15:29:57 +0000 (17:29 +0200)
Change-Id: I26d92ffc6fdbe67bf0cbbb0dde40211330ef8e34
Reviewed-on: http://codereview.qt.nokia.com/2748
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: hjk <qthjk@ovi.com>
src/plugins/debugger/watchutils.cpp
src/plugins/debugger/watchutils.h

index 04e3782..eba19b3 100644 (file)
@@ -556,24 +556,24 @@ QString decodeData(const QByteArray &ba, int encoding)
         case Base64Encoded8Bit: { // 5, without quotes (see 1)
             return quoteUnprintableLatin1(QByteArray::fromBase64(ba));
         }
-        case Hex2EncodedLatin1: { // 6, %02x encoded 8 bit Latin1 data
+        case Hex2EncodedLatin1WithQuotes: { // 6, %02x encoded 8 bit Latin1 data
             const QChar doubleQuote(QLatin1Char('"'));
             const QByteArray decodedBa = QByteArray::fromHex(ba);
             return doubleQuote + QString::fromLatin1(decodedBa) + doubleQuote;
         }
-        case Hex4EncodedLittleEndian: { // 7, %04x encoded 16 bit data
+        case Hex4EncodedLittleEndianWithQuotes: { // 7, %04x encoded 16 bit data
             const QChar doubleQuote(QLatin1Char('"'));
             const QByteArray decodedBa = QByteArray::fromHex(ba);
             return doubleQuote + QString::fromUtf16(reinterpret_cast<const ushort *>
                 (decodedBa.data()), decodedBa.size() / 2) + doubleQuote;
         }
-        case Hex8EncodedLittleEndian: { // 8, %08x encoded 32 bit data
+        case Hex8EncodedLittleEndianWithQuotes: { // 8, %08x encoded 32 bit data
             const QChar doubleQuote(QLatin1Char('"'));
             const QByteArray decodedBa = QByteArray::fromHex(ba);
             return doubleQuote + QString::fromUcs4(reinterpret_cast<const uint *>
                 (decodedBa.data()), decodedBa.size() / 4) + doubleQuote;
         }
-        case Hex2EncodedUtf8: { // 9, %02x encoded 8 bit UTF-8 data
+        case Hex2EncodedUtf8WithQuotes: { // 9, %02x encoded 8 bit UTF-8 data
             const QChar doubleQuote(QLatin1Char('"'));
             const QByteArray decodedBa = QByteArray::fromHex(ba);
             return doubleQuote + QString::fromUtf8(decodedBa) + doubleQuote;
@@ -592,7 +592,7 @@ QString decodeData(const QByteArray &ba, int encoding)
             return doubleQuote + QString::fromUcs4(reinterpret_cast<const uint *>
                 (decodedBa.data()), decodedBa.size() / 4) + doubleQuote;
         }
-        case Hex4EncodedBigEndian: { // 11, %04x encoded 16 bit data
+        case Hex4EncodedBigEndianWithQuotes: { // 11, %04x encoded 16 bit data
             const QChar doubleQuote(QLatin1Char('"'));
             QByteArray decodedBa = QByteArray::fromHex(ba);
             for (int i = 0; i < decodedBa.size(); i += 2) {
@@ -608,7 +608,7 @@ QString decodeData(const QByteArray &ba, int encoding)
             return QString::fromUtf16(reinterpret_cast<const ushort *>
                 (decodedBa.data()), decodedBa.size() / 2);
         }
-        case Hex2EncodedLocal8Bit: { // 13, %02x encoded 8 bit UTF-8 data
+        case Hex2EncodedLocal8BitWithQuotes: { // 13, %02x encoded 8 bit UTF-8 data
             const QChar doubleQuote(QLatin1Char('"'));
             const QByteArray decodedBa = QByteArray::fromHex(ba);
             return doubleQuote + QString::fromLocal8Bit(decodedBa) + doubleQuote;
index 360d69c..e485cf5 100644 (file)
@@ -62,14 +62,14 @@ enum DebuggerEncoding
     Base64Encoded32BitWithQuotes         =  3,
     Base64Encoded16Bit                   =  4,
     Base64Encoded8Bit                    =  5,
-    Hex2EncodedLatin1                    =  6,
-    Hex4EncodedLittleEndian              =  7,
-    Hex8EncodedLittleEndian              =  8,
-    Hex2EncodedUtf8                      =  9,
+    Hex2EncodedLatin1WithQuotes          =  6,
+    Hex4EncodedLittleEndianWithQuotes    =  7,
+    Hex8EncodedLittleEndianWithQuotes    =  8,
+    Hex2EncodedUtf8WithQuotes            =  9,
     Hex8EncodedBigEndian                 = 10,
-    Hex4EncodedBigEndian                 = 11,
+    Hex4EncodedBigEndianWithQuotes       = 11,
     Hex4EncodedLittleEndianWithoutQuotes = 12,
-    Hex2EncodedLocal8Bit                 = 13
+    Hex2EncodedLocal8BitWithQuotes       = 13
 };
 
 bool isEditorDebuggable(Core::IEditor *editor);