aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-06-17 14:02:55 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-24 10:46:33 +0000
commitde304af3600ab53218191f00d7728cdcdd07b4a8 (patch)
treecc54b37c41dbb8d314a800e283d9d184faf3fdb1
parente0cef42aa0a314f969846fd6035014433bfeeb33 (diff)
Fix BC break in qqmlist.h
We need to retain the implementations for the ctors. Also, since the original change only made it into 6.4, it cannot be deprecated in 6.3. Change-Id: Iab2f1092ddebe5c1a20ec51c7feabb0197c057bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit feca571240e553b56fc87ca60fea9e405fd12ac3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qml/qml/qqmllist.cpp33
-rw-r--r--src/qml/qml/qqmllist.h8
2 files changed, 36 insertions, 5 deletions
diff --git a/src/qml/qml/qqmllist.cpp b/src/qml/qml/qqmllist.cpp
index 7adec6a725..49fcc9bc0e 100644
--- a/src/qml/qml/qqmllist.cpp
+++ b/src/qml/qml/qqmllist.cpp
@@ -88,6 +88,39 @@ QQmlListReference::QQmlListReference()
{
}
+#if QT_DEPRECATED_SINCE(6, 4)
+/*!
+\since 6.1
+\obsolete [6.4] Use the constructors without QQmlEngine argument instead.
+
+Constructs a QQmlListReference from a QVariant \a variant containing a QQmlListProperty. If
+\a variant does not contain a list property, an invalid QQmlListReference is created. If the object
+owning the list property is destroyed after the reference is constructed, it will automatically
+become invalid. That is, it is safe to hold QQmlListReference instances even after the object is
+deleted.
+
+The \a engine is unused.
+*/
+QQmlListReference::QQmlListReference(const QVariant &variant, [[maybe_unused]] QQmlEngine *engine)
+ : QQmlListReference(variant)
+{}
+
+/*!
+\obsolete [6.4] Use the constructors without QQmlEngine argument instead.
+
+Constructs a QQmlListReference for \a object's \a property. If \a property is not a list
+property, an invalid QQmlListReference is created. If \a object is destroyed after
+the reference is constructed, it will automatically become invalid. That is, it is safe to hold
+QQmlListReference instances even after \a object is deleted.
+
+The \a engine is unused.
+*/
+QQmlListReference::QQmlListReference(QObject *object, const char *property,
+ [[maybe_unused]] QQmlEngine *engine)
+ : QQmlListReference(object, property)
+{}
+#endif
+
/*!
\since 6.1
diff --git a/src/qml/qml/qqmllist.h b/src/qml/qml/qqmllist.h
index 6b5c927f69..051f3d67ff 100644
--- a/src/qml/qml/qqmllist.h
+++ b/src/qml/qml/qqmllist.h
@@ -162,14 +162,12 @@ class Q_QML_EXPORT QQmlListReference
public:
QQmlListReference();
-#if QT_DEPRECATED_SINCE(6, 3)
+#if QT_DEPRECATED_SINCE(6, 4)
QT_DEPRECATED_X("Drop the QQmlEngine* argument")
- QQmlListReference(const QVariant &variant, QQmlEngine *)
- : QQmlListReference(variant) {}
+ QQmlListReference(const QVariant &variant, [[maybe_unused]] QQmlEngine *engine);
QT_DEPRECATED_X("Drop the QQmlEngine* argument")
- QQmlListReference(QObject *o, const char *property, QQmlEngine *)
- : QQmlListReference(o, property) {}
+ QQmlListReference(QObject *o, const char *property, [[maybe_unused]] QQmlEngine *engine);
#endif
explicit QQmlListReference(const QVariant &variant);