diff options
-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 |