diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-03 15:22:22 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-05-02 09:26:04 +0000 |
commit | 325e6305b418ffe1dfb9a36c2516c6a8a3de5733 (patch) | |
tree | c03b4f8263b41986b6f5d4ac9c6e35e371e98a33 /src/imports | |
parent | 0d409333d8679c75beeeda2711a9f01b5e708743 (diff) |
Move model types into their own library
The model types are not part of the core QML runtime and should only be
loaded if you explicitly import them. We cannot enforce that in Qt5 as
some of them are available from the QtQml import, but we can change it
in Qt6.
Change-Id: I1e49e84d748e352537ec2d4af901c034c91d038f
Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/labsmodels/labsmodels.pro | 2 | ||||
-rw-r--r-- | src/imports/models/models.pro | 2 | ||||
-rw-r--r-- | src/imports/qtqml/plugin.cpp | 2 | ||||
-rw-r--r-- | src/imports/qtqml/qtqml.pro | 3 | ||||
-rw-r--r-- | src/imports/qtquick2/plugin.cpp | 5 | ||||
-rw-r--r-- | src/imports/qtquick2/qtquick2.pro | 2 |
6 files changed, 10 insertions, 6 deletions
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) |