summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qopenglwindow.h6
-rw-r--r--src/plugins/platforms/platforms.pro2
-rw-r--r--src/widgets/kernel/qopenglwidget.h6
-rw-r--r--src/widgets/kernel/qwidget.cpp8
-rw-r--r--src/widgets/kernel/qwidgetbackingstore.cpp5
-rw-r--r--src/widgets/widgets/qabstractscrollarea.cpp2
6 files changed, 28 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglwindow.h b/src/gui/kernel/qopenglwindow.h
index 294bd90116..e30de3b6ac 100644
--- a/src/gui/kernel/qopenglwindow.h
+++ b/src/gui/kernel/qopenglwindow.h
@@ -42,6 +42,10 @@
#ifndef QOPENGLWINDOW_H
#define QOPENGLWINDOW_H
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_OPENGL
+
#include <QtGui/QPaintDeviceWindow>
#include <QtGui/QOpenGLContext>
#include <QtGui/QImage>
@@ -97,4 +101,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_OPENGL
+
#endif
diff --git a/src/plugins/platforms/platforms.pro b/src/plugins/platforms/platforms.pro
index 584efa1665..69f6f308b5 100644
--- a/src/plugins/platforms/platforms.pro
+++ b/src/plugins/platforms/platforms.pro
@@ -35,7 +35,7 @@ contains(QT_CONFIG, directfb) {
SUBDIRS += directfb
}
-contains(QT_CONFIG, kms) {
+contains(QT_CONFIG, kms):contains(QT_CONFIG, opengl) {
SUBDIRS += kms
}
diff --git a/src/widgets/kernel/qopenglwidget.h b/src/widgets/kernel/qopenglwidget.h
index 28d802e1f4..f706ea7567 100644
--- a/src/widgets/kernel/qopenglwidget.h
+++ b/src/widgets/kernel/qopenglwidget.h
@@ -42,6 +42,10 @@
#ifndef QOPENGLWIDGET_H
#define QOPENGLWIDGET_H
+#include <QtCore/qglobal.h>
+
+#ifndef QT_NO_OPENGL
+
#include <QtWidgets/QWidget>
#include <QtGui/QSurfaceFormat>
#include <QtGui/qopengl.h>
@@ -97,4 +101,6 @@ private:
QT_END_NAMESPACE
+#endif // QT_NO_OPENGL
+
#endif // QOPENGLWIDGET_H
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 34adea866e..21278a0ba9 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -5486,22 +5486,30 @@ void QWidgetPrivate::drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QP
//paint the background
if ((asRoot || q->autoFillBackground() || onScreen || q->testAttribute(Qt::WA_StyledBackground))
&& !q->testAttribute(Qt::WA_OpaquePaintEvent) && !q->testAttribute(Qt::WA_NoSystemBackground)) {
+#ifndef QT_NO_OPENGL
beginBackingStorePainting();
+#endif
QPainter p(q);
paintBackground(&p, toBePainted, (asRoot || onScreen) ? flags | DrawAsRoot : 0);
+#ifndef QT_NO_OPENGL
endBackingStorePainting();
+#endif
}
if (!sharedPainter)
setSystemClip(pdev, toBePainted.translated(offset));
if (!onScreen && !asRoot && !isOpaque && q->testAttribute(Qt::WA_TintedBackground)) {
+#ifndef QT_NO_OPENGL
beginBackingStorePainting();
+#endif
QPainter p(q);
QColor tint = q->palette().window().color();
tint.setAlphaF(qreal(.6));
p.fillRect(toBePainted.boundingRect(), tint);
+#ifndef QT_NO_OPENGL
endBackingStorePainting();
+#endif
}
}
diff --git a/src/widgets/kernel/qwidgetbackingstore.cpp b/src/widgets/kernel/qwidgetbackingstore.cpp
index 2a968939e4..103e244593 100644
--- a/src/widgets/kernel/qwidgetbackingstore.cpp
+++ b/src/widgets/kernel/qwidgetbackingstore.cpp
@@ -1158,6 +1158,7 @@ void QWidgetBackingStore::doSync()
return;
}
+#ifndef QT_NO_OPENGL
// There is something other dirty than the renderToTexture widgets.
// Now it is time to include the renderToTexture ones among the others.
if (widgetTextures && widgetTextures->count()) {
@@ -1167,6 +1168,8 @@ void QWidgetBackingStore::doSync()
toClean += rect;
}
}
+#endif
+
// The dirtyRenderToTextureWidgets list is useless here, so just reset. As
// unintuitive as it is, we need to send paint events to renderToTexture
// widgets always when something (any widget) needs to be updated, even if
@@ -1249,8 +1252,10 @@ void QWidgetBackingStore::flush(QWidget *widget)
QWidget *target = widget ? widget : tlw;
qt_flush(target, dirtyOnScreen, store, tlw, tlwOffset, widgetTextures, this);
dirtyOnScreen = QRegion();
+#ifndef QT_NO_OPENGL
if (widgetTextures && widgetTextures->count())
return;
+#endif
}
if (!dirtyOnScreenWidgets || dirtyOnScreenWidgets->isEmpty()) {
diff --git a/src/widgets/widgets/qabstractscrollarea.cpp b/src/widgets/widgets/qabstractscrollarea.cpp
index 1b48441993..0e78c1493b 100644
--- a/src/widgets/widgets/qabstractscrollarea.cpp
+++ b/src/widgets/widgets/qabstractscrollarea.cpp
@@ -1191,10 +1191,12 @@ bool QAbstractScrollArea::viewportEvent(QEvent *e)
case QEvent::DragMove:
case QEvent::DragLeave:
#endif
+#ifndef QT_NO_OPENGL
// QOpenGLWidget needs special support because it has to know
// its size has changed, so that it can resize its fbo.
if (e->type() == QEvent::Resize)
QWidgetPrivate::get(viewport())->resizeViewportFramebuffer();
+#endif
return QFrame::event(e);
case QEvent::LayoutRequest:
#ifndef QT_NO_GESTURES