From df853fed66d891077ae2d04ecfa171d7e2cd5202 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 19 Jun 2020 20:53:25 +0200 Subject: 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 --- src/widgets/widgets/qtoolbararealayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets/qtoolbararealayout.cpp') diff --git a/src/widgets/widgets/qtoolbararealayout.cpp b/src/widgets/widgets/qtoolbararealayout.cpp index 493c094cc1..6297796931 100644 --- a/src/widgets/widgets/qtoolbararealayout.cpp +++ b/src/widgets/widgets/qtoolbararealayout.cpp @@ -1267,7 +1267,7 @@ void QToolBarAreaLayout::saveState(QDataStream &stream) const for (int j = 0; j < dock.lines.count(); ++j) { const QToolBarAreaLayoutLine &line = dock.lines.at(j); - stream << i << line.toolBarItems.count(); + stream << i << int(line.toolBarItems.count()); for (int k = 0; k < line.toolBarItems.count(); ++k) { const QToolBarAreaLayoutItem &item = line.toolBarItems.at(k); -- cgit v1.2.3