diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-08-16 15:26:45 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-10-10 14:11:49 +0000 |
commit | e4dfc6d749957bdd88a48b95aa67e59d93fd4b7b (patch) | |
tree | cf1543efdaf7d2e34e4653d9533d9491bee25153 /src | |
parent | 4ee2bc4e9c05d8daec8b04412a0b7c0264fbc1a4 (diff) | |
download | qtdeclarative-e4dfc6d749957bdd88a48b95aa67e59d93fd4b7b.tar.gz |
Make the Canvas item configurable
Change-Id: I22a84098bf3a7e2d48f09981c9c953f2e53e6cc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/configure.json | 13 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcanvascontext_p.h | 5 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem_p.h | 4 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcontext2d_p.h | 5 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h | 4 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcontext2dtexture_p.h | 4 | ||||
-rw-r--r-- | src/quick/items/context2d/qquickcontext2dtile_p.h | 4 | ||||
-rw-r--r-- | src/quick/items/items.pri | 3 | ||||
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 4 |
9 files changed, 41 insertions, 5 deletions
diff --git a/src/quick/configure.json b/src/quick/configure.json index de75873972..00e0b52905 100644 --- a/src/quick/configure.json +++ b/src/quick/configure.json @@ -7,7 +7,8 @@ "commandline": { "options": { - "d3d12": "boolean" + "d3d12": "boolean", + "quick-canvas": "boolean" } }, @@ -27,6 +28,13 @@ "output": [ "privateFeature" ] + }, + "quick-canvas": { + "label": "Canvas item", + "purpose": "Provides the Qt Quick Canvas Item", + "output": [ + "privateFeature" + ] } }, @@ -34,7 +42,8 @@ { "section": "Qt Quick", "entries": [ - "d3d12" + "d3d12", + "quick-canvas" ] } ] diff --git a/src/quick/items/context2d/qquickcanvascontext_p.h b/src/quick/items/context2d/qquickcanvascontext_p.h index 4f71770e1a..0746b7dcd3 100644 --- a/src/quick/items/context2d/qquickcanvascontext_p.h +++ b/src/quick/items/context2d/qquickcanvascontext_p.h @@ -51,10 +51,13 @@ // We mean it. // +#include <private/qtquickglobal_p.h> + +QT_REQUIRE_CONFIG(quick_canvas); + #include <QtQuick/qquickitem.h> #include <private/qv8engine_p.h> - QT_BEGIN_NAMESPACE class QQuickCanvasItem; diff --git a/src/quick/items/context2d/qquickcanvasitem_p.h b/src/quick/items/context2d/qquickcanvasitem_p.h index 4f94393a45..8196debef1 100644 --- a/src/quick/items/context2d/qquickcanvasitem_p.h +++ b/src/quick/items/context2d/qquickcanvasitem_p.h @@ -51,6 +51,10 @@ // We mean it. // +#include <private/qtquickglobal_p.h> + +QT_REQUIRE_CONFIG(quick_canvas); + #include <QtQuick/qquickitem.h> #include <private/qv8engine_p.h> #include <private/qqmlrefcount_p.h> diff --git a/src/quick/items/context2d/qquickcontext2d_p.h b/src/quick/items/context2d/qquickcontext2d_p.h index b526c8320d..e897263b6f 100644 --- a/src/quick/items/context2d/qquickcontext2d_p.h +++ b/src/quick/items/context2d/qquickcontext2d_p.h @@ -51,7 +51,10 @@ // We mean it. // -#include <QtQuick/qtquickglobal.h> +#include <private/qtquickglobal_p.h> + +QT_REQUIRE_CONFIG(quick_canvas); + #include <QtQml/qqml.h> #include <QtQml/qqmlcomponent.h> #include <private/qquickcanvascontext_p.h> diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h index f281cec2d5..3663e49f10 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer_p.h @@ -51,6 +51,10 @@ // We mean it. // +#include <private/qtquickglobal_p.h> + +QT_REQUIRE_CONFIG(quick_canvas); + #include <QtCore/qmutex.h> #include "qquickcontext2d_p.h" diff --git a/src/quick/items/context2d/qquickcontext2dtexture_p.h b/src/quick/items/context2d/qquickcontext2dtexture_p.h index ed38382892..6a5d4e8b09 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture_p.h +++ b/src/quick/items/context2d/qquickcontext2dtexture_p.h @@ -51,6 +51,10 @@ // We mean it. // +#include <private/qtquickglobal_p.h> + +QT_REQUIRE_CONFIG(quick_canvas); + #include <QtQuick/qsgtexture.h> #include "qquickcanvasitem_p.h" #include "qquickcontext2d_p.h" diff --git a/src/quick/items/context2d/qquickcontext2dtile_p.h b/src/quick/items/context2d/qquickcontext2dtile_p.h index a87202daae..2f3fdeb54f 100644 --- a/src/quick/items/context2d/qquickcontext2dtile_p.h +++ b/src/quick/items/context2d/qquickcontext2dtile_p.h @@ -51,6 +51,10 @@ // We mean it. // +#include <private/qtquickglobal_p.h> + +QT_REQUIRE_CONFIG(quick_canvas); + #include "qquickcontext2d_p.h" #ifndef QT_NO_OPENGL # include <QOpenGLFramebufferObject> diff --git a/src/quick/items/items.pri b/src/quick/items/items.pri index d91705451e..eb9afdcd0e 100644 --- a/src/quick/items/items.pri +++ b/src/quick/items/items.pri @@ -174,4 +174,5 @@ qtConfig(opengl(es1|es2)?) { RESOURCES += \ $$PWD/items.qrc -include(context2d/context2d.pri) +qtConfig(quick-canvas): \ + include(context2d/context2d.pri) diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index 1bc1aebe4f..6bb6cdddba 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -71,8 +71,10 @@ #include "qquickitemanimation_p.h" #include <QtQuick/private/qquickshadereffectsource_p.h> //#include <private/qquickpincharea_p.h> +#if QT_CONFIG(quick_canvas) #include <QtQuick/private/qquickcanvasitem_p.h> #include <QtQuick/private/qquickcontext2d_p.h> +#endif #include "qquickitemgrabresult.h" #include "qquicksprite_p.h" #include "qquickspritesequence_p.h" @@ -216,7 +218,9 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterUncreatableType<QQuickPaintedItem>("QtQuick", 2, 0, "PaintedItem", QQuickPaintedItem::tr("Cannot create instance of abstract class PaintedItem")); +#if QT_CONFIG(quick_canvas) qmlRegisterType<QQuickCanvasItem>("QtQuick", 2, 0, "Canvas"); +#endif qmlRegisterType<QQuickSprite>("QtQuick", 2, 0, "Sprite"); qmlRegisterType<QQuickAnimatedSprite>("QtQuick", 2, 0, "AnimatedSprite"); |