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

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/14/head
Michele Calgaro 2 years ago
parent b97891ede2
commit 2fa7734055
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

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

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

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

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

@ -182,7 +182,7 @@ void TypeTable::readType(TDEConfigBase& cf, const TQString& type)
m_typeDict.insert(type, info);
else
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)

Loading…
Cancel
Save