diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-02-07 13:45:07 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-02-12 18:15:42 +0100 |
commit | 7f7bf177f41d7824aecee9f046a8a63ef4d82521 (patch) | |
tree | 7c79982a3b3eb6a5e91f7751704918b25bb81b10 /src/quick/items/qquickitemsmodule_p.h | |
parent | 8791fc19f04d51d1efc077205e39a11047e732b5 (diff) |
Provide a macro for qmlRegisterTypeNotAvailable
That is, register QQmlTypeNotAvailable as foreign type under the name
given as parameter. Also, statically register QQuickAnimatedImage as
unavailable in case of !quick_animatedimage and register it for the
right version.
Task-number: QTBUG-68796
Change-Id: I2ea292d2aeda66d8ce43b3bccbd3d21663330bd6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/quick/items/qquickitemsmodule_p.h')
-rw-r--r-- | src/quick/items/qquickitemsmodule_p.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemsmodule_p.h b/src/quick/items/qquickitemsmodule_p.h index 6ceb0d56e6..28dff65dff 100644 --- a/src/quick/items/qquickitemsmodule_p.h +++ b/src/quick/items/qquickitemsmodule_p.h @@ -51,6 +51,7 @@ // We mean it. // +#include <private/qtquickglobal_p.h> #include <QtGui/qevent.h> #include <qqml.h> @@ -71,6 +72,17 @@ struct QPointingDeviceUniqueIdForeign QML_UNCREATABLE("PointingDeviceUniqueId is only available via read-only properties.") }; +#if !QT_CONFIG(quick_animatedimage) +struct QQuickAnimatedImageNotAvailable +{ + Q_GADGET + QML_UNAVAILABLE + QML_NAMED_ELEMENT(AnimatedImage) + QML_ADDED_IN_VERSION(2, 0) + QML_UNCREATABLE("Qt was built without support for QMovie.") +}; +#endif + QT_END_NAMESPACE #endif // QQUICKITEMSMODULE_P_H |