aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.json1
-rw-r--r--src/imports/labsmodels/labsmodels.pro2
-rw-r--r--src/imports/models/models.pro2
-rw-r--r--src/imports/qtqml/plugin.cpp2
-rw-r--r--src/imports/qtqml/qtqml.pro3
-rw-r--r--src/imports/qtquick2/plugin.cpp5
-rw-r--r--src/imports/qtquick2/qtquick2.pro2
-rw-r--r--src/qml/configure.json16
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h2
-rw-r--r--src/qml/jsruntime/qv4functionobject_p.h12
-rw-r--r--src/qml/jsruntime/qv4lookup_p.h2
-rw-r--r--src/qml/jsruntime/qv4object_p.h2
-rw-r--r--src/qml/jsruntime/qv4propertykey_p.h2
-rw-r--r--src/qml/jsruntime/qv4serialize.cpp73
-rw-r--r--src/qml/jsruntime/qv4vtable_p.h2
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h2
-rw-r--r--src/qml/types/types.pri41
-rw-r--r--src/qml/util/util.pri14
-rw-r--r--src/qmlmodels/configure.json31
-rw-r--r--src/qmlmodels/qmlmodels.pro57
-rw-r--r--src/qmlmodels/qqmladaptormodel.cpp (renamed from src/qml/util/qqmladaptormodel.cpp)0
-rw-r--r--src/qmlmodels/qqmladaptormodel_p.h (renamed from src/qml/util/qqmladaptormodel_p.h)6
-rw-r--r--src/qmlmodels/qqmlchangeset.cpp (renamed from src/qml/util/qqmlchangeset.cpp)0
-rw-r--r--src/qmlmodels/qqmlchangeset_p.h (renamed from src/qml/util/qqmlchangeset_p.h)8
-rw-r--r--src/qmlmodels/qqmldelegatecomponent.cpp (renamed from src/qml/types/qqmldelegatecomponent.cpp)2
-rw-r--r--src/qmlmodels/qqmldelegatecomponent_p.h (renamed from src/qml/types/qqmldelegatecomponent_p.h)8
-rw-r--r--src/qmlmodels/qqmldelegatemodel.cpp (renamed from src/qml/types/qqmldelegatemodel.cpp)2
-rw-r--r--src/qmlmodels/qqmldelegatemodel_p.h (renamed from src/qml/types/qqmldelegatemodel_p.h)8
-rw-r--r--src/qmlmodels/qqmldelegatemodel_p_p.h (renamed from src/qml/types/qqmldelegatemodel_p_p.h)2
-rw-r--r--src/qmlmodels/qqmlinstantiator.cpp (renamed from src/qml/types/qqmlinstantiator.cpp)4
-rw-r--r--src/qmlmodels/qqmlinstantiator_p.h (renamed from src/qml/types/qqmlinstantiator_p.h)4
-rw-r--r--src/qmlmodels/qqmlinstantiator_p_p.h (renamed from src/qml/types/qqmlinstantiator_p_p.h)2
-rw-r--r--src/qmlmodels/qqmlitemmodels.qdoc (renamed from src/qml/types/qqmlitemmodels.qdoc)0
-rw-r--r--src/qmlmodels/qqmlitemselectionmodel.qdoc (renamed from src/qml/types/qqmlitemselectionmodel.qdoc)0
-rw-r--r--src/qmlmodels/qqmllistaccessor.cpp (renamed from src/qml/util/qqmllistaccessor.cpp)0
-rw-r--r--src/qmlmodels/qqmllistaccessor_p.h (renamed from src/qml/util/qqmllistaccessor_p.h)0
-rw-r--r--src/qmlmodels/qqmllistcompositor.cpp (renamed from src/qml/util/qqmllistcompositor.cpp)0
-rw-r--r--src/qmlmodels/qqmllistcompositor_p.h (renamed from src/qml/util/qqmllistcompositor_p.h)0
-rw-r--r--src/qmlmodels/qqmllistmodel.cpp (renamed from src/qml/types/qqmllistmodel.cpp)0
-rw-r--r--src/qmlmodels/qqmllistmodel_p.h (renamed from src/qml/types/qqmllistmodel_p.h)7
-rw-r--r--src/qmlmodels/qqmllistmodel_p_p.h (renamed from src/qml/types/qqmllistmodel_p_p.h)1
-rw-r--r--src/qmlmodels/qqmllistmodelworkeragent.cpp (renamed from src/qml/types/qqmllistmodelworkeragent.cpp)10
-rw-r--r--src/qmlmodels/qqmllistmodelworkeragent_p.h (renamed from src/qml/types/qqmllistmodelworkeragent_p.h)32
-rw-r--r--src/qmlmodels/qqmlmodelsmodule.cpp (renamed from src/qml/types/qqmlmodelsmodule.cpp)1
-rw-r--r--src/qmlmodels/qqmlmodelsmodule_p.h (renamed from src/qml/types/qqmlmodelsmodule_p.h)4
-rw-r--r--src/qmlmodels/qqmlobjectmodel.cpp (renamed from src/qml/types/qqmlobjectmodel.cpp)0
-rw-r--r--src/qmlmodels/qqmlobjectmodel_p.h (renamed from src/qml/types/qqmlobjectmodel_p.h)6
-rw-r--r--src/qmlmodels/qqmltableinstancemodel.cpp (renamed from src/qml/types/qqmltableinstancemodel.cpp)2
-rw-r--r--src/qmlmodels/qqmltableinstancemodel_p.h (renamed from src/qml/types/qqmltableinstancemodel_p.h)6
-rw-r--r--src/qmlmodels/qqmltablemodel.cpp (renamed from src/qml/types/qqmltablemodel.cpp)0
-rw-r--r--src/qmlmodels/qqmltablemodel_p.h (renamed from src/qml/types/qqmltablemodel_p.h)6
-rw-r--r--src/qmlmodels/qqmltablemodelcolumn.cpp (renamed from src/qml/types/qqmltablemodelcolumn.cpp)0
-rw-r--r--src/qmlmodels/qqmltablemodelcolumn_p.h (renamed from src/qml/types/qqmltablemodelcolumn_p.h)4
-rw-r--r--src/qmlmodels/qquickpackage.cpp (renamed from src/qml/types/qquickpackage.cpp)0
-rw-r--r--src/qmlmodels/qquickpackage_p.h (renamed from src/qml/types/qquickpackage_p.h)0
-rw-r--r--src/qmlmodels/qtqmlmodelsglobal.h59
-rw-r--r--src/qmlmodels/qtqmlmodelsglobal_p.h61
-rw-r--r--src/quick/configure.json3
-rw-r--r--src/quick/items/qquickitemview_p_p.h6
-rw-r--r--src/quick/items/qquickrepeater.cpp1
-rw-r--r--src/quick/items/qquicktableview.cpp6
-rw-r--r--src/quick/items/qquicktableview_p_p.h4
-rw-r--r--src/quick/quick.pro2
-rw-r--r--src/src.pro4
-rw-r--r--sync.profile1
-rw-r--r--tests/auto/qml/qqmlchangeset/qqmlchangeset.pro2
-rw-r--r--tests/auto/qml/qqmlinstantiator/qqmlinstantiator.pro2
-rw-r--r--tests/auto/qml/qqmlinstantiator/tst_qqmlinstantiator.cpp2
-rw-r--r--tests/auto/qml/qqmllistcompositor/qqmllistcompositor.pro2
-rw-r--r--tests/auto/qml/qqmllistmodel/qqmllistmodel.pro2
-rw-r--r--tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp2
-rw-r--r--tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro2
-rw-r--r--tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp2
-rw-r--r--tests/auto/qml/qqmlobjectmodel/qqmlobjectmodel.pro2
-rw-r--r--tests/auto/qml/qqmlobjectmodel/tst_qqmlobjectmodel.cpp4
-rw-r--r--tests/auto/qml/qqmltablemodel/qqmltablemodel.pro2
-rw-r--r--tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp2
-rw-r--r--tests/auto/quick/qquickanimations/qquickanimations.pro2
-rw-r--r--tests/auto/quick/qquickanimations/tst_qquickanimations.cpp2
-rw-r--r--tests/auto/quick/qquickgridview/qquickgridview.pro2
-rw-r--r--tests/auto/quick/qquickgridview/tst_qquickgridview.cpp2
-rw-r--r--tests/auto/quick/qquicklistview/qquicklistview.pro2
-rw-r--r--tests/auto/quick/qquicklistview/tst_qquicklistview.cpp6
-rw-r--r--tests/auto/quick/qquickpathview/qquickpathview.pro2
-rw-r--r--tests/auto/quick/qquickpathview/tst_qquickpathview.cpp2
-rw-r--r--tests/auto/quick/qquickrepeater/qquickrepeater.pro2
-rw-r--r--tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp4
-rw-r--r--tests/auto/quick/qquicktableview/qquicktableview.pro2
-rw-r--r--tests/auto/quick/qquicktableview/tst_qquicktableview.cpp4
-rw-r--r--tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro2
-rw-r--r--tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp2
91 files changed, 389 insertions, 218 deletions
diff --git a/configure.json b/configure.json
index fd1f58863c..df68a1765e 100644
--- a/configure.json
+++ b/configure.json
@@ -1,6 +1,7 @@
{
"subconfigs": [
"src/qml",
+ "src/qmlmodels",
"src/quick"
]
}
diff --git a/src/imports/labsmodels/labsmodels.pro b/src/imports/labsmodels/labsmodels.pro
index 1795ae5e43..5ef2ad76f6 100644
--- a/src/imports/labsmodels/labsmodels.pro
+++ b/src/imports/labsmodels/labsmodels.pro
@@ -6,6 +6,6 @@ IMPORT_VERSION = 1.0
SOURCES += \
plugin.cpp
-QT = qml-private
+QT = qml-private qmlmodels-private
load(qml_plugin)
diff --git a/src/imports/models/models.pro b/src/imports/models/models.pro
index fc87533cea..fd13b12401 100644
--- a/src/imports/models/models.pro
+++ b/src/imports/models/models.pro
@@ -6,6 +6,6 @@ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
SOURCES += \
plugin.cpp
-QT = qml-private
+QT = qml-private qmlmodels-private
load(qml_plugin)
diff --git a/src/imports/qtqml/plugin.cpp b/src/imports/qtqml/plugin.cpp
index eb8c0ffc2f..7595d6d65b 100644
--- a/src/imports/qtqml/plugin.cpp
+++ b/src/imports/qtqml/plugin.cpp
@@ -43,7 +43,7 @@
#include <QtQml/private/qqmlbind_p.h>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
-#include <QtQml/private/qqmlmodelsmodule_p.h>
+#include <QtQmlModels/private/qqmlmodelsmodule_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/imports/qtqml/qtqml.pro b/src/imports/qtqml/qtqml.pro
index d5bb313d0c..7a5169b8fc 100644
--- a/src/imports/qtqml/qtqml.pro
+++ b/src/imports/qtqml/qtqml.pro
@@ -6,6 +6,7 @@ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
SOURCES += \
plugin.cpp
-QT = qml-private
+# In Qt6 we won't need qmlmodels-private here
+QT = qml-private qmlmodels-private
load(qml_plugin)
diff --git a/src/imports/qtquick2/plugin.cpp b/src/imports/qtquick2/plugin.cpp
index 4dc6fee916..a5a2c73ced 100644
--- a/src/imports/qtquick2/plugin.cpp
+++ b/src/imports/qtquick2/plugin.cpp
@@ -38,8 +38,11 @@
****************************************************************************/
#include <QtQml/qqmlextensionplugin.h>
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QtQml/private/qqmlengine_p.h>
-#include <QtQml/private/qqmlmodelsmodule_p.h>
+#include <QtQmlModels/private/qqmlmodelsmodule_p.h>
+#endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <private/qtquick2_p.h>
diff --git a/src/imports/qtquick2/qtquick2.pro b/src/imports/qtquick2/qtquick2.pro
index 744dce4195..1b45d69eb7 100644
--- a/src/imports/qtquick2/qtquick2.pro
+++ b/src/imports/qtquick2/qtquick2.pro
@@ -6,6 +6,6 @@ IMPORT_VERSION = 2.$$QT_MINOR_VERSION
SOURCES += \
plugin.cpp
-QT += quick-private qml-private
+QT += quick-private qml-private qmlmodels-private
load(qml_plugin)
diff --git a/src/qml/configure.json b/src/qml/configure.json
index 0f7de29594..2f88aef1fb 100644
--- a/src/qml/configure.json
+++ b/src/qml/configure.json
@@ -149,12 +149,6 @@
"section": "QML",
"output": [ "privateFeature" ]
},
- "qml-list-model": {
- "label": "QML list model",
- "purpose": "Provides the ListModel QML type.",
- "section": "QML",
- "output": [ "privateFeature" ]
- },
"qml-xml-http-request": {
"label": "QML XML http request",
"purpose": "Provides support for sending XML http requests.",
@@ -178,12 +172,6 @@
"condition": "features.animation",
"output": [ "privateFeature" ]
},
- "qml-delegate-model": {
- "label": "QML delegate model",
- "purpose": "Provides the DelegateModel QML type.",
- "section": "QML",
- "output": [ "privateFeature" ]
- },
"qml-worker-script": {
"label": "QML WorkerScript",
"purpose": "Enables the use of threads in QML.",
@@ -201,10 +189,8 @@
"qml-debug",
"qml-jit",
"qml-sequence-object",
- "qml-list-model",
"qml-xml-http-request",
- "qml-locale",
- "qml-delegate-model"
+ "qml-locale"
]
}
]
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index 5b9934282c..a87eb92caf 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -96,7 +96,7 @@ struct DateObject: Object {
double date() const { return d()->date; }
void setDate(double date) { d()->date = date; }
- QDateTime toQDateTime() const;
+ Q_QML_PRIVATE_EXPORT QDateTime toQDateTime() const;
};
template<>
diff --git a/src/qml/jsruntime/qv4functionobject_p.h b/src/qml/jsruntime/qv4functionobject_p.h
index e03d49c74d..4fee26f341 100644
--- a/src/qml/jsruntime/qv4functionobject_p.h
+++ b/src/qml/jsruntime/qv4functionobject_p.h
@@ -87,11 +87,11 @@ DECLARE_HEAP_OBJECT(FunctionObject, Object) {
}
Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, QV4::String *name, VTable::Call call);
- void init(QV4::ExecutionContext *scope, QV4::String *name = nullptr);
- void init(QV4::ExecutionContext *scope, QV4::Function *function, QV4::String *n = nullptr);
- void init(QV4::ExecutionContext *scope, const QString &name);
- void init();
- void destroy();
+ Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, QV4::String *name = nullptr);
+ Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, QV4::Function *function, QV4::String *n = nullptr);
+ Q_QML_PRIVATE_EXPORT void init(QV4::ExecutionContext *scope, const QString &name);
+ Q_QML_PRIVATE_EXPORT void init();
+ Q_QML_PRIVATE_EXPORT void destroy();
void setFunction(Function *f);
@@ -260,7 +260,7 @@ struct FunctionPrototype: FunctionObject
static ReturnedValue method_hasInstance(const FunctionObject *, const Value *thisObject, const Value *argv, int argc);
};
-struct IndexedBuiltinFunction : FunctionObject
+struct Q_QML_PRIVATE_EXPORT IndexedBuiltinFunction : FunctionObject
{
V4_OBJECT2(IndexedBuiltinFunction, FunctionObject)
};
diff --git a/src/qml/jsruntime/qv4lookup_p.h b/src/qml/jsruntime/qv4lookup_p.h
index 7309749a81..f2e0afd797 100644
--- a/src/qml/jsruntime/qv4lookup_p.h
+++ b/src/qml/jsruntime/qv4lookup_p.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
namespace QV4 {
-struct Lookup {
+struct Q_QML_PRIVATE_EXPORT Lookup {
union {
ReturnedValue (*getter)(Lookup *l, ExecutionEngine *engine, const Value &object);
ReturnedValue (*globalGetter)(Lookup *l, ExecutionEngine *engine);
diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h
index 567382cbc0..38055ef407 100644
--- a/src/qml/jsruntime/qv4object_p.h
+++ b/src/qml/jsruntime/qv4object_p.h
@@ -410,7 +410,7 @@ private:
friend struct ObjectPrototype;
};
-struct ObjectOwnPropertyKeyIterator : OwnPropertyKeyIterator
+struct Q_QML_PRIVATE_EXPORT ObjectOwnPropertyKeyIterator : OwnPropertyKeyIterator
{
uint arrayIndex = 0;
uint memberIndex = 0;
diff --git a/src/qml/jsruntime/qv4propertykey_p.h b/src/qml/jsruntime/qv4propertykey_p.h
index 523afd4ccf..b2a2ec3dea 100644
--- a/src/qml/jsruntime/qv4propertykey_p.h
+++ b/src/qml/jsruntime/qv4propertykey_p.h
@@ -124,7 +124,7 @@ public:
return m();
}
- bool isString() const;
+ Q_QML_EXPORT bool isString() const;
bool isSymbol() const;
bool isCanonicalNumericIndexString() const;
diff --git a/src/qml/jsruntime/qv4serialize.cpp b/src/qml/jsruntime/qv4serialize.cpp
index a84521e205..a5e62d3e35 100644
--- a/src/qml/jsruntime/qv4serialize.cpp
+++ b/src/qml/jsruntime/qv4serialize.cpp
@@ -39,11 +39,6 @@
#include "qv4serialize_p.h"
-#if QT_CONFIG(qml_list_model)
-#include <private/qqmllistmodel_p.h>
-#include <private/qqmllistmodelworkeragent_p.h>
-#endif
-
#include <private/qv4value_p.h>
#include <private/qv4dateobject_p.h>
#include <private/qv4regexpobject_p.h>
@@ -85,9 +80,7 @@ enum Type {
WorkerNumber,
WorkerDate,
WorkerRegexp,
-#if QT_CONFIG(qml_list_model)
WorkerListModel,
-#endif
#if QT_CONFIG(qml_sequence_object)
WorkerSequence
#endif
@@ -235,18 +228,15 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, ExecutionEngine
} else if (const QObjectWrapper *qobjectWrapper = v.as<QV4::QObjectWrapper>()) {
// XXX TODO: Generalize passing objects between the main thread and worker scripts so
// that others can trivially plug in their elements.
-#if QT_CONFIG(qml_list_model)
- QQmlListModel *lm = qobject_cast<QQmlListModel *>(qobjectWrapper->object());
- if (lm && lm->agent()) {
- QQmlListModelWorkerAgent *agent = lm->agent();
- agent->addref();
- push(data, valueheader(WorkerListModel));
- push(data, (void *)agent);
- return;
+ if (QObject *lm = qobjectWrapper->object()) {
+ if (QObject *agent = qvariant_cast<QObject *>(lm->property("agent"))) {
+ if (QMetaObject::invokeMethod(agent, "addref")) {
+ push(data, valueheader(WorkerListModel));
+ push(data, (void *)agent);
+ return;
+ }
+ }
}
-#else
- Q_UNUSED(qobjectWrapper);
-#endif
// No other QObject's are allowed to be sent
push(data, valueheader(WorkerUndefined));
} else if (const Object *o = v.as<Object>()) {
@@ -298,6 +288,41 @@ void Serialize::serialize(QByteArray &data, const QV4::Value &v, ExecutionEngine
}
}
+struct VariantRef
+{
+ VariantRef() : obj(nullptr) {}
+ VariantRef(const VariantRef &r) : obj(r.obj) { addref(); }
+ VariantRef(QObject *a) : obj(a) { addref(); }
+ ~VariantRef() { release(); }
+
+ VariantRef &operator=(const VariantRef &o) {
+ o.addref();
+ release();
+ obj = o.obj;
+ return *this;
+ }
+
+ void addref() const
+ {
+ if (obj)
+ QMetaObject::invokeMethod(obj, "addref");
+ }
+
+ void release() const
+ {
+ if (obj)
+ QMetaObject::invokeMethod(obj, "release");
+
+ }
+
+ QObject *obj;
+};
+
+QT_END_NAMESPACE
+Q_DECLARE_METATYPE(VariantRef)
+Q_DECLARE_METATYPE(QV4::ExecutionEngine *)
+QT_BEGIN_NAMESPACE
+
ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
{
quint32 header = popUint32(data);
@@ -366,24 +391,21 @@ ReturnedValue Serialize::deserialize(const char *&data, ExecutionEngine *engine)
data += ALIGN(length * sizeof(quint16));
return Encode(engine->newRegExpObject(pattern, flags));
}
-#if QT_CONFIG(qml_list_model)
case WorkerListModel:
{
- void *ptr = popPtr(data);
- QQmlListModelWorkerAgent *agent = (QQmlListModelWorkerAgent *)ptr;
+ QObject *agent = reinterpret_cast<QObject *>(popPtr(data));
QV4::ScopedValue rv(scope, QV4::QObjectWrapper::wrap(engine, agent));
// ### Find a better solution then the ugly property
- QQmlListModelWorkerAgent::VariantRef ref(agent);
+ VariantRef ref(agent);
QVariant var = QVariant::fromValue(ref);
QV4::ScopedValue v(scope, scope.engine->fromVariant(var));
QV4::ScopedString s(scope, engine->newString(QStringLiteral("__qml:hidden:ref")));
rv->as<Object>()->defineReadonlyProperty(s, v);
- agent->release();
- agent->setEngine(engine);
+ QMetaObject::invokeMethod(agent, "release");
+ agent->setProperty("engine", QVariant::fromValue(engine));
return rv->asReturnedValue();
}
-#endif
#if QT_CONFIG(qml_sequence_object)
case WorkerSequence:
{
@@ -423,4 +445,3 @@ ReturnedValue Serialize::deserialize(const QByteArray &data, ExecutionEngine *en
}
QT_END_NAMESPACE
-
diff --git a/src/qml/jsruntime/qv4vtable_p.h b/src/qml/jsruntime/qv4vtable_p.h
index a4d91640c5..9dda104cd1 100644
--- a/src/qml/jsruntime/qv4vtable_p.h
+++ b/src/qml/jsruntime/qv4vtable_p.h
@@ -58,7 +58,7 @@ namespace QV4 {
struct Lookup;
-struct OwnPropertyKeyIterator {
+struct Q_QML_PRIVATE_EXPORT OwnPropertyKeyIterator {
virtual ~OwnPropertyKeyIterator() = 0;
virtual PropertyKey next(const Object *o, Property *p = nullptr, PropertyAttributes *attrs = nullptr) = 0;
};
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index 453c8ab8a8..92f2ccbb4a 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -182,7 +182,7 @@ private:
QV4::Function *m_v4Function;
};
-class QQmlPropertyCapture
+class Q_QML_PRIVATE_EXPORT QQmlPropertyCapture
{
public:
QQmlPropertyCapture(QQmlEngine *engine, QQmlJavaScriptExpression *e, QQmlJavaScriptExpression::DeleteWatcher *w)
diff --git a/src/qml/types/types.pri b/src/qml/types/types.pri
index 5a56208dc4..ba11271d66 100644
--- a/src/qml/types/types.pri
+++ b/src/qml/types/types.pri
@@ -1,27 +1,12 @@
SOURCES += \
$$PWD/qqmlbind.cpp \
$$PWD/qqmlconnections.cpp \
- $$PWD/qqmlmodelsmodule.cpp \
- $$PWD/qqmlmodelindexvaluetype.cpp \
- $$PWD/qqmlobjectmodel.cpp \
- $$PWD/qquickpackage.cpp \
- $$PWD/qqmlinstantiator.cpp \
- $$PWD/qqmltableinstancemodel.cpp \
- $$PWD/qqmltablemodel.cpp \
- $$PWD/qqmltablemodelcolumn.cpp
+ $$PWD/qqmlmodelindexvaluetype.cpp
HEADERS += \
$$PWD/qqmlbind_p.h \
$$PWD/qqmlconnections_p.h \
- $$PWD/qqmlmodelsmodule_p.h \
- $$PWD/qqmlmodelindexvaluetype_p.h \
- $$PWD/qqmlobjectmodel_p.h \
- $$PWD/qquickpackage_p.h \
- $$PWD/qqmlinstantiator_p.h \
- $$PWD/qqmlinstantiator_p_p.h \
- $$PWD/qqmltableinstancemodel_p.h \
- $$PWD/qqmltablemodel_p.h \
- $$PWD/qqmltablemodelcolumn_p.h
+ $$PWD/qqmlmodelindexvaluetype_p.h
qtConfig(qml-worker-script) {
SOURCES += \
@@ -30,28 +15,6 @@ qtConfig(qml-worker-script) {
$$PWD/qquickworkerscript_p.h
}
-qtConfig(qml-list-model) {
- SOURCES += \
- $$PWD/qqmllistmodel.cpp \
- $$PWD/qqmllistmodelworkeragent.cpp
-
- HEADERS += \
- $$PWD/qqmllistmodel_p.h \
- $$PWD/qqmllistmodel_p_p.h \
- $$PWD/qqmllistmodelworkeragent_p.h
-}
-
-qtConfig(qml-delegate-model) {
- SOURCES += \
- $$PWD/qqmldelegatemodel.cpp \
- $$PWD/qqmldelegatecomponent.cpp
-
- HEADERS += \
- $$PWD/qqmldelegatemodel_p.h \
- $$PWD/qqmldelegatemodel_p_p.h \
- $$PWD/qqmldelegatecomponent_p.h
-}
-
qtConfig(qml-animation) {
SOURCES += \
$$PWD/qqmltimer.cpp
diff --git a/src/qml/util/util.pri b/src/qml/util/util.pri
index bebb271f1b..3b121ba3cb 100644
--- a/src/qml/util/util.pri
+++ b/src/qml/util/util.pri
@@ -1,19 +1,5 @@
SOURCES += \
- $$PWD/qqmlchangeset.cpp \
- $$PWD/qqmllistaccessor.cpp \
- $$PWD/qqmllistcompositor.cpp \
$$PWD/qqmlpropertymap.cpp
HEADERS += \
- $$PWD/qqmlchangeset_p.h \
- $$PWD/qqmllistaccessor_p.h \
- $$PWD/qqmllistcompositor_p.h \
$$PWD/qqmlpropertymap.h
-
-qtConfig(qml-delegate-model) {
- SOURCES += \
- $$PWD/qqmladaptormodel.cpp
-
- HEADERS += \
- $$PWD/qqmladaptormodel_p.h
-}
diff --git a/src/qmlmodels/configure.json b/src/qmlmodels/configure.json
new file mode 100644
index 0000000000..2aa8a50e69
--- /dev/null
+++ b/src/qmlmodels/configure.json
@@ -0,0 +1,31 @@
+{
+ "module": "qmlmodels",
+ "depends": [
+ "core-private",
+ "qml-private"
+ ],
+
+ "features": {
+ "qml-list-model": {
+ "label": "QML list model",
+ "purpose": "Provides the ListModel QML type.",
+ "section": "QML",
+ "output": [ "privateFeature" ]
+ },
+ "qml-delegate-model": {
+ "label": "QML delegate model",
+ "purpose": "Provides the DelegateModel QML type.",
+ "section": "QML",
+ "output": [ "privateFeature" ]
+ }
+ },
+ "summary": [
+ {
+ "section": "Qt QML Models",
+ "entries": [
+ "qml-list-model",
+ "qml-delegate-model"
+ ]
+ }
+ ]
+}
diff --git a/src/qmlmodels/qmlmodels.pro b/src/qmlmodels/qmlmodels.pro
new file mode 100644
index 0000000000..84f87f8bb1
--- /dev/null
+++ b/src/qmlmodels/qmlmodels.pro
@@ -0,0 +1,57 @@
+TARGET = QtQmlModels
+QT = core-private qml-private
+
+DEFINES += QT_NO_URL_CAST_FROM_STRING QT_NO_INTEGER_EVENT_COORDINATES QT_NO_FOREACH
+
+HEADERS += \
+ $$PWD/qqmlchangeset_p.h \
+ $$PWD/qqmlinstantiator_p.h \
+ $$PWD/qqmlinstantiator_p_p.h \
+ $$PWD/qqmllistaccessor_p.h \
+ $$PWD/qqmllistcompositor_p.h \
+ $$PWD/qqmlmodelsmodule_p.h \
+ $$PWD/qqmlobjectmodel_p.h \
+ $$PWD/qqmltableinstancemodel_p.h \
+ $$PWD/qqmltablemodel_p.h \
+ $$PWD/qqmltablemodelcolumn_p.h \
+ $$PWD/qquickpackage_p.h \
+ $$PWD/qtqmlmodelsglobal_p.h \
+ $$PWD/qtqmlmodelsglobal.h \
+
+SOURCES += \
+ $$PWD/qqmlchangeset.cpp \
+ $$PWD/qqmlinstantiator.cpp \
+ $$PWD/qqmllistaccessor.cpp \
+ $$PWD/qqmllistcompositor.cpp \
+ $$PWD/qqmlmodelsmodule.cpp \
+ $$PWD/qqmlobjectmodel.cpp \
+ $$PWD/qqmltableinstancemodel.cpp \
+ $$PWD/qqmltablemodel.cpp \
+ $$PWD/qqmltablemodelcolumn.cpp \
+ $$PWD/qquickpackage.cpp
+
+qtConfig(qml-list-model) {
+ SOURCES += \
+ $$PWD/qqmllistmodel.cpp \
+ $$PWD/qqmllistmodelworkeragent.cpp
+
+ HEADERS += \
+ $$PWD/qqmllistmodel_p.h \
+ $$PWD/qqmllistmodel_p_p.h \
+ $$PWD/qqmllistmodelworkeragent_p.h
+}
+
+qtConfig(qml-delegate-model) {
+ SOURCES += \
+ $$PWD/qqmladaptormodel.cpp \
+ $$PWD/qqmldelegatemodel.cpp \
+ $$PWD/qqmldelegatecomponent.cpp
+
+ HEADERS += \
+ $$PWD/qqmladaptormodel_p.h \
+ $$PWD/qqmldelegatemodel_p.h \
+ $$PWD/qqmldelegatemodel_p_p.h \
+ $$PWD/qqmldelegatecomponent_p.h
+}
+
+load(qt_module)
diff --git a/src/qml/util/qqmladaptormodel.cpp b/src/qmlmodels/qqmladaptormodel.cpp
index f991ae0a69..f991ae0a69 100644
--- a/src/qml/util/qqmladaptormodel.cpp
+++ b/src/qmlmodels/qqmladaptormodel.cpp
diff --git a/src/qml/util/qqmladaptormodel_p.h b/src/qmlmodels/qqmladaptormodel_p.h
index 8c18466ab5..a4549127af 100644
--- a/src/qml/util/qqmladaptormodel_p.h
+++ b/src/qmlmodels/qqmladaptormodel_p.h
@@ -53,10 +53,12 @@
#include <QtCore/qabstractitemmodel.h>
-#include "private/qqmllistaccessor_p.h"
#include <private/qqmlglobal_p.h>
+#include <private/qqmllistaccessor_p.h>
+#include <private/qtqmlmodelsglobal_p.h>
#include <private/qqmlguard_p.h>
#include <private/qqmlnullablevalue_p.h>
+#include <private/qqmlpropertycache_p.h>
QT_REQUIRE_CONFIG(qml_delegate_model);
@@ -68,7 +70,7 @@ class QQmlDelegateModel;
class QQmlDelegateModelItem;
class QQmlDelegateModelItemMetaType;
-class Q_QML_PRIVATE_EXPORT QQmlAdaptorModel : public QQmlStrongJSQObjectReference<QObject>
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlAdaptorModel : public QQmlStrongJSQObjectReference<QObject>
{
public:
class Accessors
diff --git a/src/qml/util/qqmlchangeset.cpp b/src/qmlmodels/qqmlchangeset.cpp
index ba876b42e2..ba876b42e2 100644
--- a/src/qml/util/qqmlchangeset.cpp
+++ b/src/qmlmodels/qqmlchangeset.cpp
diff --git a/src/qml/util/qqmlchangeset_p.h b/src/qmlmodels/qqmlchangeset_p.h
index 8347a3ff19..5b44d2958c 100644
--- a/src/qml/util/qqmlchangeset_p.h
+++ b/src/qmlmodels/qqmlchangeset_p.h
@@ -53,11 +53,11 @@
#include <QtCore/qdebug.h>
#include <QtCore/qvector.h>
-#include <QtQml/private/qtqmlglobal_p.h>
+#include <QtQmlModels/private/qtqmlmodelsglobal_p.h>
QT_BEGIN_NAMESPACE
-class Q_QML_PRIVATE_EXPORT QQmlChangeSet
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlChangeSet
{
public:
struct MoveKey
@@ -153,8 +153,8 @@ inline uint qHash(const QQmlChangeSet::MoveKey &key) { return qHash(qMakePair(ke
inline bool operator ==(const QQmlChangeSet::MoveKey &l, const QQmlChangeSet::MoveKey &r) {
return l.moveId == r.moveId && l.offset == r.offset; }
-Q_QML_PRIVATE_EXPORT QDebug operator <<(QDebug debug, const QQmlChangeSet::Change &change);
-Q_QML_PRIVATE_EXPORT QDebug operator <<(QDebug debug, const QQmlChangeSet &change);
+Q_QMLMODELS_PRIVATE_EXPORT QDebug operator <<(QDebug debug, const QQmlChangeSet::Change &change);
+Q_QMLMODELS_PRIVATE_EXPORT QDebug operator <<(QDebug debug, const QQmlChangeSet &change);
QT_END_NAMESPACE
diff --git a/src/qml/types/qqmldelegatecomponent.cpp b/src/qmlmodels/qqmldelegatecomponent.cpp
index 470f6cab6a..a7e9536917 100644
--- a/src/qml/types/qqmldelegatecomponent.cpp
+++ b/src/qmlmodels/qqmldelegatecomponent.cpp
@@ -38,7 +38,7 @@
****************************************************************************/
#include "qqmldelegatecomponent_p.h"
-#include <QtQml/private/qqmladaptormodel_p.h>
+#include <QtQmlModels/private/qqmladaptormodel_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/types/qqmldelegatecomponent_p.h b/src/qmlmodels/qqmldelegatecomponent_p.h
index c925ed9a60..1d20f0327b 100644
--- a/src/qml/types/qqmldelegatecomponent_p.h
+++ b/src/qmlmodels/qqmldelegatecomponent_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qtqmlglobal_p.h>
+#include <private/qtqmlmodelsglobal_p.h>
#include <qqmlcomponent.h>
QT_REQUIRE_CONFIG(qml_delegate_model);
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
// TODO: consider making QQmlAbstractDelegateComponent public API
class QQmlAbstractDelegateComponentPrivate;
class QQmlAdaptorModel;
-class Q_QML_PRIVATE_EXPORT QQmlAbstractDelegateComponent : public QQmlComponent
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlAbstractDelegateComponent : public QQmlComponent
{
Q_OBJECT
public:
@@ -81,7 +81,7 @@ private:
Q_DISABLE_COPY(QQmlAbstractDelegateComponent)
};
-class Q_QML_PRIVATE_EXPORT QQmlDelegateChoice : public QObject
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateChoice : public QObject
{
Q_OBJECT
Q_PROPERTY(QVariant roleValue READ roleValue WRITE setRoleValue NOTIFY roleValueChanged)
@@ -120,7 +120,7 @@ private:
QQmlComponent *m_delegate = nullptr;
};
-class Q_QML_PRIVATE_EXPORT QQmlDelegateChooser : public QQmlAbstractDelegateComponent
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateChooser : public QQmlAbstractDelegateComponent
{
Q_OBJECT
Q_PROPERTY(QString role READ role WRITE setRole NOTIFY roleChanged)
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp
index 0e57119368..742c164508 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qmlmodels/qqmldelegatemodel.cpp
@@ -52,7 +52,7 @@
#include <private/qv4value_p.h>
#include <private/qv4functionobject_p.h>
-#include <qv4objectiterator_p.h>
+#include <private/qv4objectiterator_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/types/qqmldelegatemodel_p.h b/src/qmlmodels/qqmldelegatemodel_p.h
index 2684162514..21eaef02e0 100644
--- a/src/qml/types/qqmldelegatemodel_p.h
+++ b/src/qmlmodels/qqmldelegatemodel_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qtqmlglobal_p.h>
+#include <private/qtqmlmodelsglobal_p.h>
#include <private/qqmllistcompositor_p.h>
#include <private/qqmlobjectmodel_p.h>
#include <private/qqmlincubator_p.h>
@@ -59,8 +59,6 @@
#include <QtCore/qabstractitemmodel.h>
#include <QtCore/qstringlist.h>
-#include <private/qqmlglobal_p.h>
-
QT_REQUIRE_CONFIG(qml_delegate_model);
QT_BEGIN_NAMESPACE
@@ -73,7 +71,7 @@ class QQmlDelegateModelAttached;
class QQmlDelegateModelPrivate;
-class Q_QML_PRIVATE_EXPORT QQmlDelegateModel : public QQmlInstanceModel, public QQmlParserStatus
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateModel : public QQmlInstanceModel, public QQmlParserStatus
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQmlDelegateModel)
@@ -159,7 +157,7 @@ private:
};
class QQmlDelegateModelGroupPrivate;
-class Q_QML_PRIVATE_EXPORT QQmlDelegateModelGroup : public QObject
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateModelGroup : public QObject
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
diff --git a/src/qml/types/qqmldelegatemodel_p_p.h b/src/qmlmodels/qqmldelegatemodel_p_p.h
index 7f10bbf370..92362b8876 100644
--- a/src/qml/types/qqmldelegatemodel_p_p.h
+++ b/src/qmlmodels/qqmldelegatemodel_p_p.h
@@ -69,7 +69,7 @@ typedef QQmlListCompositor Compositor;
class QQmlDelegateModelAttachedMetaObject;
class QQmlAbstractDelegateComponent;
-class Q_QML_PRIVATE_EXPORT QQmlDelegateModelItemMetaType : public QQmlRefCount
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateModelItemMetaType : public QQmlRefCount
{
public:
QQmlDelegateModelItemMetaType(QV4::ExecutionEngine *engine, QQmlDelegateModel *model, const QStringList &groupNames);
diff --git a/src/qml/types/qqmlinstantiator.cpp b/src/qmlmodels/qqmlinstantiator.cpp
index a23ec0f2b4..af1b526e1d 100644
--- a/src/qml/types/qqmlinstantiator.cpp
+++ b/src/qmlmodels/qqmlinstantiator.cpp
@@ -43,9 +43,9 @@
#include <QtQml/QQmlComponent>
#include <QtQml/QQmlInfo>
#include <QtQml/QQmlError>
-#include <QtQml/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
#if QT_CONFIG(qml_delegate_model)
-#include <QtQml/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/qml/types/qqmlinstantiator_p.h b/src/qmlmodels/qqmlinstantiator_p.h
index ca371adc23..8b00a1e033 100644
--- a/src/qml/types/qqmlinstantiator_p.h
+++ b/src/qmlmodels/qqmlinstantiator_p.h
@@ -53,12 +53,12 @@
#include <QtQml/qqmlcomponent.h>
#include <QtQml/qqmlparserstatus.h>
-#include <QtQml/private/qtqmlglobal_p.h>
+#include <QtQmlModels/private/qtqmlmodelsglobal_p.h>
QT_BEGIN_NAMESPACE
class QQmlInstantiatorPrivate;
-class Q_QML_PRIVATE_EXPORT QQmlInstantiator : public QObject, public QQmlParserStatus
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlInstantiator : public QObject, public QQmlParserStatus
{
Q_OBJECT
Q_INTERFACES(QQmlParserStatus)
diff --git a/src/qml/types/qqmlinstantiator_p_p.h b/src/qmlmodels/qqmlinstantiator_p_p.h
index 4c76d5c689..bf153d8723 100644
--- a/src/qml/types/qqmlinstantiator_p_p.h
+++ b/src/qmlmodels/qqmlinstantiator_p_p.h
@@ -59,7 +59,7 @@
QT_BEGIN_NAMESPACE
-class Q_QML_PRIVATE_EXPORT QQmlInstantiatorPrivate : public QObjectPrivate
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlInstantiatorPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QQmlInstantiator)
diff --git a/src/qml/types/qqmlitemmodels.qdoc b/src/qmlmodels/qqmlitemmodels.qdoc
index f6e1b0b1b9..f6e1b0b1b9 100644
--- a/src/qml/types/qqmlitemmodels.qdoc
+++ b/src/qmlmodels/qqmlitemmodels.qdoc
diff --git a/src/qml/types/qqmlitemselectionmodel.qdoc b/src/qmlmodels/qqmlitemselectionmodel.qdoc
index 43da4f7a55..43da4f7a55 100644
--- a/src/qml/types/qqmlitemselectionmodel.qdoc
+++ b/src/qmlmodels/qqmlitemselectionmodel.qdoc
diff --git a/src/qml/util/qqmllistaccessor.cpp b/src/qmlmodels/qqmllistaccessor.cpp
index 46a11e2bc2..46a11e2bc2 100644
--- a/src/qml/util/qqmllistaccessor.cpp
+++ b/src/qmlmodels/qqmllistaccessor.cpp
diff --git a/src/qml/util/qqmllistaccessor_p.h b/src/qmlmodels/qqmllistaccessor_p.h
index bcd079adef..bcd079adef 100644
--- a/src/qml/util/qqmllistaccessor_p.h
+++ b/src/qmlmodels/qqmllistaccessor_p.h
diff --git a/src/qml/util/qqmllistcompositor.cpp b/src/qmlmodels/qqmllistcompositor.cpp
index 921e86f355..921e86f355 100644
--- a/src/qml/util/qqmllistcompositor.cpp
+++ b/src/qmlmodels/qqmllistcompositor.cpp
diff --git a/src/qml/util/qqmllistcompositor_p.h b/src/qmlmodels/qqmllistcompositor_p.h
index 172040559c..172040559c 100644
--- a/src/qml/util/qqmllistcompositor_p.h
+++ b/src/qmlmodels/qqmllistcompositor_p.h
diff --git a/src/qml/types/qqmllistmodel.cpp b/src/qmlmodels/qqmllistmodel.cpp
index 5b5bcd8464..5b5bcd8464 100644
--- a/src/qml/types/qqmllistmodel.cpp
+++ b/src/qmlmodels/qqmllistmodel.cpp
diff --git a/src/qml/types/qqmllistmodel_p.h b/src/qmlmodels/qqmllistmodel_p.h
index 471e33aa5a..4aabd790a5 100644
--- a/src/qml/types/qqmllistmodel_p.h
+++ b/src/qmlmodels/qqmllistmodel_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <qqml.h>
+#include <private/qtqmlmodelsglobal_p.h>
#include <private/qqmlcustomparser_p.h>
#include <QtCore/QObject>
@@ -77,11 +77,12 @@ namespace QV4 {
struct ModelObject;
}
-class Q_QML_PRIVATE_EXPORT QQmlListModel : public QAbstractListModel
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlListModel : public QAbstractListModel
{
Q_OBJECT
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(bool dynamicRoles READ dynamicRoles WRITE setDynamicRoles)
+ Q_PROPERTY(QObject *agent READ agent CONSTANT REVISION(14))
public:
QQmlListModel(QObject *parent=nullptr);
@@ -134,7 +135,7 @@ private:
inline bool canMove(int from, int to, int n) const { return !(from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0); }
- QQmlListModelWorkerAgent *m_agent;
+ mutable QQmlListModelWorkerAgent *m_agent;
mutable QV4::ExecutionEngine *m_engine;
QQmlRefPointer<QV4::CompiledData::CompilationUnit> m_compilationUnit;
bool m_mainThread;
diff --git a/src/qml/types/qqmllistmodel_p_p.h b/src/qmlmodels/qqmllistmodel_p_p.h
index 2876c71de6..a0d0e9ad89 100644
--- a/src/qml/types/qqmllistmodel_p_p.h
+++ b/src/qmlmodels/qqmllistmodel_p_p.h
@@ -52,6 +52,7 @@
//
#include "qqmllistmodel_p.h"
+#include <private/qtqmlmodelsglobal_p.h>
#include <private/qqmlengine_p.h>
#include <private/qqmlopenmetaobject_p.h>
#include <private/qv4qobjectwrapper_p.h>
diff --git a/src/qml/types/qqmllistmodelworkeragent.cpp b/src/qmlmodels/qqmllistmodelworkeragent.cpp
index f7cb08dcf4..7e92810f78 100644
--- a/src/qml/types/qqmllistmodelworkeragent.cpp
+++ b/src/qmlmodels/qqmllistmodelworkeragent.cpp
@@ -66,9 +66,17 @@ QQmlListModelWorkerAgent::~QQmlListModelWorkerAgent()
mutex.unlock();
}
+QV4::ExecutionEngine *QQmlListModelWorkerAgent::engine() const
+{
+ return m_copy->m_engine;
+}
+
void QQmlListModelWorkerAgent::setEngine(QV4::ExecutionEngine *eng)
{
- m_copy->m_engine = eng;
+ if (eng != m_copy->m_engine) {
+ m_copy->m_engine = eng;
+ emit engineChanged(eng);
+ }
}
void QQmlListModelWorkerAgent::addref()
diff --git a/src/qml/types/qqmllistmodelworkeragent_p.h b/src/qmlmodels/qqmllistmodelworkeragent_p.h
index 69d1785618..f79c0c557a 100644
--- a/src/qml/types/qqmllistmodelworkeragent_p.h
+++ b/src/qmlmodels/qqmllistmodelworkeragent_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <qqml.h>
+#include <qtqmlmodelsglobal_p.h>
#include <QEvent>
#include <QMutex>
@@ -70,14 +70,17 @@ class QQmlListModelWorkerAgent : public QObject
{
Q_OBJECT
Q_PROPERTY(int count READ count)
+ Q_PROPERTY(QV4::ExecutionEngine *engine READ engine WRITE setEngine NOTIFY engineChanged)
public:
QQmlListModelWorkerAgent(QQmlListModel *);
~QQmlListModelWorkerAgent();
+
+ QV4::ExecutionEngine *engine() const;
void setEngine(QV4::ExecutionEngine *eng);
- void addref();
- void release();
+ Q_INVOKABLE void addref();
+ Q_INVOKABLE void release();
int count() const;
@@ -91,24 +94,11 @@ public:
Q_INVOKABLE void move(int from, int to, int count);
Q_INVOKABLE void sync();
- struct VariantRef
- {
- VariantRef() : a(nullptr) {}
- VariantRef(const VariantRef &r) : a(r.a) { if (a) a->addref(); }
- VariantRef(QQmlListModelWorkerAgent *_a) : a(_a) { if (a) a->addref(); }
- ~VariantRef() { if (a) a->release(); }
-
- VariantRef &operator=(const VariantRef &o) {
- if (o.a) o.a->addref();
- if (a) a->release();
- a = o.a;
- return *this;
- }
-
- QQmlListModelWorkerAgent *a;
- };
-
void modelDestroyed();
+
+signals:
+ void engineChanged(QV4::ExecutionEngine *engine);
+
protected:
bool event(QEvent *) override;
@@ -134,7 +124,5 @@ private:
QT_END_NAMESPACE
-Q_DECLARE_METATYPE(QQmlListModelWorkerAgent::VariantRef)
-
#endif // QQUICKLISTMODELWORKERAGENT_P_H
diff --git a/src/qml/types/qqmlmodelsmodule.cpp b/src/qmlmodels/qqmlmodelsmodule.cpp
index 840b435d18..989fec9b7d 100644
--- a/src/qml/types/qqmlmodelsmodule.cpp
+++ b/src/qmlmodels/qqmlmodelsmodule.cpp
@@ -38,6 +38,7 @@
****************************************************************************/
#include "qqmlmodelsmodule_p.h"
+#include <private/qtqmlmodelsglobal_p.h>
#include <QtCore/qitemselectionmodel.h>
#if QT_CONFIG(qml_list_model)
#include <private/qqmllistmodel_p.h>
diff --git a/src/qml/types/qqmlmodelsmodule_p.h b/src/qmlmodels/qqmlmodelsmodule_p.h
index 2bb04f1e11..7e02578db9 100644
--- a/src/qml/types/qqmlmodelsmodule_p.h
+++ b/src/qmlmodels/qqmlmodelsmodule_p.h
@@ -51,11 +51,11 @@
// We mean it.
//
-#include <private/qtqmlglobal_p.h>
+#include <private/qtqmlmodelsglobal_p.h>
QT_BEGIN_NAMESPACE
-class Q_QML_PRIVATE_EXPORT QQmlModelsModule
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlModelsModule
{
public:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
diff --git a/src/qml/types/qqmlobjectmodel.cpp b/src/qmlmodels/qqmlobjectmodel.cpp
index b6330b4295..b6330b4295 100644
--- a/src/qml/types/qqmlobjectmodel.cpp
+++ b/src/qmlmodels/qqmlobjectmodel.cpp
diff --git a/src/qml/types/qqmlobjectmodel_p.h b/src/qmlmodels/qqmlobjectmodel_p.h
index 1284ba1780..99bfd86269 100644
--- a/src/qml/types/qqmlobjectmodel_p.h
+++ b/src/qmlmodels/qqmlobjectmodel_p.h
@@ -51,7 +51,7 @@
// We mean it.
//
-#include <private/qtqmlglobal_p.h>
+#include <private/qtqmlmodelsglobal_p.h>
#include <private/qqmlincubator_p.h>
#include <QtQml/qqml.h>
#include <QtCore/qobject.h>
@@ -62,7 +62,7 @@ class QObject;
class QQmlChangeSet;
class QAbstractItemModel;
-class Q_QML_PRIVATE_EXPORT QQmlInstanceModel : public QObject
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlInstanceModel : public QObject
{
Q_OBJECT
@@ -104,7 +104,7 @@ private:
class QQmlObjectModelAttached;
class QQmlObjectModelPrivate;
-class Q_QML_PRIVATE_EXPORT QQmlObjectModel : public QQmlInstanceModel
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlObjectModel : public QQmlInstanceModel
{
Q_OBJECT
Q_DECLARE_PRIVATE(QQmlObjectModel)
diff --git a/src/qml/types/qqmltableinstancemodel.cpp b/src/qmlmodels/qqmltableinstancemodel.cpp
index 2170e2daec..b244a007e5 100644
--- a/src/qml/types/qqmltableinstancemodel.cpp
+++ b/src/qmlmodels/qqmltableinstancemodel.cpp
@@ -43,7 +43,7 @@
#include <QtCore/QTimer>
#include <QtQml/private/qqmlincubator_p.h>
-#include <QtQml/private/qqmlchangeset_p.h>
+#include <QtQmlModels/private/qqmlchangeset_p.h>
#include <QtQml/private/qqmlcomponent_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/qml/types/qqmltableinstancemodel_p.h b/src/qmlmodels/qqmltableinstancemodel_p.h
index 39ec66d136..20331df5cc 100644
--- a/src/qml/types/qqmltableinstancemodel_p.h
+++ b/src/qmlmodels/qqmltableinstancemodel_p.h
@@ -51,8 +51,8 @@
// We mean it.
//
-#include <QtQml/private/qqmldelegatemodel_p.h>
-#include <QtQml/private/qqmldelegatemodel_p_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p_p.h>
QT_BEGIN_NAMESPACE
@@ -79,7 +79,7 @@ public:
QQmlTableInstanceModel *tableInstanceModel = nullptr;
};
-class Q_QML_PRIVATE_EXPORT QQmlTableInstanceModel : public QQmlInstanceModel
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlTableInstanceModel : public QQmlInstanceModel
{
Q_OBJECT
diff --git a/src/qml/types/qqmltablemodel.cpp b/src/qmlmodels/qqmltablemodel.cpp
index 4a96e7a46b..4a96e7a46b 100644
--- a/src/qml/types/qqmltablemodel.cpp
+++ b/src/qmlmodels/qqmltablemodel.cpp
diff --git a/src/qml/types/qqmltablemodel_p.h b/src/qmlmodels/qqmltablemodel_p.h
index a1bb97e7d4..114b162e5c 100644
--- a/src/qml/types/qqmltablemodel_p.h
+++ b/src/qmlmodels/qqmltablemodel_p.h
@@ -54,14 +54,14 @@
#include <QtCore/QObject>
#include <QtCore/QAbstractTableModel>
#include <QtQml/qqml.h>
-#include <QtQml/private/qtqmlglobal_p.h>
-#include <QtQml/private/qqmltablemodelcolumn_p.h>
+#include <QtQmlModels/private/qtqmlmodelsglobal_p.h>
+#include <QtQmlModels/private/qqmltablemodelcolumn_p.h>
#include <QtQml/QJSValue>
#include <QtQml/QQmlListProperty>
QT_BEGIN_NAMESPACE
-class Q_QML_PRIVATE_EXPORT QQmlTableModel : public QAbstractTableModel, public QQmlParserStatus
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlTableModel : public QAbstractTableModel, public QQmlParserStatus
{
Q_OBJECT
Q_PROPERTY(int columnCount READ columnCount NOTIFY columnCountChanged FINAL)
diff --git a/src/qml/types/qqmltablemodelcolumn.cpp b/src/qmlmodels/qqmltablemodelcolumn.cpp
index 93da0642de..93da0642de 100644
--- a/src/qml/types/qqmltablemodelcolumn.cpp
+++ b/src/qmlmodels/qqmltablemodelcolumn.cpp
diff --git a/src/qml/types/qqmltablemodelcolumn_p.h b/src/qmlmodels/qqmltablemodelcolumn_p.h
index 41c02482c0..d125f8bb16 100644
--- a/src/qml/types/qqmltablemodelcolumn_p.h
+++ b/src/qmlmodels/qqmltablemodelcolumn_p.h
@@ -53,12 +53,12 @@
#include <QtCore/QObject>
#include <QtQml/qqml.h>
-#include <QtQml/private/qtqmlglobal_p.h>
+#include <QtQmlModels/private/qtqmlmodelsglobal_p.h>
#include <QtQml/qjsvalue.h>
QT_BEGIN_NAMESPACE
-class Q_QML_AUTOTEST_EXPORT QQmlTableModelColumn : public QObject
+class Q_QMLMODELS_PRIVATE_EXPORT QQmlTableModelColumn : public QObject
{
Q_OBJECT
Q_PROPERTY(QJSValue display READ display WRITE setDisplay NOTIFY displayChanged FINAL)
diff --git a/src/qml/types/qquickpackage.cpp b/src/qmlmodels/qquickpackage.cpp
index 03539d8737..03539d8737 100644
--- a/src/qml/types/qquickpackage.cpp
+++ b/src/qmlmodels/qquickpackage.cpp
diff --git a/src/qml/types/qquickpackage_p.h b/src/qmlmodels/qquickpackage_p.h
index 122c7fcb30..122c7fcb30 100644
--- a/src/qml/types/qquickpackage_p.h
+++ b/src/qmlmodels/qquickpackage_p.h
diff --git a/src/qmlmodels/qtqmlmodelsglobal.h b/src/qmlmodels/qtqmlmodelsglobal.h
new file mode 100644
index 0000000000..6e6cf299b2
--- /dev/null
+++ b/src/qmlmodels/qtqmlmodelsglobal.h
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTQMLMODELSGLOBAL_H
+#define QTQMLMODELSGLOBAL_H
+
+#include <QtQml/qtqmlglobal.h>
+#include <QtQmlModels/qtqmlmodels-config.h>
+
+QT_BEGIN_NAMESPACE
+
+#if !defined(QT_STATIC)
+# if defined(QT_BUILD_QMLMODELS_LIB)
+# define Q_QMLMODELS_EXPORT Q_DECL_EXPORT
+# else
+# define Q_QMLMODELS_EXPORT Q_DECL_IMPORT
+# endif
+#else
+# define Q_QMLMODELS_EXPORT
+#endif
+
+QT_END_NAMESPACE
+#endif // QTQMLMODELSGLOBAL_H
diff --git a/src/qmlmodels/qtqmlmodelsglobal_p.h b/src/qmlmodels/qtqmlmodelsglobal_p.h
new file mode 100644
index 0000000000..145112c9c1
--- /dev/null
+++ b/src/qmlmodels/qtqmlmodelsglobal_p.h
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtQml module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTQMLMODELSGLOBAL_P_H
+#define QTQMLMODELSGLOBAL_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtQml/private/qtqmlglobal_p.h>
+#include <QtQmlModels/qtqmlmodelsglobal.h>
+#include <QtQmlModels/private/qtqmlmodels-config_p.h>
+
+#define Q_QMLMODELS_PRIVATE_EXPORT Q_QMLMODELS_EXPORT
+#define Q_QMLMODELS_AUTOTEST_EXPORT Q_AUTOTEST_EXPORT
+
+#endif // QTQMLMODELSGLOBAL_P_H
diff --git a/src/quick/configure.json b/src/quick/configure.json
index 9ec3531ef4..70fe6d2129 100644
--- a/src/quick/configure.json
+++ b/src/quick/configure.json
@@ -2,7 +2,8 @@
"module": "quick",
"depends": [
"qml-private",
- "gui-private"
+ "gui-private",
+ "qmlmodels-private"
],
"testDir": "../../config.tests",
diff --git a/src/quick/items/qquickitemview_p_p.h b/src/quick/items/qquickitemview_p_p.h
index ea5b5df9c6..0f1594f904 100644
--- a/src/quick/items/qquickitemview_p_p.h
+++ b/src/quick/items/qquickitemview_p_p.h
@@ -59,9 +59,9 @@ QT_REQUIRE_CONFIG(quick_itemview);
#include "qquickitemviewfxitem_p_p.h"
#include "qquickitemviewtransition_p.h"
#include "qquickflickable_p_p.h"
-#include <QtQml/private/qqmlobjectmodel_p.h>
-#include <QtQml/private/qqmldelegatemodel_p.h>
-#include <QtQml/private/qqmlchangeset_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmlchangeset_p.h>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickrepeater.cpp b/src/quick/items/qquickrepeater.cpp
index 805b6fe190..c8a03aff33 100644
--- a/src/quick/items/qquickrepeater.cpp
+++ b/src/quick/items/qquickrepeater.cpp
@@ -41,7 +41,6 @@
#include "qquickrepeater_p_p.h"
#include <private/qqmlglobal_p.h>
-#include <private/qqmllistaccessor_p.h>
#include <private/qqmlchangeset_p.h>
#include <private/qqmldelegatemodel_p.h>
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index 5e7e0db154..8f5130fc17 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -42,10 +42,10 @@
#include <QtCore/qtimer.h>
#include <QtCore/qdir.h>
-#include <QtQml/private/qqmldelegatemodel_p.h>
-#include <QtQml/private/qqmldelegatemodel_p_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p_p.h>
#include <QtQml/private/qqmlincubator_p.h>
-#include <QtQml/private/qqmlchangeset_p.h>
+#include <QtQmlModels/private/qqmlchangeset_p.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuick/private/qquickflickable_p_p.h>
diff --git a/src/quick/items/qquicktableview_p_p.h b/src/quick/items/qquicktableview_p_p.h
index cbf6824278..7f2aee9105 100644
--- a/src/quick/items/qquicktableview_p_p.h
+++ b/src/quick/items/qquicktableview_p_p.h
@@ -54,9 +54,9 @@
#include "qquicktableview_p.h"
#include <QtCore/qtimer.h>
-#include <QtQml/private/qqmltableinstancemodel_p.h>
+#include <QtQmlModels/private/qqmltableinstancemodel_p.h>
#include <QtQml/private/qqmlincubator_p.h>
-#include <QtQml/private/qqmlchangeset_p.h>
+#include <QtQmlModels/private/qqmlchangeset_p.h>
#include <QtQml/qqmlinfo.h>
#include <QtQuick/private/qquickflickable_p_p.h>
diff --git a/src/quick/quick.pro b/src/quick/quick.pro
index 37d2ad1172..700f794af4 100644
--- a/src/quick/quick.pro
+++ b/src/quick/quick.pro
@@ -1,6 +1,6 @@
TARGET = QtQuick
-QT = core-private gui-private qml-private
+QT = core-private gui-private qml-private qmlmodels-private
qtConfig(qml-network): \
QT_PRIVATE += network
diff --git a/src/src.pro b/src/src.pro
index 1b2b4ef6f8..bd634247e7 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -4,7 +4,9 @@ include($$OUT_PWD/qml/qtqml-config.pri)
include($$OUT_PWD/quick/qtquick-config.pri)
QT_FOR_CONFIG += qml qml-private quick-private
SUBDIRS += \
- qml
+ qml \
+ qmlmodels
+
qtHaveModule(gui):qtConfig(qml-animation) {
SUBDIRS += \
diff --git a/sync.profile b/sync.profile
index 642942d152..b6a1825eed 100644
--- a/sync.profile
+++ b/sync.profile
@@ -7,6 +7,7 @@
"QtQuickTest" => "$basedir/src/qmltest",
"QtPacketProtocol" => "$basedir/src/plugins/qmltooling/packetprotocol",
"QtQmlDebug" => "$basedir/src/qmldebug",
+ "QtQmlModels" => "$basedir/src/qmlmodels",
);
%inject_headers = (
"$basedir/src/qml" => [ "^qqmljsgrammar_p.h", "^qqmljsparser_p.h" ],
diff --git a/tests/auto/qml/qqmlchangeset/qqmlchangeset.pro b/tests/auto/qml/qqmlchangeset/qqmlchangeset.pro
index 9f854f1fa2..cdac5c0ff9 100644
--- a/tests/auto/qml/qqmlchangeset/qqmlchangeset.pro
+++ b/tests/auto/qml/qqmlchangeset/qqmlchangeset.pro
@@ -4,4 +4,4 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qqmlchangeset.cpp
-QT += core-private gui-private qml-private testlib
+QT += core-private gui-private qml-private testlib qmlmodels-private
diff --git a/tests/auto/qml/qqmlinstantiator/qqmlinstantiator.pro b/tests/auto/qml/qqmlinstantiator/qqmlinstantiator.pro
index 542ec44736..e8ed8e91b1 100644
--- a/tests/auto/qml/qqmlinstantiator/qqmlinstantiator.pro
+++ b/tests/auto/qml/qqmlinstantiator/qqmlinstantiator.pro
@@ -9,4 +9,4 @@ include (../../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private testlib
+QT += core-private gui-private qml-private testlib qmlmodels-private
diff --git a/tests/auto/qml/qqmlinstantiator/tst_qqmlinstantiator.cpp b/tests/auto/qml/qqmlinstantiator/tst_qqmlinstantiator.cpp
index a66f13e6bb..9c5e09c77c 100644
--- a/tests/auto/qml/qqmlinstantiator/tst_qqmlinstantiator.cpp
+++ b/tests/auto/qml/qqmlinstantiator/tst_qqmlinstantiator.cpp
@@ -31,7 +31,7 @@
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcomponent.h>
-#include <QtQml/private/qqmlinstantiator_p.h>
+#include <QtQmlModels/private/qqmlinstantiator_p.h>
#include <QtQml/qqmlcontext.h>
#include <QtQml/qqmlincubator.h>
#include "../../shared/util.h"
diff --git a/tests/auto/qml/qqmllistcompositor/qqmllistcompositor.pro b/tests/auto/qml/qqmllistcompositor/qqmllistcompositor.pro
index 4ada590a2a..62ad85547e 100644
--- a/tests/auto/qml/qqmllistcompositor/qqmllistcompositor.pro
+++ b/tests/auto/qml/qqmllistcompositor/qqmllistcompositor.pro
@@ -4,4 +4,4 @@ macx:CONFIG -= app_bundle
SOURCES += tst_qqmllistcompositor.cpp
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
diff --git a/tests/auto/qml/qqmllistmodel/qqmllistmodel.pro b/tests/auto/qml/qqmllistmodel/qqmllistmodel.pro
index 8e3aed0baf..4d44d6b22b 100644
--- a/tests/auto/qml/qqmllistmodel/qqmllistmodel.pro
+++ b/tests/auto/qml/qqmllistmodel/qqmllistmodel.pro
@@ -8,4 +8,4 @@ include (../../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
diff --git a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp
index 2022a0d892..77ab0ecbc0 100644
--- a/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp
+++ b/tests/auto/qml/qqmllistmodel/tst_qqmllistmodel.cpp
@@ -30,7 +30,7 @@
#include <QtQuick/private/qquicktext_p.h>
#include <QtQuick/private/qquickanimation_p.h>
#include <QtQml/private/qqmlengine_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
#include <QtQml/private/qqmlexpression_p.h>
#include <QQmlComponent>
diff --git a/tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro b/tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro
index 9e1cea9867..de58c0c075 100644
--- a/tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro
+++ b/tests/auto/qml/qqmllistmodelworkerscript/qqmllistmodelworkerscript.pro
@@ -8,4 +8,4 @@ include (../../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
diff --git a/tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp b/tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp
index 236a13a6f8..b5e8800d0e 100644
--- a/tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp
+++ b/tests/auto/qml/qqmllistmodelworkerscript/tst_qqmllistmodelworkerscript.cpp
@@ -29,7 +29,7 @@
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquicktext_p.h>
#include <QtQml/private/qqmlengine_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
#include <QtQml/private/qqmlexpression_p.h>
#include <QQmlComponent>
diff --git a/tests/auto/qml/qqmlobjectmodel/qqmlobjectmodel.pro b/tests/auto/qml/qqmlobjectmodel/qqmlobjectmodel.pro
index 88bb630e29..5746ff754a 100644
--- a/tests/auto/qml/qqmlobjectmodel/qqmlobjectmodel.pro
+++ b/tests/auto/qml/qqmlobjectmodel/qqmlobjectmodel.pro
@@ -5,4 +5,4 @@ osx:CONFIG -= app_bundle
SOURCES += tst_qqmlobjectmodel.cpp
QT += qml testlib
-QT += core-private qml-private
+QT += core-private qml-private qmlmodels-private
diff --git a/tests/auto/qml/qqmlobjectmodel/tst_qqmlobjectmodel.cpp b/tests/auto/qml/qqmlobjectmodel/tst_qqmlobjectmodel.cpp
index fb63d811a8..6691fa43a0 100644
--- a/tests/auto/qml/qqmlobjectmodel/tst_qqmlobjectmodel.cpp
+++ b/tests/auto/qml/qqmlobjectmodel/tst_qqmlobjectmodel.cpp
@@ -25,8 +25,8 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <QtQml/private/qqmlobjectmodel_p.h>
-#include <QtQml/private/qqmlchangeset_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmlchangeset_p.h>
#include <QtTest/qsignalspy.h>
#include <QtTest/qtest.h>
diff --git a/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro b/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro
index 11b11132aa..9d298dfdf2 100644
--- a/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro
+++ b/tests/auto/qml/qqmltablemodel/qqmltablemodel.pro
@@ -7,4 +7,4 @@ include (../../shared/util.pri)
TESTDATA = data/*
-QT += core gui qml-private qml quick-private quick testlib
+QT += core gui qml-private qml quick-private quick testlib qmlmodels-private
diff --git a/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp b/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp
index 113a27494d..d913bcdf9a 100644
--- a/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp
+++ b/tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp
@@ -30,7 +30,7 @@
#include <QtTest/qsignalspy.h>
#include <QtCore/qregularexpression.h>
#include <QtQml/private/qqmlengine_p.h>
-#include <QtQml/private/qqmltablemodel_p.h>
+#include <QtQmlModels/private/qqmltablemodel_p.h>
#include <QtQml/qqmlcomponent.h>
#include <QtQuick/qquickitem.h>
#include <QtQuick/qquickview.h>
diff --git a/tests/auto/quick/qquickanimations/qquickanimations.pro b/tests/auto/quick/qquickanimations/qquickanimations.pro
index 8bb1f47af5..cd0a0fbb15 100644
--- a/tests/auto/quick/qquickanimations/qquickanimations.pro
+++ b/tests/auto/quick/qquickanimations/qquickanimations.pro
@@ -8,7 +8,7 @@ macx:CONFIG -= app_bundle
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
OTHER_FILES += \
diff --git a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
index 961506372a..b75dc8bc6b 100644
--- a/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
+++ b/tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
@@ -30,7 +30,7 @@
#include <QtQml/qqmlcomponent.h>
#include <QtQuick/qquickview.h>
#include <QtQml/private/qqmltimer_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
#include <QtQml/private/qanimationgroupjob_p.h>
#include <QtQuick/private/qquickrectangle_p.h>
#include <QtQuick/private/qquickitemanimation_p.h>
diff --git a/tests/auto/quick/qquickgridview/qquickgridview.pro b/tests/auto/quick/qquickgridview/qquickgridview.pro
index 5051f8bc62..0390637058 100644
--- a/tests/auto/quick/qquickgridview/qquickgridview.pro
+++ b/tests/auto/quick/qquickgridview/qquickgridview.pro
@@ -10,5 +10,5 @@ include (../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib qmltest
+QT += core-private gui-private qml-private quick-private testlib qmltest qmlmodels-private
diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
index 448096720c..b65b8770b1 100644
--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
@@ -40,7 +40,7 @@
#include <QtQuick/private/qquickitemview_p_p.h>
#include <QtQuick/private/qquickgridview_p.h>
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
#include "../../shared/util.h"
#include "../shared/viewtestutil.h"
#include "../shared/visualtestutil.h"
diff --git a/tests/auto/quick/qquicklistview/qquicklistview.pro b/tests/auto/quick/qquicklistview/qquicklistview.pro
index fd96c269a2..b08fca2b1d 100644
--- a/tests/auto/quick/qquicklistview/qquicklistview.pro
+++ b/tests/auto/quick/qquicklistview/qquicklistview.pro
@@ -18,5 +18,5 @@ include (../shared/util.pri)
TESTDATA = data/*
DISTFILES += data/*
-QT += core-private gui-private qml-private quick-private testlib qmltest
+QT += core-private gui-private qml-private quick-private testlib qmltest qmlmodels-private
diff --git a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
index 2ea8a477a8..894a5ee16e 100644
--- a/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
+++ b/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
@@ -40,9 +40,9 @@
#include <QtQuick/private/qquicklistview_p.h>
#include <QtQuick/private/qquickmousearea_p.h>
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQml/private/qqmlobjectmodel_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
-#include <QtQml/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
#include "../../shared/util.h"
#include "../shared/viewtestutil.h"
#include "../shared/visualtestutil.h"
diff --git a/tests/auto/quick/qquickpathview/qquickpathview.pro b/tests/auto/quick/qquickpathview/qquickpathview.pro
index f21fb64fa4..5eb24b89bd 100644
--- a/tests/auto/quick/qquickpathview/qquickpathview.pro
+++ b/tests/auto/quick/qquickpathview/qquickpathview.pro
@@ -9,5 +9,5 @@ include (../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib qmltest
+QT += core-private gui-private qml-private quick-private testlib qmltest qmlmodels-private
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
index 1a5ce39318..a1b2b64ae2 100644
--- a/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
+++ b/tests/auto/quick/qquickpathview/tst_qquickpathview.cpp
@@ -39,7 +39,7 @@
#include <QtQuick/private/qquicktext_p.h>
#include <QtQuick/private/qquickrectangle_p.h>
#include <QtQuickTest/QtQuickTest>
-#include <QtQml/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
#include <QtQml/private/qqmlvaluetype_p.h>
#include <QtGui/qstandarditemmodel.h>
#include <QStringListModel>
diff --git a/tests/auto/quick/qquickrepeater/qquickrepeater.pro b/tests/auto/quick/qquickrepeater/qquickrepeater.pro
index 5554342943..aed5702266 100644
--- a/tests/auto/quick/qquickrepeater/qquickrepeater.pro
+++ b/tests/auto/quick/qquickrepeater/qquickrepeater.pro
@@ -9,4 +9,4 @@ include (../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
diff --git a/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp
index f19f5f9877..65e7d29595 100644
--- a/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp
+++ b/tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp
@@ -35,8 +35,8 @@
#include <QtQml/qqmlincubator.h>
#include <private/qquickrepeater_p.h>
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
-#include <QtQml/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
#include <QtGui/qstandarditemmodel.h>
#include "../../shared/util.h"
diff --git a/tests/auto/quick/qquicktableview/qquicktableview.pro b/tests/auto/quick/qquicktableview/qquicktableview.pro
index cf831ed5b5..da0c0b01d0 100644
--- a/tests/auto/quick/qquicktableview/qquicktableview.pro
+++ b/tests/auto/quick/qquicktableview/qquicktableview.pro
@@ -11,5 +11,5 @@ include (../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
index 420a9fdb13..6c339c16d1 100644
--- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
+++ b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp
@@ -38,8 +38,8 @@
#include <QtQml/qqmlcontext.h>
#include <QtQml/qqmlexpression.h>
#include <QtQml/qqmlincubator.h>
-#include <QtQml/private/qqmlobjectmodel_p.h>
-#include <QtQml/private/qqmllistmodel_p.h>
+#include <QtQmlModels/private/qqmlobjectmodel_p.h>
+#include <QtQmlModels/private/qqmllistmodel_p.h>
#include "testmodel.h"
diff --git a/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro
index 9222e39477..5445f6768d 100644
--- a/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro
+++ b/tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro
@@ -9,5 +9,5 @@ include (../shared/util.pri)
TESTDATA = data/*
-QT += core-private gui-private qml-private quick-private testlib
+QT += core-private gui-private qml-private quick-private testlib qmlmodels-private
qtHaveModule(widgets): QT += widgets
diff --git a/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp b/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp
index fac8283e2c..32008f675a 100644
--- a/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp
+++ b/tests/auto/quick/qquickvisualdatamodel/tst_qquickvisualdatamodel.cpp
@@ -39,7 +39,7 @@
#include <QtQuick/qquickview.h>
#include <private/qquicklistview_p.h>
#include <QtQuick/private/qquicktext_p.h>
-#include <QtQml/private/qqmldelegatemodel_p.h>
+#include <QtQmlModels/private/qqmldelegatemodel_p.h>
#include <private/qqmlvaluetype_p.h>
#include <private/qqmlchangeset_p.h>
#include <private/qqmlengine_p.h>