diff options
-rw-r--r-- | src/qml/qml/qqmllist.h | 8 | ||||
-rw-r--r-- | tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h | 2 | ||||
-rw-r--r-- | tests/auto/qml/qqmlecmascript/testtypes.h | 4 | ||||
-rw-r--r-- | tests/auto/qml/qqmllanguage/testtypes.h | 10 | ||||
-rw-r--r-- | tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp | 7 | ||||
-rw-r--r-- | tests/benchmarks/qml/binding/testtypes.h | 2 | ||||
-rw-r--r-- | tests/benchmarks/qml/holistic/testtypes.h | 2 | ||||
-rw-r--r-- | tests/benchmarks/qml/qqmlcomponent/testtypes.h | 2 |
8 files changed, 12 insertions, 25 deletions
diff --git a/src/qml/qml/qqmllist.h b/src/qml/qml/qqmllist.h index 199f10196a..c51a9c7636 100644 --- a/src/qml/qml/qqmllist.h +++ b/src/qml/qml/qqmllist.h @@ -68,14 +68,6 @@ public: QQmlListProperty() = default; -#if QT_DEPRECATED_SINCE(5,15) - QT_DEPRECATED_X("Use constructor taking QList pointer, and gain improved performance") - QQmlListProperty(QObject *o, QList<T *> &list) - : object(o), data(&list), append(qlist_append), count(qlist_count), at(qlist_at), - clear(qlist_clear), replace(qslow_replace), removeLast(qslow_removeLast) - {} -#endif - QQmlListProperty(QObject *o, QList<T *> *list) : object(o), data(list), append(qlist_append), count(qlist_count), at(qlist_at), clear(qlist_clear), replace(qlist_replace), removeLast(qlist_removeLast) diff --git a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h index dfba55a094..72f30d8f1f 100644 --- a/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h +++ b/tests/auto/qml/qmlplugindump/data/dumper/ExtendedType/types.h @@ -55,7 +55,7 @@ class ExtendedType : public QObject public: ExtendedType(QObject *parent = nullptr) : QObject(parent) {} - QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, m_data); } + QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, &m_data); } private: QList<QObject *> m_data; diff --git a/tests/auto/qml/qqmlecmascript/testtypes.h b/tests/auto/qml/qqmlecmascript/testtypes.h index 725624781b..922bef0ead 100644 --- a/tests/auto/qml/qqmlecmascript/testtypes.h +++ b/tests/auto/qml/qqmlecmascript/testtypes.h @@ -149,7 +149,7 @@ public: emit objectChanged(); } - QQmlListProperty<QObject> objectListProperty() { return QQmlListProperty<QObject>(this, m_objectQList); } + QQmlListProperty<QObject> objectListProperty() { return QQmlListProperty<QObject>(this, &m_objectQList); } bool methodCalled() const { return m_methodCalled; } bool methodIntCalled() const { return m_methodIntCalled; } @@ -320,7 +320,7 @@ class MyQmlContainer : public QObject public: MyQmlContainer() {} - QQmlListProperty<MyQmlObject> children() { return QQmlListProperty<MyQmlObject>(this, m_children); } + QQmlListProperty<MyQmlObject> children() { return QQmlListProperty<MyQmlObject>(this, &m_children); } private: QList<MyQmlObject*> m_children; diff --git a/tests/auto/qml/qqmllanguage/testtypes.h b/tests/auto/qml/qqmllanguage/testtypes.h index 9c2aaa9e30..469fe5467c 100644 --- a/tests/auto/qml/qqmllanguage/testtypes.h +++ b/tests/auto/qml/qqmllanguage/testtypes.h @@ -654,10 +654,10 @@ class MyContainer : public QObject public: MyContainer() {} - QQmlListProperty<QObject> children() { return QQmlListProperty<QObject>(this, m_children); } - QQmlListProperty<MyContainer> containerChildren() { return QQmlListProperty<MyContainer>(this, m_containerChildren); } + QQmlListProperty<QObject> children() { return QQmlListProperty<QObject>(this, &m_children); } + QQmlListProperty<MyContainer> containerChildren() { return QQmlListProperty<MyContainer>(this, &m_containerChildren); } QList<QObject *> *getChildren() { return &m_children; } - QQmlListProperty<MyInterface> qlistInterfaces() { return QQmlListProperty<MyInterface>(this, m_interfaces); } + QQmlListProperty<MyInterface> qlistInterfaces() { return QQmlListProperty<MyInterface>(this, &m_interfaces); } QList<MyInterface *> *getQListInterfaces() { return &m_interfaces; } QList<MyContainer*> m_containerChildren; @@ -820,7 +820,7 @@ namespace MyNamespace { Q_OBJECT Q_PROPERTY(QQmlListProperty<MyNamespace::MyNamespacedType> list READ list) public: - QQmlListProperty<MyNamespacedType> list() { return QQmlListProperty<MyNamespacedType>(this, m_list); } + QQmlListProperty<MyNamespacedType> list() { return QQmlListProperty<MyNamespacedType>(this, &m_list); } private: QList<MyNamespacedType *> m_list; @@ -1431,7 +1431,7 @@ class DeferredProperties : public QObject Q_CLASSINFO("DeferredPropertyNames", "groupProperty,listProperty") Q_CLASSINFO("DefaultProperty", "listProperty") public: - QQmlListProperty<QObject> listProperty() { return QQmlListProperty<QObject>(this, m_list); } + QQmlListProperty<QObject> listProperty() { return QQmlListProperty<QObject>(this, &m_list); } private: QObject *m_group = 0; diff --git a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp index e25d555d61..665fcdc9dc 100644 --- a/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp +++ b/tests/auto/qml/qqmllistreference/tst_qqmllistreference.cpp @@ -92,7 +92,6 @@ public: SyntheticClearAndReplace, SyntheticRemoveLast, SyntheticRemoveLastAndReplace, - AutomaticReference, AutomaticPointer }; @@ -115,7 +114,7 @@ public: return reinterpret_cast<QList<TestType *> *>(p->data)->removeLast(); } - TestType(Mode mode = AutomaticReference) + TestType(Mode mode = AutomaticPointer) { switch (mode) { case SyntheticClear: @@ -138,9 +137,6 @@ public: property = QQmlListProperty<TestType>(this, &data, append, count, at, clear, nullptr, nullptr); break; - case AutomaticReference: - property = QQmlListProperty<TestType>(this, data); - break; case AutomaticPointer: property = QQmlListProperty<TestType>(this, &data); break; @@ -159,7 +155,6 @@ Q_DECLARE_METATYPE(TestType::Mode) void tst_qqmllistreference::modeData() { QTest::addColumn<TestType::Mode>("mode"); - QTest::addRow("AutomaticReference") << TestType::AutomaticReference; QTest::addRow("AutomaticPointer") << TestType::AutomaticPointer; QTest::addRow("SyntheticClear") << TestType::SyntheticClear; QTest::addRow("SyntheticReplace") << TestType::SyntheticReplace; diff --git a/tests/benchmarks/qml/binding/testtypes.h b/tests/benchmarks/qml/binding/testtypes.h index 7e95c7ef67..4713a63483 100644 --- a/tests/benchmarks/qml/binding/testtypes.h +++ b/tests/benchmarks/qml/binding/testtypes.h @@ -48,7 +48,7 @@ public: int value() const { return m_value; } void setValue(int v) { m_value = v; emit valueChanged(); } - QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, m_data); } + QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, &m_data); } MyQmlObject *object() const { return m_object; } void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } diff --git a/tests/benchmarks/qml/holistic/testtypes.h b/tests/benchmarks/qml/holistic/testtypes.h index 9d187f35ff..3cf0664ef2 100644 --- a/tests/benchmarks/qml/holistic/testtypes.h +++ b/tests/benchmarks/qml/holistic/testtypes.h @@ -109,7 +109,7 @@ public: emit objectChanged(); } - QQmlListProperty<QObject> objectListProperty() { return QQmlListProperty<QObject>(this, m_objectQList); } + QQmlListProperty<QObject> objectListProperty() { return QQmlListProperty<QObject>(this, &m_objectQList); } bool methodCalled() const { return m_methodCalled; } bool methodIntCalled() const { return m_methodIntCalled; } diff --git a/tests/benchmarks/qml/qqmlcomponent/testtypes.h b/tests/benchmarks/qml/qqmlcomponent/testtypes.h index 7e95c7ef67..4713a63483 100644 --- a/tests/benchmarks/qml/qqmlcomponent/testtypes.h +++ b/tests/benchmarks/qml/qqmlcomponent/testtypes.h @@ -48,7 +48,7 @@ public: int value() const { return m_value; } void setValue(int v) { m_value = v; emit valueChanged(); } - QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, m_data); } + QQmlListProperty<QObject> data() { return QQmlListProperty<QObject>(this, &m_data); } MyQmlObject *object() const { return m_object; } void setObject(MyQmlObject *o) { m_object = o; emit objectChanged(); } |