From 1cea1e158e212f7182586c2963d7e28747d0140c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 17 Jul 2009 11:48:14 +1000 Subject: Remove non-functioning opaque property. --- demos/declarative/flickr/flickr.qml | 2 +- demos/declarative/flickr/flickr2.qml | 2 +- examples/declarative/velocity/Day.qml | 1 - src/declarative/fx/qfximage.cpp | 38 ----------------------------------- src/declarative/fx/qfximage.h | 5 +---- src/declarative/fx/qfxitem.h | 3 +-- 6 files changed, 4 insertions(+), 47 deletions(-) diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index edf1095..7f45b1c 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -120,7 +120,7 @@ Item { anchors.fill: parent - Image { source: "content/pics/background.png"; opaque: true; anchors.fill: parent } + Image { source: "content/pics/background.png"; anchors.fill: parent } Loading { anchors.centeredIn: parent; visible: FeedModel.status != 0 } diff --git a/demos/declarative/flickr/flickr2.qml b/demos/declarative/flickr/flickr2.qml index d6d5c95..95bca38 100644 --- a/demos/declarative/flickr/flickr2.qml +++ b/demos/declarative/flickr/flickr2.qml @@ -180,7 +180,7 @@ Item { id: Background property var imageDetails: ImageDetails - Image { source: "content/pics/background.png"; opaque: true } + Image { source: "content/pics/background.png" } GridView { id: PhotoGridView; model: MyVisualModel.parts.gridView diff --git a/examples/declarative/velocity/Day.qml b/examples/declarative/velocity/Day.qml index 8f78822..5154c91 100644 --- a/examples/declarative/velocity/Day.qml +++ b/examples/declarative/velocity/Day.qml @@ -11,7 +11,6 @@ Rect { x: 10 y: 10 source: "cork.jpg" - opaque: true } Text { x: 20 diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp index 148c269..f57782c 100644 --- a/src/declarative/fx/qfximage.cpp +++ b/src/declarative/fx/qfximage.cpp @@ -219,44 +219,6 @@ void QFxImage::setTiled(bool tile) d->tiled = tile; } -/*! - \qmlproperty bool Image::opaque - - Set this property if you know that the image is opaque to give your - application a significant performance boost. - - \note - This is a performance hint to Qt Declarative. Unfortunately whether or not an image - is opaque is not automatically detected. Setting this property to true when - the image is not opaque will lead to drawing artifacts. However, leaving it as - false will always work correctly - although possibly not at maximum performance. - */ - -/*! - \property QFxImage::opaque - \brief whether the image is opaque (non-transparent). - - This property is provided purely for the purpose of optimization. An opaque - image can be optimized more than a non-opaque one. -*/ -bool QFxImage::isOpaque() const -{ - Q_D(const QFxImage); - return d->opaque; -} - -void QFxImage::setOpaque(bool o) -{ - Q_D(QFxImage); - if (o == d->opaque) - return; - d->opaque = o; - - setOptions(IsOpaque, o); - - update(); -} - void QFxImage::componentComplete() { QFxItem::componentComplete(); diff --git a/src/declarative/fx/qfximage.h b/src/declarative/fx/qfximage.h index 925a520..378c20d 100644 --- a/src/declarative/fx/qfximage.h +++ b/src/declarative/fx/qfximage.h @@ -64,8 +64,8 @@ class Q_DECLARATIVE_EXPORT QFxImage : public QFxItem Q_PROPERTY(QFxScaleGrid *scaleGrid READ scaleGrid) Q_PROPERTY(bool tile READ isTiled WRITE setTiled) Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap DESIGNABLE false) - Q_PROPERTY(bool opaque READ isOpaque WRITE setOpaque) Q_PROPERTY(bool smooth READ smoothTransform WRITE setSmoothTransform) + public: QFxImage(QFxItem *parent=0); ~QFxImage(); @@ -78,9 +78,6 @@ public: QPixmap pixmap() const; void setPixmap(const QPixmap &); - bool isOpaque() const; - void setOpaque(bool); - bool smoothTransform() const; void setSmoothTransform(bool); diff --git a/src/declarative/fx/qfxitem.h b/src/declarative/fx/qfxitem.h index bfe8521..c125514 100644 --- a/src/declarative/fx/qfxitem.h +++ b/src/declarative/fx/qfxitem.h @@ -149,8 +149,7 @@ public: SimpleItem = 0x00000020, IsFocusPanel = 0x00000040, IsFocusRealm = 0x00000080, - AcceptsInputMethods = 0x00000100, - IsOpaque = 0x00000200 }; + AcceptsInputMethods = 0x00000100 }; Q_DECLARE_FLAGS(Options, Option) enum TransformOrigin { -- cgit v0.12