From 37a933c2b14a4a1aad54af0eba0bc210ae5b549a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 26 Jan 2016 14:38:54 +0100 Subject: QtGui: eradicate Q_FOREACH loops [needing qAsConst()] ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: I90fd517ad542ef92034403c15ebb8300a56ac693 Reviewed-by: Lars Knoll Reviewed-by: Gunnar Sletta --- src/gui/text/qtextdocumentfragment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gui/text/qtextdocumentfragment.cpp') diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index 32d59be833..9325f78ba0 100644 --- a/src/gui/text/qtextdocumentfragment.cpp +++ b/src/gui/text/qtextdocumentfragment.cpp @@ -873,7 +873,7 @@ QTextHtmlImporter::Table QTextHtmlImporter::scanTable(int tableNodeIdx) QVector rowColSpanForColumn; int effectiveRow = 0; - foreach (int row, rowNodes) { + for (int row : qAsConst(rowNodes)) { int colsInRow = 0; foreach (int cell, at(row).children) -- cgit v1.2.3