summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@nokia.com>2009-06-09 08:42:46 (GMT)
committerThomas Hartmann <Thomas.Hartmann@nokia.com>2009-06-09 08:46:03 (GMT)
commit29496148abe8506fbf50c99e9a210095c5115a14 (patch)
tree32f4b5d08bc99afc302087a376c0020f70c07fe9 /src/declarative
parent1ef0d84c8e5d706e60e487fc801f90bbf5fddaa6 (diff)
downloadQt-29496148abe8506fbf50c99e9a210095c5115a14.zip
Qt-29496148abe8506fbf50c99e9a210095c5115a14.tar.gz
Qt-29496148abe8506fbf50c99e9a210095c5115a14.tar.bz2
Compile fix for !QFX_RENDER_OPENGL
Some QFX_RENDER_OPENGL guards were missing and getPen had to be replaced with d->pen in some places Reviewed-by: Kai Koehne
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/canvas/qsimplecanvasitem.h2
-rw-r--r--src/declarative/fx/qfximage.cpp2
-rw-r--r--src/declarative/fx/qfxrect.cpp6
-rw-r--r--src/declarative/fx/qfxrect_p.h7
4 files changed, 12 insertions, 5 deletions
diff --git a/src/declarative/canvas/qsimplecanvasitem.h b/src/declarative/canvas/qsimplecanvasitem.h
index e62c56d..dce3007 100644
--- a/src/declarative/canvas/qsimplecanvasitem.h
+++ b/src/declarative/canvas/qsimplecanvasitem.h
@@ -45,7 +45,9 @@
#include <QtDeclarative/qfxglobal.h>
#include <QtDeclarative/qmldebuggerstatus.h>
#include <QtDeclarative/qsimplecanvas.h>
+#if defined(QFX_RENDER_OPENGL)
#include <QtDeclarative/gltexture.h>
+#endif
#include <QtCore/qobject.h>
#include <QtGui/qgraphicsitem.h>
diff --git a/src/declarative/fx/qfximage.cpp b/src/declarative/fx/qfximage.cpp
index c5e7e89..224c25e 100644
--- a/src/declarative/fx/qfximage.cpp
+++ b/src/declarative/fx/qfximage.cpp
@@ -127,10 +127,12 @@ QFxImage::~QFxImage()
Q_D(QFxImage);
if (d->sciReply)
d->sciReply->deleteLater();
+#if defined(QFX_RENDER_OPENGL)
if (d->tex) {
d->tex->release();
d->tex = 0;
}
+#endif
}
/*!
diff --git a/src/declarative/fx/qfxrect.cpp b/src/declarative/fx/qfxrect.cpp
index eacc85e..f55357f 100644
--- a/src/declarative/fx/qfxrect.cpp
+++ b/src/declarative/fx/qfxrect.cpp
@@ -497,7 +497,7 @@ void QFxRect::generateRoundedRect()
QPainter p(&(d->rectImage));
p.setRenderHint(QPainter::Antialiasing);
if (d->pen && d->pen->isValid()) {
- QPen pn(QColor(getPen()->color()), getPen()->width());
+ QPen pn(QColor(d->pen->color()), d->pen->width());
p.setPen(pn);
} else {
p.setPen(Qt::NoPen);
@@ -517,7 +517,7 @@ void QFxRect::generateBorderedRect()
QPainter p(&(d->rectImage));
p.setRenderHint(QPainter::Antialiasing);
if (d->pen && d->pen->isValid()) {
- QPen pn(QColor(getPen()->color()), getPen()->width());
+ QPen pn(QColor(d->pen->color()), d->pen->width());
p.setPen(pn);
} else {
p.setPen(Qt::NoPen);
@@ -604,7 +604,7 @@ void QFxRect::drawRect(QPainter &p)
QPainter::RenderHints oldHints = p.renderHints();
p.setRenderHint(QPainter::Antialiasing);
if (d->pen && d->pen->isValid()) {
- QPen pn(QColor(getPen()->color()), getPen()->width());
+ QPen pn(QColor(d->pen->color()), d->pen->width());
p.setPen(pn);
} else {
p.setPen(Qt::NoPen);
diff --git a/src/declarative/fx/qfxrect_p.h b/src/declarative/fx/qfxrect_p.h
index d68eb4e..f662fac 100644
--- a/src/declarative/fx/qfxrect_p.h
+++ b/src/declarative/fx/qfxrect_p.h
@@ -68,8 +68,11 @@ class QFxRectPrivate : public QFxItemPrivate
Q_DECLARE_PUBLIC(QFxRect)
public:
- QFxRectPrivate()
- : rectTexture(0), gradient(0), pen(0), radius(0)
+ QFxRectPrivate() :
+#if defined(QFX_RENDER_OPENGL)
+ rectTexture(0),
+#endif //QFX_RENDER_OPENGL
+ gradient(0), pen(0), radius(0)
{
}