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/types/qqmlmodelsmodule.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/types/qqmlmodelsmodule.cpp')
-rw-r--r-- | src/qml/types/qqmlmodelsmodule.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/types/qqmlmodelsmodule.cpp b/src/qml/types/qqmlmodelsmodule.cpp index a55d7af25d..872d7c059f 100644 --- a/src/qml/types/qqmlmodelsmodule.cpp +++ b/src/qml/types/qqmlmodelsmodule.cpp @@ -39,7 +39,9 @@ #include "qqmlmodelsmodule_p.h" #include <QtCore/qitemselectionmodel.h> +#if QT_CONFIG(qml_list_model) #include <private/qqmllistmodel_p.h> +#endif #include <private/qqmldelegatemodel_p.h> #include <private/qqmlobjectmodel_p.h> @@ -49,8 +51,10 @@ void QQmlModelsModule::defineModule() { const char uri[] = "QtQml.Models"; +#if QT_CONFIG(qml_list_model) qmlRegisterType<QQmlListElement>(uri, 2, 1, "ListElement"); qmlRegisterCustomType<QQmlListModel>(uri, 2, 1, "ListModel", new QQmlListModelParser); +#endif qmlRegisterType<QQmlDelegateModel>(uri, 2, 1, "DelegateModel"); qmlRegisterType<QQmlDelegateModel,12>(uri, 2, 9, "DelegateModel"); qmlRegisterType<QQmlDelegateModelGroup>(uri, 2, 1, "DelegateModelGroup"); |