Commit 46d9f8e2 authored by hjk's avatar hjk

debugger: fix regression in QVariant dumper

backport from master
parent 126cbbde
...@@ -2248,7 +2248,7 @@ static void qDumpQVariant(QDumper &d) ...@@ -2248,7 +2248,7 @@ static void qDumpQVariant(QDumper &d)
if (isInvalid) { if (isInvalid) {
P(d, "value", "(invalid)"); P(d, "value", "(invalid)");
} else if (value.isEmpty()) { } else if (value.isEmpty()) {
P(d, "value", "(" << v.typeName() << ") " << qPrintable(value)); P(d, "value", "(" << v.typeName() << ") ");
} else { } else {
QByteArray ba; QByteArray ba;
ba += '('; ba += '(';
...@@ -2256,7 +2256,7 @@ static void qDumpQVariant(QDumper &d) ...@@ -2256,7 +2256,7 @@ static void qDumpQVariant(QDumper &d)
ba += ") "; ba += ") ";
ba += qPrintable(value); ba += qPrintable(value);
P(d, "value", ba); P(d, "value", ba);
P(d, "valueencoded", "4"); P(d, "valueencoded", "5");
} }
P(d, "type", NS"QVariant"); P(d, "type", NS"QVariant");
P(d, "numchild", (isInvalid ? "0" : "1")); P(d, "numchild", (isInvalid ? "0" : "1"));
......
...@@ -376,6 +376,9 @@ QString decodeData(const QByteArray &ba, int encoding) ...@@ -376,6 +376,9 @@ QString decodeData(const QByteArray &ba, int encoding)
const QByteArray decodedBa = QByteArray::fromBase64(ba); const QByteArray decodedBa = QByteArray::fromBase64(ba);
return QString::fromUtf16(reinterpret_cast<const ushort *>(decodedBa.data()), decodedBa.size() / 2); return QString::fromUtf16(reinterpret_cast<const ushort *>(decodedBa.data()), decodedBa.size() / 2);
} }
case 5: { // base64 encoded 8 bit data, without quotes (see 1)
return quoteUnprintableLatin1(QByteArray::fromBase64(ba));
}
} }
return QCoreApplication::translate("Debugger", "<Encoding error>"); return QCoreApplication::translate("Debugger", "<Encoding error>");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment