From 29496148abe8506fbf50c99e9a210095c5115a14 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 9 Jun 2009 10:42:46 +0200 Subject: 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 --- src/declarative/canvas/qsimplecanvasitem.h | 2 ++ src/declarative/fx/qfximage.cpp | 2 ++ src/declarative/fx/qfxrect.cpp | 6 +++--- src/declarative/fx/qfxrect_p.h | 7 +++++-- 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 #include #include +#if defined(QFX_RENDER_OPENGL) #include +#endif #include #include 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) { } -- cgit v0.12