From 9a5b0265d0585c2a4cb46f9c69d4626a6cfe465e Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Tue, 1 Jul 2014 12:54:34 +0200 Subject: [PATCH] Fix compiling with -no-opengl Task-number: QTBUG-39982 Change-Id: Ib3fc49c89472fbaf77abea0b463e380725440613 Reviewed-by: Laszlo Agocs --- src/widgets/kernel/qwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 6a46731c51..fbf6958923 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -5511,7 +5511,9 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP if (renderToTexture) { // This widget renders into a texture which is composed later. We just need to // punch a hole in the backingstore, so the texture will be visible. +#ifndef QT_NO_OPENGL QPainter p(q); + if (backingStore) { p.setCompositionMode(QPainter::CompositionMode_Source); p.fillRect(q->rect(), Qt::transparent); @@ -5519,6 +5521,7 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP // We are not drawing to a backingstore: fall back to QImage p.drawImage(q->rect(), grabFramebuffer()); } +#endif } else { //actually send the paint event QPaintEvent e(toBePainted);