summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-02-01 08:19:36 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-02-01 07:50:56 +0000
commit543489fed29e021112d61a1775134a64d78190c3 (patch)
tree89c934dd494408523b6dd083391d6f25286c3c27
parent05e029619f18e66d587075e929bc2d8c384f367a (diff)
QTextTable: fix signed/unsigned warning
Even disregarding the warning, we're instantiating QList<int>::removeAll<uint>(), which is wasteful, so cast the fragment to int, like in the indexOf() call a line above. Detected by a rewrite of, essentially, QList::removeAll() as removeIf() + lambda, which brought the comparison from an -isystem header (std::remove()) into Qt code (the lambda), and apparently un-suppressed the warning. Qt 5.15 has the same code, but is unaffected, because removeAll() is no template there. Pick-to: 6.3 6.2 Change-Id: Id9fe33be647fc3dc958e316f0fbe03009b2a7adc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--src/gui/text/qtexttable.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 951408052d..1db6ff897f 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -415,7 +415,7 @@ void QTextTablePrivate::fragmentRemoved(QChar type, uint fragment)
return;
if (type == QTextBeginningOfFrame) {
Q_ASSERT(cells.indexOf(int(fragment)) != -1);
- cells.removeAll(fragment);
+ cells.removeAll(int(fragment));
if (fragment_start == fragment && cells.size()) {
fragment_start = cells.at(0);
}