From 726b907cc356995b7a9c28ee8dc8b2f2314e9103 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 7 Jun 2016 17:04:53 +0200 Subject: Debugger: Remove debuggerstringutils.h With QT_RESTRICTED_CAST_FROM_ASCII making GdbMi etc operate on QString is feasible again. Take this as opportunity to move debugger encoding handling closer to a 'conversion on input and output if needed, storage in QString only' scheme. Change-Id: I2f10c9fa8a6c62c44f4e6682efe3769e9fba30f7 Reviewed-by: Christian Stenger --- src/plugins/debugger/disassemblerlines.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/plugins/debugger/disassemblerlines.cpp') diff --git a/src/plugins/debugger/disassemblerlines.cpp b/src/plugins/debugger/disassemblerlines.cpp index 3e97b490a6..16fa277f76 100644 --- a/src/plugins/debugger/disassemblerlines.cpp +++ b/src/plugins/debugger/disassemblerlines.cpp @@ -25,7 +25,6 @@ #include "disassemblerlines.h" #include "debuggerengine.h" -#include "debuggerstringutils.h" #include "sourceutils.h" #include @@ -186,7 +185,7 @@ void DisassemblerLines::appendUnparsed(const QString &unparsed) QString function = address.mid(pos1, pos2 - pos1); if (function != m_lastFunction) { DisassemblerLine dl; - dl.data = _("Function: ") + function; + dl.data = "Function: " + function; m_data.append(dl); m_lastFunction = function; } @@ -214,25 +213,25 @@ void DisassemblerLines::appendUnparsed(const QString &unparsed) QString DisassemblerLine::toString(int maxOp) const { - const QString someSpace = _(" "); + const QString someSpace = " "; QString str; if (isAssembler()) { if (address) - str += _("0x%1 ").arg(address, 0, 16); + str += QString("0x%1 ").arg(address, 0, 16); if (offset) - str += _("<+0x%2> ").arg(offset, 4, 16, QLatin1Char('0')); + str += QString("<+0x%2> ").arg(offset, 4, 16, QLatin1Char('0')); else - str += _(" "); - str += _(" %1 ").arg(bytes); + str += " "; + str += QString(" %1 ").arg(bytes); str += QString(maxOp - bytes.size(), QLatin1Char(' ')); str += data; } else if (isCode()) { str += someSpace; str += QString::number(lineNumber); if (hunk) - str += _(" [%1]").arg(hunk); + str += QString(" [%1]").arg(hunk); else - str += _(" "); + str += " "; str += data; } else { str += someSpace; -- cgit v1.2.1