path: root/src/gui/text/qtextdocument_p.cpp
diff options
authorLars Knoll <>2020-06-19 20:53:25 +0200
committerLars Knoll <>2020-07-06 21:31:14 +0200
commitdf853fed66d891077ae2d04ecfa171d7e2cd5202 (patch)
treebf29d3718eeee1e17d1640841595de0ba8cda4cf /src/gui/text/qtextdocument_p.cpp
parent3711bf85ae85c9398642ae276cbd90b5bfaa6688 (diff)
Use qsizetype in QList
The change creates a slight source incompatibility. The main things to take care of are * code using printf statements on list.size(). Using qsizetype in printf statements will always require a cast to work on both 32 and 64 bit. * A few places where overloads now get ambiguous. One example is QRandomGenerator::bounded() that has overloads for int, uint and double, but not int64. * Streaming list.size() to a QDataStream will change the format depending on the architecture. [ChangeLog][QtCore][QList] QList now uses qsizetype to index into elements. Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6 Reviewed-by: Thiago Macieira <>
Diffstat (limited to 'src/gui/text/qtextdocument_p.cpp')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 5198425b26..94efb4a94d 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -877,7 +877,7 @@ bool QTextDocumentPrivate::unite(uint f)
int QTextDocumentPrivate::undoRedo(bool undo)
- PMDEBUG("%s, undoState=%d, undoStack size=%d", undo ? "undo:" : "redo:", undoState, undoStack.size());
+ PMDEBUG("%s, undoState=%d, undoStack size=%d", undo ? "undo:" : "redo:", undoState, int(undoStack.size()));
if (!undoEnabled || (undo && undoState == 0) || (!undo && undoState == undoStack.size()))
return -1;