summaryrefslogtreecommitdiffstats
path: root/tests/manual/diaglib/glinfo.cpp
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <[email protected]>2020-02-19 11:14:46 +0100
committerJohan Klokkhammer Helsing <[email protected]>2020-02-28 08:16:32 +0100
commitd2068b24e4b2e96832af154d02e19b5333880c21 (patch)
treecf5f383cf6bee2ed3f86780c097657ebb2aa4259 /tests/manual/diaglib/glinfo.cpp
parent963017f58884dfd929249c5546aadbb0f74501e8 (diff)
Manual tests: Port diaglib from QGL to QOpenGL
Task-number: QTBUG-74408 Change-Id: I25dedd69c6927e5d627f8104c404e23ce68487d9 Reviewed-by: Eirik Aavitsland <[email protected]>
Diffstat (limited to 'tests/manual/diaglib/glinfo.cpp')
-rw-r--r--tests/manual/diaglib/glinfo.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/manual/diaglib/glinfo.cpp b/tests/manual/diaglib/glinfo.cpp
index a955dd80ac0..d8aec5298a9 100644
--- a/tests/manual/diaglib/glinfo.cpp
+++ b/tests/manual/diaglib/glinfo.cpp
@@ -28,12 +28,11 @@
#include "glinfo.h"
-#include <QtOpenGL/QGLFunctions>
-#include <QtOpenGL/QGLWidget>
+#include <QOpenGLFunctions>
+#include <QtOpenGLWidgets/QOpenGLWidget>
#if QT_VERSION > 0x050000
# if QT_VERSION >= 0x050400
-# include <QtWidgets/QOpenGLWidget>
-# include <QtGui/QOpenGLWindow>
+# include <QtOpenGL/QOpenGLWindow>
# else // 5.4
# include <QtGui/QWindow>
# endif // 5.0..5.4
@@ -63,11 +62,6 @@ static QString glInfo(const QOpenGLContext *ctx)
+ getGlString(ctx, GL_RENDERER);
}
-static QString glInfo(const QGLContext *ctx)
-{
- return glInfo(ctx->contextHandle());
-}
-
QString glInfo(const QObject *o)
{
# if QT_VERSION >= 0x050400
@@ -76,11 +70,8 @@ QString glInfo(const QObject *o)
return glInfo(oglw->context());
return QString();
}
-# endif // 5.4
+
if (o->isWidgetType()) {
- if (const QGLWidget *g = qobject_cast<const QGLWidget *>(o))
- return glInfo(g->context());
-# if QT_VERSION >= 0x050400
if (const QOpenGLWidget *g = qobject_cast<const QOpenGLWidget *>(o))
return glInfo(g->context());
# endif // 5.4