QTextDocumentFragment: use range for more
to improve readability Change-Id: I42109e33fc076763c5b681d4837a81399c5aed5d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
parent
1cd95e3165
commit
ed553b720d
@ -577,14 +577,12 @@ bool QTextHtmlImporter::appendNodeText()
|
||||
if (wsm == QTextHtmlParserNode::WhiteSpacePre || wsm == QTextHtmlParserNode::WhiteSpacePreWrap)
|
||||
compressNextWhitespace = PreserveWhiteSpace;
|
||||
|
||||
QString text = currentNode->text;
|
||||
const QString text = currentNode->text;
|
||||
|
||||
QString textToInsert;
|
||||
textToInsert.reserve(text.size());
|
||||
|
||||
for (int i = 0; i < text.size(); ++i) {
|
||||
QChar ch = text.at(i);
|
||||
|
||||
for (QChar ch : text) {
|
||||
if (ch.isSpace()
|
||||
&& ch != QChar::Nbsp
|
||||
&& ch != QChar::ParagraphSeparator) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user