Commit 720a86c9 authored by Olivier Goffart's avatar Olivier Goffart

Compilation fixes with the QStringBuilder changes in Qt master

QStringBuilder also works with QByteArray now.
Which means some of the implicit conversions do not work anymore
parent 03e5c10a
......@@ -724,7 +724,7 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
arguments << QLatin1String("-lines") << QLatin1String("-G")
// register idle (debuggee stop) notification
<< QLatin1String("-c")
<< QString::fromAscii(".idle_cmd " + m_extensionCommandPrefixBA + "idle");
<< QLatin1String(".idle_cmd ") + QString::fromAscii(m_extensionCommandPrefixBA) + QLatin1String("idle");
if (sp.useTerminal) // Separate console
arguments << QLatin1String("-2");
if (!m_options->symbolPaths.isEmpty())
......
......@@ -433,7 +433,7 @@ void CodaGdbAdapter::readGdbServerCommand()
logMessage("gdb: -> " + currentTime() + ' ' + QString::fromAscii(packet));
if (packet != m_gdbReadBuffer)
logMessage("buffer: " + m_gdbReadBuffer);
logMessage(_("buffer: ") + m_gdbReadBuffer);
QByteArray &ba = m_gdbReadBuffer;
while (ba.size()) {
......@@ -926,7 +926,7 @@ void CodaGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
CodaCallback(this, &CodaGdbAdapter::handleAndReportSetBreakpoint),
bp);
} else {
logMessage("MISPARSED BREAKPOINT '" + cmd + "'')" , LogError);
logMessage(_("MISPARSED BREAKPOINT '") + cmd + "'')" , LogError);
}
}
......
......@@ -3922,7 +3922,7 @@ void GdbEngine::handleWatchPoint(const GdbResponse &response)
const QByteArray addr = ba.mid(pos0x);
if (addr.toULongLong(0, 0)) { // Non-null pointer
const QByteArray ns = qtNamespace();
const QByteArray type = ns.isEmpty() ? "QWidget*" : ("'" + ns + "QWidget'*");
const QByteArray type = ns.isEmpty() ? "QWidget*" : QByteArray("'" + ns + "QWidget'*");
const QString exp = _("(*(struct %1)%2)").arg(_(type)).arg(_(addr));
// qDebug() << posNs << posWidget << pos0x << addr << ns << type;
watchHandler()->watchExpression(exp);
......
......@@ -214,8 +214,8 @@ QByteArray TrkGdbAdapter::trkStepRangeMessage()
if (from <= pc && pc <= to) {
//to = qMax(to - 4, from);
//to = qMax(to - 4, from);
showMessage("STEP IN " + hexxNumber(from) + ' ' + hexxNumber(to)
+ " INSTEAD OF " + hexxNumber(pc));
showMessage(_("STEP IN ") + hexxNumber(from) + ' ' + hexxNumber(to)
+ _(" INSTEAD OF ") + hexxNumber(pc));
} else {
from = pc;
to = pc;
......@@ -301,7 +301,7 @@ void TrkGdbAdapter::readGdbServerCommand()
logMessage("gdb: -> " + currentTime() + ' ' + QString::fromAscii(packet));
if (packet != m_gdbReadBuffer)
logMessage("buffer: " + m_gdbReadBuffer);
logMessage(QLatin1String("buffer: ") + m_gdbReadBuffer);
QByteArray &ba = m_gdbReadBuffer;
while (ba.size()) {
......@@ -781,7 +781,7 @@ void TrkGdbAdapter::handleGdbServerCommand(const QByteArray &cmd)
const QByteArray ba = trkBreakpointMessage(addrLen.first, addrLen.second, armMode);
sendTrkMessage(0x1B, TrkCB(handleAndReportSetBreakpoint), ba, QVariant(addrLen.first));
} else {
logMessage("MISPARSED BREAKPOINT '" + cmd + "')", LogError);
logMessage(QLatin1String("MISPARSED BREAKPOINT '") + cmd + "')", LogError);
}
}
......@@ -1015,14 +1015,14 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
case TrkNotifyException: { // 0x91 Notify Exception (obsolete)
showMessage(_("RESET SNAPSHOT (NOTIFY EXCEPTION)"));
m_snapshot.reset();
logMessage(prefix + "NOTE: EXCEPTION " + str, AppError);
logMessage(prefix + _("NOTE: EXCEPTION ") + str, AppError);
sendTrkAck(result.token);
break;
}
case 0x92: { //
showMessage(_("RESET SNAPSHOT (NOTIFY INTERNAL ERROR)"));
m_snapshot.reset();
logMessage(prefix + "NOTE: INTERNAL ERROR: " + str, LogError);
logMessage(prefix + _("NOTE: INTERNAL ERROR: ") + str, LogError);
sendTrkAck(result.token);
break;
}
......@@ -1105,22 +1105,22 @@ void TrkGdbAdapter::handleTrkResult(const TrkResult &result)
break;
}
case 0xa2: { // NotifyProcessorStarted
logMessage(prefix + "NOTE: PROCESSOR STARTED: " + str);
logMessage(prefix + _("NOTE: PROCESSOR STARTED: ") + str);
sendTrkAck(result.token);
break;
}
case 0xa6: { // NotifyProcessorStandby
logMessage(prefix + "NOTE: PROCESSOR STANDBY: " + str);
logMessage(prefix + _("NOTE: PROCESSOR STANDBY: ") + str);
sendTrkAck(result.token);
break;
}
case 0xa7: { // NotifyProcessorReset
logMessage(prefix + "NOTE: PROCESSOR RESET: " + str);
logMessage(prefix + _("NOTE: PROCESSOR RESET: ") + str);
sendTrkAck(result.token);
break;
}
default: {
logMessage(prefix + "INVALID: " + str, LogError);
logMessage(prefix + _("INVALID: ") + str, LogError);
break;
}
}
......@@ -1133,8 +1133,8 @@ void TrkGdbAdapter::handleCpuType(const TrkResult &result)
// Error: 0x00
// [80 03 00 04 00 00 04 00 00 00]
if (result.data.size() < 7) {
logMessage("ERROR: CPUTYPE RESULT " + result.errorString()
+ " NOT PARSABLE", LogError);
logMessage(_("ERROR: CPUTYPE RESULT ") + result.errorString()
+ _(" NOT PARSABLE"), LogError);
return;
}
m_session.cpuMajor = result.data[1];
......@@ -1250,7 +1250,7 @@ static QString msgMemoryReadError(int code, uint addr, uint len = 0)
void TrkGdbAdapter::handleReadMemoryBuffered(const TrkResult &result)
{
if (extractShort(result.data.data() + 1) + 3 != result.data.size())
logMessage("\n BAD MEMORY RESULT: " + result.data.toHex() + '\n', LogError);
logMessage(_("\n BAD MEMORY RESULT: ") + result.data.toHex() + '\n', LogError);
const MemoryRange range = result.cookie.value<MemoryRange>();
MEMORY_DEBUG("HANDLE READ MEMORY ***BUFFERED*** FOR " << range);
if (const int errorCode = result.errorCode()) {
......@@ -1270,7 +1270,7 @@ void TrkGdbAdapter::handleReadMemoryBuffered(const TrkResult &result)
void TrkGdbAdapter::handleReadMemoryUnbuffered(const TrkResult &result)
{
if (extractShort(result.data.data() + 1) + 3 != result.data.size())
logMessage("\n BAD MEMORY RESULT: " + result.data.toHex() + '\n', LogError);
logMessage(_("\n BAD MEMORY RESULT: ") + result.data.toHex() + '\n', LogError);
const MemoryRange range = result.cookie.value<MemoryRange>();
MEMORY_DEBUG("HANDLE READ MEMORY UNBUFFERED FOR " << range);
if (const int errorCode = result.errorCode()) {
......@@ -1451,7 +1451,7 @@ void TrkGdbAdapter::handleSupportMask(const TrkResult &result)
if (data[i] & (1 << j))
str.append(QByteArray::number(i * 8 + j, 16));
}
logMessage("SUPPORTED: " + str);
logMessage(_("SUPPORTED: ") + str);
}
void TrkGdbAdapter::handleTrkVersionsStartGdb(const TrkResult &result)
......@@ -1776,7 +1776,7 @@ void TrkGdbAdapter::handleDirectWrite1(const TrkResult &response)
} else {
oldMem = response.data.mid(3);
oldPC = m_snapshot.registerValue(m_session.tid, RegisterPC);
logMessage("READ MEM: " + oldMem.toHex());
logMessage(_("READ MEM: ") + oldMem.toHex());
//qDebug("READ MEM: " + oldMem.toHex());
QByteArray ba;
appendByte(&ba, 0xaa);
......
......@@ -447,9 +447,9 @@ void Launcher::handleResult(const TrkResult &result)
case TrkNotifyAck:
break;
case TrkNotifyNak: { // NAK
logMessage(prefix + "NAK: " + str);
logMessage(prefix + QLatin1String("NAK: ") + str);
//logMessage(prefix << "TOKEN: " << result.token);
logMessage(prefix + "ERROR: " + errorMessage(result.data.at(0)));
logMessage(prefix + QLatin1String("ERROR: ") + errorMessage(result.data.at(0)));
break;
}
case TrkNotifyStopped: { // Notified Stopped
......@@ -464,12 +464,12 @@ void Launcher::handleResult(const TrkResult &result)
break;
}
case TrkNotifyException: { // Notify Exception (obsolete)
logMessage(prefix + "NOTE: EXCEPTION " + str);
logMessage(prefix + QLatin1String("NOTE: EXCEPTION ") + str);
d->m_device->sendTrkAck(result.token);
break;
}
case TrkNotifyInternalError: { //
logMessage(prefix + "NOTE: INTERNAL ERROR: " + str);
logMessage(prefix + QLatin1String("NOTE: INTERNAL ERROR: ") + str);
d->m_device->sendTrkAck(result.token);
break;
}
......@@ -528,22 +528,22 @@ void Launcher::handleResult(const TrkResult &result)
break;
}
case TrkNotifyProcessorStarted: { // NotifyProcessorStarted
logMessage(prefix + "NOTE: PROCESSOR STARTED: " + str);
logMessage(prefix + QLatin1String("NOTE: PROCESSOR STARTED: ") + str);
d->m_device->sendTrkAck(result.token);
break;
}
case TrkNotifyProcessorStandBy: { // NotifyProcessorStandby
logMessage(prefix + "NOTE: PROCESSOR STANDBY: " + str);
logMessage(prefix + QLatin1String("NOTE: PROCESSOR STANDBY: ") + str);
d->m_device->sendTrkAck(result.token);
break;
}
case TrkNotifyProcessorReset: { // NotifyProcessorReset
logMessage(prefix + "NOTE: PROCESSOR RESET: " + str);
logMessage(prefix + QLatin1String("NOTE: PROCESSOR RESET: ") + str);
d->m_device->sendTrkAck(result.token);
break;
}
default: {
logMessage(prefix + "INVALID: " + str);
logMessage(prefix + QLatin1String("INVALID: ") + str);
break;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment