diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2017-12-18 18:15:16 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-02-12 09:13:21 +0000 |
commit | b8778ca03027266d5408a9d61a1ca5fa94ac07f7 (patch) | |
tree | 29afef950a131f1a204b0ccae47efeec1ec3a4e2 /src/qml/qml/qqmlengine.cpp | |
parent | b897a4b9e54fc2c53115ca70dc64332ee3a00462 (diff) |
Add a feature for ListModel
Change-Id: Ic7ae1f601084ec07fe9e500516eb7092818451aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r-- | src/qml/qml/qqmlengine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp index 80ec44e1e4..39ac767c2c 100644 --- a/src/qml/qml/qqmlengine.cpp +++ b/src/qml/qml/qqmlengine.cpp @@ -85,7 +85,9 @@ #if QT_CONFIG(animation) #include <private/qqmltimer_p.h> #endif +#if QT_CONFIG(qml_list_model) #include <private/qqmllistmodel_p.h> +#endif #include <private/qqmlplatform_p.h> #include <private/qquickpackage_p.h> #include <private/qqmldelegatemodel_p.h> @@ -236,8 +238,10 @@ void QQmlEnginePrivate::registerBaseTypes(const char *uri, int versionMajor, int // These QtQuick types' implementation resides in the QtQml module void QQmlEnginePrivate::registerQtQuick2Types(const char *uri, int versionMajor, int versionMinor) { +#if QT_CONFIG(qml_list_model) qmlRegisterType<QQmlListElement>(uri, versionMajor, versionMinor, "ListElement"); // Now in QtQml.Models, here for compatibility qmlRegisterCustomType<QQmlListModel>(uri, versionMajor, versionMinor, "ListModel", new QQmlListModelParser); // Now in QtQml.Models, here for compatibility +#endif qmlRegisterType<QQuickWorkerScript>(uri, versionMajor, versionMinor, "WorkerScript"); qmlRegisterType<QQuickPackage>(uri, versionMajor, versionMinor, "Package"); qmlRegisterType<QQmlDelegateModel>(uri, versionMajor, versionMinor, "VisualDataModel"); |