From c554f9ef0a8af91597d367c8fb69568def871c32 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 16 Oct 2020 16:10:39 +0200 Subject: [PATCH] QTextTable: fix an implicit uint->int conversion Make it explicit; didn't investigate why mixed comparisons are used here. Change-Id: Idd353c76a65ca1c8c4a158886f64c9cbb321494b Reviewed-by: Lars Knoll --- src/gui/text/qtexttable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index 6594b4e879..d4ed4411bc 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -403,7 +403,7 @@ void QTextTablePrivate::fragmentAdded(QChar type, uint fragment) if (blockFragmentUpdates) return; if (type == QTextBeginningOfFrame) { - Q_ASSERT(cells.indexOf(fragment) == -1); + Q_ASSERT(cells.indexOf(int(fragment)) == -1); const uint pos = pieceTable->fragmentMap().position(fragment); QFragmentFindHelper helper(pos, pieceTable->fragmentMap()); auto it = std::lower_bound(cells.begin(), cells.end(), helper); @@ -421,7 +421,7 @@ void QTextTablePrivate::fragmentRemoved(QChar type, uint fragment) if (blockFragmentUpdates) return; if (type == QTextBeginningOfFrame) { - Q_ASSERT(cells.indexOf(fragment) != -1); + Q_ASSERT(cells.indexOf(int(fragment)) != -1); cells.removeAll(fragment); if (fragment_start == fragment && cells.size()) { fragment_start = cells.at(0);