forked from qt-creator/qt-creator
Debugger: use QString::fromLatin1 instead of QString::fromAscii
By source - latin1 is really expected as there is no any check or usage of QTextCodec::setCodecForCStrings() currently. QString::fromAscii() might break 'Latin1' input in some cases. A quote from documentation about QString::fromAscii(): "Note that, despite the name, this function actually uses the codec defined by QTextCodec::setCodecForCStrings() to convert str to Unicode. Depending on the codec, it may not accept valid US-ASCII (ANSI X3.4-1986) input. If no codec has been set, this function does the same as fromLatin1()." Change-Id: I49cf047ca674d2ec621b517c635d1927bb2e796f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -311,7 +311,7 @@ Threads ThreadsHandler::parseGdbmiThreads(const GdbMi &data, int *currentThread)
|
||||
const GdbMi frame = item.findChild("frame");
|
||||
ThreadData thread;
|
||||
thread.id = item.findChild("id").data().toInt();
|
||||
thread.targetId = QString::fromAscii(item.findChild("target-id").data());
|
||||
thread.targetId = QString::fromLatin1(item.findChild("target-id").data());
|
||||
thread.core = QString::fromLatin1(item.findChild("core").data());
|
||||
thread.state = QString::fromLatin1(item.findChild("state").data());
|
||||
thread.address = frame.findChild("addr").data().toULongLong(&ok, 0);
|
||||
|
||||
Reference in New Issue
Block a user