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 <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-06-07 17:04:53 +02:00
parent 3333352e3b
commit 726b907cc3
67 changed files with 1993 additions and 2168 deletions

View File

@@ -25,7 +25,6 @@
#include "disassemblerlines.h"
#include "debuggerengine.h"
#include "debuggerstringutils.h"
#include "sourceutils.h"
#include <QDebug>
@@ -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;