Commit fb78a4c1 authored by Albert Astals Cid's avatar Albert Astals Cid

correctly update pos (shouldn't matter but let's do it correctly)

svn path=/trunk/KDE/kdegraphics/okular/; revision=1233921
parent 87e98d5c
......@@ -99,7 +99,9 @@ QString MobiDocument::fixMobiMarkup(const QString& data)
pos = 0;
while ((pos = rgb.indexIn(ret, pos)) != -1) {
const QString qtColor = QColor(rgb.cap(1).toInt(), rgb.cap(2).toInt(), rgb.cap(3).toInt()).name();
ret.replace(pos, rgb.matchedLength(), QString(" color=\"%1\"").arg(qtColor));
const QString newColorString = QString(" color=\"%1\"").arg(qtColor);
ret.replace(pos, rgb.matchedLength(), newColorString);
pos += newColorString.length() - rgb.matchedLength();
}
return ret;
}
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