summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2010-04-08 14:06:33 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2010-04-08 14:06:33 (GMT)
commitd64b2ad5417fec750cd3f31364fb216e61acb8cf (patch)
tree69d89d67c1307a89745bebc40fea757b76926c0c /src/opengl
parent7b3f1a992e25739a8a28cf0470ba58fd31a46e7b (diff)
downloadQt-d64b2ad5417fec750cd3f31364fb216e61acb8cf.zip
Qt-d64b2ad5417fec750cd3f31364fb216e61acb8cf.tar.gz
Qt-d64b2ad5417fec750cd3f31364fb216e61acb8cf.tar.bz2
Make a top-level QGLWidget work once, 50% of the time
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl.cpp6
-rw-r--r--src/opengl/qgl_lite.cpp12
2 files changed, 14 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 1e522d6..6c6f6d9 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1361,6 +1361,10 @@ QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
}
}
+#ifdef Q_WS_LITE
+ hasOpenGL(); // ### I have no idea why this is needed here, but it makes things work for testlite
+#endif
+
QString versionString(QLatin1String(reinterpret_cast<const char*>(glGetString(GL_VERSION))));
OpenGLVersionFlags versionFlags = qOpenGLVersionFlagsFromString(versionString);
if (currentCtx) {
@@ -3907,7 +3911,7 @@ void QGLWidget::resizeOverlayGL(int, int)
/*! \fn bool QGLWidget::event(QEvent *e)
\reimp
*/
-#if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS)
+#if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS) && !defined(Q_WS_LITE)
bool QGLWidget::event(QEvent *e)
{
Q_D(QGLWidget);
diff --git a/src/opengl/qgl_lite.cpp b/src/opengl/qgl_lite.cpp
index a46593e..2a70545 100644
--- a/src/opengl/qgl_lite.cpp
+++ b/src/opengl/qgl_lite.cpp
@@ -232,17 +232,23 @@ void QGLWidget::setMouseTracking(bool enable)
Q_UNUSED(enable);
}
+bool QGLWidget::event(QEvent *e)
+{
+ QWidget::event(e);
+}
+
void QGLWidget::resizeEvent(QResizeEvent *)
{
Q_D(QGLWidget);
if (!isValid())
return;
makeCurrent();
- if (!d->glcx->initialized())
- glInit();
- resizeGL(width(), height());
+// if (!d->glcx->initialized())
+// glInit();
+// resizeGL(width(), height());
}
+
const QGLContext* QGLWidget::overlayContext() const
{
return 0;