diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-02-20 15:11:22 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-02-21 19:42:51 +0100 |
commit | c3a9b379bbeb1dfd406470712aad7157cf264059 (patch) | |
tree | 219b892b65f21767e6a95d0f85b2139216c19ff3 | |
parent | f6808f89a8c17e046f53b0bb5ff36cd9e24e9772 (diff) |
Provide the labs imports also under QT_VERSION
Now that they all have QML_ADDED_IN_VERSION we can allow the user to
import them also under a later version without losing compatibility.
Task-number: QTBUG-71278
Change-Id: I74b9c758ec37ef41e1a53873266df0eeebfcabc7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/imports/labsanimation/labsanimation.pro | 2 | ||||
-rw-r--r-- | src/imports/labsmodels/labsmodels.pro | 2 | ||||
-rw-r--r-- | src/imports/labsmodels/qqmldelegatecomponent_p.h | 1 | ||||
-rw-r--r-- | src/imports/settings/settings.pro | 2 | ||||
-rw-r--r-- | src/imports/sharedimage/qsharedimageloader_p.h | 5 | ||||
-rw-r--r-- | src/imports/sharedimage/sharedimage.pro | 2 |
6 files changed, 10 insertions, 4 deletions
diff --git a/src/imports/labsanimation/labsanimation.pro b/src/imports/labsanimation/labsanimation.pro index 7254e49a7d..5fd8ff25a7 100644 --- a/src/imports/labsanimation/labsanimation.pro +++ b/src/imports/labsanimation/labsanimation.pro @@ -1,7 +1,7 @@ CXX_MODULE = qml TARGET = labsanimationplugin TARGETPATH = Qt/labs/animation -QML_IMPORT_VERSION = 1.0 +QML_IMPORT_VERSION = $$QT_VERSION SOURCES += \ qquickboundaryrule.cpp \ diff --git a/src/imports/labsmodels/labsmodels.pro b/src/imports/labsmodels/labsmodels.pro index 951f6fbce8..9fc52ce9cc 100644 --- a/src/imports/labsmodels/labsmodels.pro +++ b/src/imports/labsmodels/labsmodels.pro @@ -1,7 +1,7 @@ CXX_MODULE = qml TARGET = labsmodelsplugin TARGETPATH = Qt/labs/qmlmodels -QML_IMPORT_VERSION = 1.0 +QML_IMPORT_VERSION = $$QT_VERSION QT = qml-private qmlmodels-private diff --git a/src/imports/labsmodels/qqmldelegatecomponent_p.h b/src/imports/labsmodels/qqmldelegatecomponent_p.h index 6f3170e19a..9655d1baf9 100644 --- a/src/imports/labsmodels/qqmldelegatecomponent_p.h +++ b/src/imports/labsmodels/qqmldelegatecomponent_p.h @@ -108,6 +108,7 @@ class QQmlDelegateChooser : public QQmlAbstractDelegateComponent Q_PROPERTY(QQmlListProperty<QQmlDelegateChoice> choices READ choices CONSTANT) Q_CLASSINFO("DefaultProperty", "choices") QML_NAMED_ELEMENT(DelegateChooser) + QML_ADDED_IN_VERSION(1, 0) public: QString role() const { return m_role; } diff --git a/src/imports/settings/settings.pro b/src/imports/settings/settings.pro index a67a268f91..6fd8b8cddd 100644 --- a/src/imports/settings/settings.pro +++ b/src/imports/settings/settings.pro @@ -1,7 +1,7 @@ CXX_MODULE = qml TARGET = qmlsettingsplugin TARGETPATH = Qt/labs/settings -QML_IMPORT_VERSION = 1.1 +QML_IMPORT_VERSION = $$QT_VERSION QT = core qml diff --git a/src/imports/sharedimage/qsharedimageloader_p.h b/src/imports/sharedimage/qsharedimageloader_p.h index 4b0e989c29..ce10d0d72c 100644 --- a/src/imports/sharedimage/qsharedimageloader_p.h +++ b/src/imports/sharedimage/qsharedimageloader_p.h @@ -43,6 +43,7 @@ #include <QImage> #include <QVariant> #include <QLoggingCategory> +#include <qqml.h> QT_BEGIN_NAMESPACE @@ -55,6 +56,10 @@ class QSharedImageLoader : public QObject Q_OBJECT Q_DECLARE_PRIVATE(QSharedImageLoader) + // We need to provide some type, in order to mention the 1.0 version. + QML_ANONYMOUS + QML_ADDED_IN_VERSION(1, 0) + public: typedef QVector<QVariant> ImageParameters; diff --git a/src/imports/sharedimage/sharedimage.pro b/src/imports/sharedimage/sharedimage.pro index c91ccd593d..cee4c3465e 100644 --- a/src/imports/sharedimage/sharedimage.pro +++ b/src/imports/sharedimage/sharedimage.pro @@ -1,7 +1,7 @@ CXX_MODULE = qml TARGET = sharedimageplugin TARGETPATH = Qt/labs/sharedimage -QML_IMPORT_VERSION = 1.0 +QML_IMPORT_VERSION = $$QT_VERSION QT *= quick-private qml gui-private core-private |