diff options
author | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-02 13:08:20 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-03-03 08:03:42 +0000 |
commit | e0fda85664e363827e5cfbea190c4a8311262944 (patch) | |
tree | 029c1783bded18f776fa6316f369f53ae5c3252c | |
parent | ba81daa6f58992f0724f0a43590fae3453d3948e (diff) | |
download | qtquickcontrols-e0fda85664e363827e5cfbea190c4a8311262944.tar.gz |
Build fix for -no-feature-picture
Change-Id: I4ace999ad45dc299a9a0d9b24c87823c762f3821
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/extras/plugin.cpp | 2 | ||||
-rw-r--r-- | src/extras/qquickpicture.cpp | 3 | ||||
-rw-r--r-- | src/extras/qquickpicture_p.h | 4 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/extras/plugin.cpp b/src/extras/plugin.cpp index 960102ab..a9e23321 100644 --- a/src/extras/plugin.cpp +++ b/src/extras/plugin.cpp @@ -98,7 +98,9 @@ void QtQuickExtrasPlugin::registerTypes(const char *uri) // register 1.3 qmlRegisterUncreatableType<QQuickTriggerMode>(uri, 1, 3, "TriggerMode", QLatin1String("Do not create objects of type TriggerMode")); // register 1.4 +#if QT_CONFIG(picture) qmlRegisterType<QQuickPicture>(uri, 1, 4, "Picture"); +#endif } void QtQuickExtrasPlugin::initializeEngine(QQmlEngine *engine, const char *uri) diff --git a/src/extras/qquickpicture.cpp b/src/extras/qquickpicture.cpp index 0a145b53..0a778288 100644 --- a/src/extras/qquickpicture.cpp +++ b/src/extras/qquickpicture.cpp @@ -39,6 +39,8 @@ #include "qquickpicture_p.h" +#if QT_CONFIG(picture) + #include <QQmlFile> #include <QDebug> @@ -157,3 +159,4 @@ void QQuickPicture::resetColor() setColor(QColor()); } +#endif // QT_CONFIG(picture) diff --git a/src/extras/qquickpicture_p.h b/src/extras/qquickpicture_p.h index 986dcc38..9c16a232 100644 --- a/src/extras/qquickpicture_p.h +++ b/src/extras/qquickpicture_p.h @@ -44,6 +44,8 @@ #include <QPainter> #include <QPicture> +#if QT_CONFIG(picture) + class QQuickPicture : public QQuickPaintedItem { Q_OBJECT @@ -72,4 +74,6 @@ private: QPicture mPicture; }; +#endif // QT_CONFIG(picture) + #endif // QQUICKPICTURE_H |