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:
Denis Mingulov
2012-02-16 09:55:47 +02:00
committed by hjk
parent d766c2e773
commit 87b1dc25a1
19 changed files with 51 additions and 51 deletions

View File

@@ -379,10 +379,10 @@ QString WatchData::toToolTip() const
}
formatToolTipRow(str, tr("Value"), val);
formatToolTipRow(str, tr("Object Address"),
QString::fromAscii(hexAddress()));
QString::fromLatin1(hexAddress()));
if (referencingAddress)
formatToolTipRow(str, tr("Referencing Address"),
QString::fromAscii(hexReferencingAddress()));
QString::fromLatin1(hexReferencingAddress()));
if (size)
formatToolTipRow(str, tr("Size"), QString::number(size));
formatToolTipRow(str, tr("Internal ID"), QLatin1String(iname));