summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-11-04 13:26:04 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-11-04 13:26:04 (GMT)
commit7905101fb5ef18c776be515b9287356b1efc5ceb (patch)
tree3d865c288848891c1790b8dadcf7128410b233c1 /src/gui/graphicsview/qgraphicsview.cpp
parent49d551b24dbb9131db4a5769b8ddd205bbf99093 (diff)
parent94b595f37b3a49d44d1a795e5f2b003ac921d4b7 (diff)
downloadQt-7905101fb5ef18c776be515b9287356b1efc5ceb.zip
Qt-7905101fb5ef18c776be515b9287356b1efc5ceb.tar.gz
Qt-7905101fb5ef18c776be515b9287356b1efc5ceb.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index f72aa8a..c88f678 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -281,6 +281,7 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
#include <QtGui/qstyleoption.h>
#include <QtGui/qinputcontext.h>
#ifdef Q_WS_X11
+#include <QtGui/qpaintengine.h>
#include <private/qt_x11_p.h>
#endif
@@ -3294,7 +3295,12 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
backgroundPainter.setClipRegion(d->backgroundPixmapExposed, Qt::ReplaceClip);
if (viewTransformed)
backgroundPainter.setTransform(viewTransform);
- backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source);
+#ifdef Q_WS_X11
+#undef X11
+ if (backgroundPainter.paintEngine()->type() != QPaintEngine::X11)
+#define X11 qt_x11Data
+#endif
+ backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source);
drawBackground(&backgroundPainter, exposedSceneRect);
d->backgroundPixmapExposed = QRegion();
}