forked from qt-creator/qt-creator
Debugger: Fix auto test and dumper for unusual strings
This handles embedded NUL and other unprintable contents. Change-Id: Iabd59935eca83bc14b000ebb1e8901983530a3d6 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -501,7 +501,7 @@ QString decodeData(const QByteArray &ba, int encoding)
|
||||
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;
|
||||
return doubleQuote + QString::fromLatin1(decodedBa, decodedBa.size()) + doubleQuote;
|
||||
}
|
||||
case Hex4EncodedLittleEndianWithQuotes: { // 7, %04x encoded 16 bit data
|
||||
const QChar doubleQuote(QLatin1Char('"'));
|
||||
|
||||
Reference in New Issue
Block a user