Convert some TRACE() messages to avoid FTBFS with clang. This resolves issue #13.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 2fa7734055)
r14.0.x
Michele Calgaro 2 years ago
parent de6788920b
commit 5daa9bc059
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -130,8 +130,7 @@ CmdQueueItem* DebuggerDriver::executeCmdString(DbgCommand cmd,
m_state = DSinterrupted; m_state = DSinterrupted;
kill(SIGINT); kill(SIGINT);
ASSERT(m_activeCmd != 0); ASSERT(m_activeCmd != 0);
TRACE(TQString().sprintf("interrupted the command %d", TRACE(TQString("interrupted the command %1").arg((m_activeCmd ? m_activeCmd->m_cmd : -1)));
(m_activeCmd ? m_activeCmd->m_cmd : -1)));
delete m_activeCmd; delete m_activeCmd;
m_activeCmd = 0; m_activeCmd = 0;
} }

@ -2175,8 +2175,7 @@ void KDebugger::slotValueEdited(VarTree* expr, const TQString& text)
return; /* no text entered: ignore request */ return; /* no text entered: ignore request */
ExprWnd* wnd = static_cast<ExprWnd*>(expr->listView()); ExprWnd* wnd = static_cast<ExprWnd*>(expr->listView());
TRACE(TQString().sprintf("Changing %s to ", TRACE(TQString("Changing %1 to ").arg(wnd->name()) + text);
wnd->name()) + text);
// determine the lvalue to edit // determine the lvalue to edit
TQString lvalue = expr->computeExpr(); TQString lvalue = expr->computeExpr();

@ -902,7 +902,7 @@ static ExprValue* parseVar(const char*& s)
while (isspace(*p)) while (isspace(*p))
p++; p++;
if (*p != '=') { if (*p != '=') {
TRACE(TQString().sprintf("parse error: = not found after %s", name)); TRACE(TQString("parse error: = not found after %1").arg(name));
return 0; return 0;
} }
// skip the '=' and more whitespace // skip the '=' and more whitespace
@ -941,7 +941,7 @@ static void skipNested(const char*& s, char opening, char closing)
p++; p++;
} }
if (nest != 0) { if (nest != 0) {
TRACE(TQString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s)); TRACE(TQString("parse error: mismatching %1%2 at %3").arg(opening).arg(closing).arg(s));
} }
s = p; s = p;
} }
@ -984,7 +984,7 @@ static void skipNestedAngles(const char*& s)
p++; p++;
} }
if (nest != 0) { if (nest != 0) {
TRACE(TQString().sprintf("parse error: mismatching <> at %-20.20s", s)); TRACE(TQString("parse error: mismatching <> at %1").arg(s));
} }
s = p; s = p;
} }
@ -1100,7 +1100,7 @@ static void skipNestedWithString(const char*& s, char opening, char closing)
p++; p++;
} }
if (nest > 0) { if (nest > 0) {
TRACE(TQString().sprintf("parse error: mismatching %c%c at %-20.20s", opening, closing, s)); TRACE(TQString("parse error: mismatching %1%2 at %3").arg(opening).arg(closing).arg(s));
} }
s = p; s = p;
} }
@ -1132,7 +1132,7 @@ static bool parseName(const char*& s, TQString& name, VarTree::NameKind& kind)
// name, which might be "static"; allow dot for "_vtbl." // name, which might be "static"; allow dot for "_vtbl."
skipName(p); skipName(p);
if (p == s) { if (p == s) {
TRACE(TQString().sprintf("parse error: not a name %-20.20s", s)); TRACE(TQString("parse error: not a name %1").arg(s));
return false; return false;
} }
int len = p - s; int len = p - s;
@ -1145,7 +1145,7 @@ static bool parseName(const char*& s, TQString& name, VarTree::NameKind& kind)
s = p; s = p;
skipName(p); skipName(p);
if (p == s) { if (p == s) {
TRACE(TQString().sprintf("parse error: not a name after static %-20.20s", s)); TRACE(TQString("parse error: not a name after static %1").arg(s));
return false; return false;
} }
len = p - s; len = p - s;
@ -1477,7 +1477,7 @@ static bool parseValueSeq(const char*& s, ExprValue* variable)
delete var; delete var;
return false; return false;
} }
TRACE(TQString().sprintf("found <repeats %d times> in array", l)); TRACE(TQString("found <repeats %1 times> in array").arg(l));
// replace name and advance index // replace name and advance index
name.sprintf("[%d .. %d]", index, index+l-1); name.sprintf("[%d .. %d]", index, index+l-1);
var->m_name = name; var->m_name = name;

@ -251,7 +251,7 @@ void SourceWindow::updateLineItems(const KDebugger* dbg)
if (m_lineItems[i] & liBPany) { if (m_lineItems[i] & liBPany) {
// check if this breakpoint still exists // check if this breakpoint still exists
int line = rowToLine(i); int line = rowToLine(i);
TRACE(TQString().sprintf("checking for bp at %d", line)); TRACE(TQString("checking for bp at %1").arg(line));
KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); KDebugger::BrkptROIterator bp = dbg->breakpointsBegin();
for (; bp != dbg->breakpointsEnd(); ++bp) for (; bp != dbg->breakpointsEnd(); ++bp)
{ {
@ -275,7 +275,7 @@ void SourceWindow::updateLineItems(const KDebugger* dbg)
for (KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); bp != dbg->breakpointsEnd(); ++bp) for (KDebugger::BrkptROIterator bp = dbg->breakpointsBegin(); bp != dbg->breakpointsEnd(); ++bp)
{ {
if (fileNameMatches(bp->fileName)) { if (fileNameMatches(bp->fileName)) {
TRACE(TQString().sprintf("updating %s:%d", bp->fileName, bp->lineNo)); TRACE(TQString("updating %1:%2").arg(bp->fileName).arg(bp->lineNo));
int i = bp->lineNo; int i = bp->lineNo;
if (i < 0 || i >= int(m_sourceCode.size())) if (i < 0 || i >= int(m_sourceCode.size()))
continue; continue;
@ -370,12 +370,12 @@ void SourceWindow::mousePressEvent(TQMouseEvent* ev)
switch (ev->button()) { switch (ev->button()) {
case LeftButton: case LeftButton:
TRACE(TQString().sprintf("left-clicked line %d", line)); TRACE(TQString("left-clicked line %1").arg(line));
emit clickedLeft(m_fileName, line, address, emit clickedLeft(m_fileName, line, address,
(ev->state() & ShiftButton) != 0); (ev->state() & ShiftButton) != 0);
break; break;
case MidButton: case MidButton:
TRACE(TQString().sprintf("mid-clicked row %d", line)); TRACE(TQString("mid-clicked row %1").arg(line));
emit clickedMid(m_fileName, line, address); emit clickedMid(m_fileName, line, address);
break; break;
default:; default:;

@ -182,7 +182,7 @@ void TypeTable::readType(TDEConfigBase& cf, const TQString& type)
m_typeDict.insert(type, info); m_typeDict.insert(type, info);
else else
m_templates[type] = info; m_templates[type] = info;
TRACE(type + TQString().sprintf(": %d exprs", info->m_numExprs)); TRACE(type + TQString(": %1 exprs").arg(info->m_numExprs));
} }
void TypeTable::copyTypes(TQDict<TypeInfo>& dict) void TypeTable::copyTypes(TQDict<TypeInfo>& dict)

Loading…
Cancel
Save