diff options
author | Denis Mingulov <denis@mingulov.com> | 2012-02-16 09:55:47 +0200 |
---|---|---|
committer | hjk <qthjk@ovi.com> | 2012-02-16 10:27:04 +0100 |
commit | 87b1dc25a1c67815f88041fbe57794e4099655e2 (patch) | |
tree | 4c42b5bf8c962d14b0fcfd9802c9ab354d0a9b52 /src/plugins/debugger/breakhandler.cpp | |
parent | d766c2e77342ea3a3f6cb8f999d66569bf299d4e (diff) | |
download | qt-creator-87b1dc25a1c67815f88041fbe57794e4099655e2.tar.gz |
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>
Diffstat (limited to 'src/plugins/debugger/breakhandler.cpp')
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 815424e5be..ccc367461a 100644 --- a/src/plugins/debugger/breakhandler.cpp +++ b/src/plugins/debugger/breakhandler.cpp @@ -92,7 +92,7 @@ static QString stateToString(BreakpointState state) static QString msgBreakpointAtSpecialFunc(const char *func) { - return BreakHandler::tr("Breakpoint at \"%1\"").arg(QString::fromAscii(func)); + return BreakHandler::tr("Breakpoint at \"%1\"").arg(QString::fromLatin1(func)); } static QString typeToString(BreakpointType type) @@ -578,7 +578,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const case 4: if (role == Qt::DisplayRole) if (res.address) - return QString::fromAscii("0x%1").arg(res.address, 0, 16); + return QString::fromLatin1("0x%1").arg(res.address, 0, 16); } return QVariant(); } @@ -646,7 +646,7 @@ QVariant BreakHandler::data(const QModelIndex &mi, int role) const if (role == Qt::DisplayRole) { const quint64 address = orig ? data.address : response.address; if (address) - return QString::fromAscii("0x%1").arg(address, 0, 16); + return QString::fromLatin1("0x%1").arg(address, 0, 16); return QVariant(); } break; |