Commit 6b0a565a authored by Dirk Mueller's avatar Dirk Mueller
Browse files

fix format string warnings/errors

svn path=/trunk/KDE/kdeedu/kalgebra/; revision=1128818
parent 81988320
......@@ -3156,7 +3156,7 @@ void MmlDocument::_dump(const MmlNode *node, QString &indent) const
{
if (node == 0) return;
qWarning((indent + node->toStr()).toLatin1().data());
qWarning("%s", qPrintable(indent + node->toStr()));
indent += " ";
const MmlNode *child = node->firstChild();
......@@ -3702,7 +3702,7 @@ int MmlNode::scriptlevel(const MmlNode *) const
return parent_sl + expl_sl;
}
else {
qWarning(("MmlNode::scriptlevel(): bad value " + expl_sl_str).toLatin1().data());
qWarning("MmlNode::scriptlevel(): bad value: %s", qPrintable(expl_sl_str));
return parent_sl;
}
}
......@@ -3718,7 +3718,7 @@ int MmlNode::scriptlevel(const MmlNode *) const
else if (expl_sl_str == "-")
return parent_sl - 1;
else {
qWarning(("MmlNode::scriptlevel(): could not parse value: \"" + expl_sl_str + "\"").toLatin1().data());
qWarning("MmlNode::scriptlevel(): could not parse value: \"%s\"", qPrintable(expl_sl_str));
return parent_sl;
}
}
......@@ -5772,7 +5772,7 @@ static QString decodeEntityValue(QString literal)
while (!literal.isEmpty()) {
if (!literal.startsWith("&#")) {
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
qWarning("decodeEntityValue(): bad entity literal: \"%s\"", qPrintable(literal));
return QString::null;
}
......@@ -5780,7 +5780,7 @@ static QString decodeEntityValue(QString literal)
int i = literal.indexOf(';');
if (i == -1) {
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
qWarning("decodeEntityValue(): bad entity literal: \"%s\"", qPrintable(literal));
return QString::null;
}
......@@ -5788,7 +5788,7 @@ static QString decodeEntityValue(QString literal)
literal = literal.right(literal.length() - i - 1);
if (char_code.isEmpty()) {
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
qWarning("decodeEntityValue(): bad entity literal: \"%s\"", qPrintable(literal));
return QString::null;
}
......@@ -5797,7 +5797,7 @@ static QString decodeEntityValue(QString literal)
bool ok;
unsigned c = char_code.toUInt(&ok, 16);
if (!ok) {
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
qWarning("decodeEntityValue(): bad entity literal: \"%s\"", qPrintable(literal));
return QString::null;
}
result += QChar(c);
......@@ -5806,7 +5806,7 @@ static QString decodeEntityValue(QString literal)
bool ok;
unsigned c = char_code.toUInt(&ok, 10);
if (!ok) {
qWarning(("decodeEntityValue(): bad entity literal: \"" + literal + "\"").toLatin1().data());
qWarning("decodeEntityValue(): bad entity literal: \"%s\"", qPrintable(literal));
return QString::null;
}
result += QChar(c);
......
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