aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/qt6-changes.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/src/qt6-changes.qdoc')
-rw-r--r--src/qml/doc/src/qt6-changes.qdoc26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/qml/doc/src/qt6-changes.qdoc b/src/qml/doc/src/qt6-changes.qdoc
index c81d64b662..1e958479f6 100644
--- a/src/qml/doc/src/qt6-changes.qdoc
+++ b/src/qml/doc/src/qt6-changes.qdoc
@@ -71,7 +71,31 @@
the engine. As with \c variant properties, code that relied on implicit string conversions need
to use the corresponding functions of the Qt object.
- \section1 Removed API
+ \section1 Source Incompatible API Changes
+
+ \section2 Changed API
+
+ \c QQmlListProperty's \c CountFunction and \c AtFunction have been changed to use \c qsizetype
+ instead of \c int to align with the corresponding changes in Qt's containers.
+
+ \oldcode
+ int myCountFunction(QQmlListProperty<MyType> *);
+ MyType *myAtFunction(QQmlListProperty<MyType> *, int);
+
+ QQmlListProperty<MyType> myReadOnlyList(containingObject, container, &myCountFunction,
+ &myAtFunction);
+ \newcode
+ qsizetype myCountFunction(QQmlListProperty<MyType> *);
+ MyType *myAtFunction(QQmlListProperty<MyType> *, qsizetype);
+
+ QQmlListProperty<MyType> myReadOnlyList(containingObject, container, &myCountFunction,
+ &myAtFunction);
+ \endcode
+
+ Code which needs to supports both Qt 5 and Qt 6 can either use a typedef which is \c int in Qt 5
+ and \c qsizetype in Qt 6, or use \c QList::size_type, which already is such a type alias.
+
+ \section2 Removed API
Various deprecated functions have been removed.