From c6483baf226e9e698983aa596761825ad4a8a698 Mon Sep 17 00:00:00 2001 From: Tasuku Suzuki Date: Sun, 11 Apr 2010 19:22:08 +0900 Subject: Fix QT_NO_GRAPHICSEFFECT --- src/declarative/graphicsitems/qdeclarativeeffects_p.h | 2 ++ src/declarative/graphicsitems/qdeclarativeitem.h | 2 ++ src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 12 +++++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeeffects_p.h b/src/declarative/graphicsitems/qdeclarativeeffects_p.h index 73eec6a..0de5854 100644 --- a/src/declarative/graphicsitems/qdeclarativeeffects_p.h +++ b/src/declarative/graphicsitems/qdeclarativeeffects_p.h @@ -56,10 +56,12 @@ #include #include +#ifndef QT_NO_GRAPHICSEFFECT QML_DECLARE_TYPE(QGraphicsEffect) QML_DECLARE_TYPE(QGraphicsBlurEffect) QML_DECLARE_TYPE(QGraphicsColorizeEffect) QML_DECLARE_TYPE(QGraphicsDropShadowEffect) QML_DECLARE_TYPE(QGraphicsOpacityEffect) +#endif #endif // QDECLARATIVEEFFECTS_P_H diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h index 917e480..0e03e6d 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.h +++ b/src/declarative/graphicsitems/qdeclarativeitem.h @@ -91,7 +91,9 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe Q_PROPERTY(QDeclarativeListProperty transform READ transform DESIGNABLE false FINAL) Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged) Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged) +#ifndef QT_NO_GRAPHICSEFFECT Q_PROPERTY(QGraphicsEffect *effect READ graphicsEffect WRITE setGraphicsEffect) +#endif Q_ENUMS(TransformOrigin) Q_CLASSINFO("DefaultProperty", "data") diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 7989a27..ab57860 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -83,12 +83,9 @@ void QDeclarativeItemModule::defineModule() { qmlRegisterType("Qt",4,6,"AnimatedImage"); - qmlRegisterType("Qt",4,6,"Blur"); qmlRegisterType("Qt",4,6,"BorderImage"); - qmlRegisterType("Qt",4,6,"Colorize"); qmlRegisterType("Qt",4,6,"Column"); qmlRegisterType("Qt",4,6,"Drag"); - qmlRegisterType("Qt",4,6,"DropShadow"); qmlRegisterType("Qt",4,6,"Flickable"); qmlRegisterType("Qt",4,6,"Flipable"); qmlRegisterType("Qt",4,6,"Flow"); @@ -107,7 +104,6 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("Qt",4,6,"ListView"); qmlRegisterType("Qt",4,6,"Loader"); qmlRegisterType("Qt",4,6,"MouseArea"); - qmlRegisterType("Qt",4,6,"Opacity"); qmlRegisterType("Qt",4,6,"Path"); qmlRegisterType("Qt",4,6,"PathAttribute"); qmlRegisterType("Qt",4,6,"PathCubic"); @@ -134,7 +130,6 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("Qt",4,6,"VisualItemModel"); qmlRegisterType(); - qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); @@ -148,6 +143,13 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); +#ifndef QT_NO_GRAPHICSEFFECT + qmlRegisterType(); + qmlRegisterType("Qt",4,6,"Blur"); + qmlRegisterType("Qt",4,6,"Colorize"); + qmlRegisterType("Qt",4,6,"DropShadow"); + qmlRegisterType("Qt",4,6,"Opacity"); +#endif #ifdef QT_WEBKIT_LIB qmlRegisterType(); #endif -- cgit v0.12