diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-02-19 11:14:46 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-02-28 08:16:32 +0100 |
commit | d2068b24e4b2e96832af154d02e19b5333880c21 (patch) | |
tree | cf5f383cf6bee2ed3f86780c097657ebb2aa4259 /tests/manual | |
parent | 963017f58884dfd929249c5546aadbb0f74501e8 (diff) |
Manual tests: Port diaglib from QGL to QOpenGL
Task-number: QTBUG-74408
Change-Id: I25dedd69c6927e5d627f8104c404e23ce68487d9
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/diaglib/diaglib.pri | 2 | ||||
-rw-r--r-- | tests/manual/diaglib/glinfo.cpp | 17 | ||||
-rw-r--r-- | tests/manual/foreignwindows/foreignwindows.pro | 2 |
3 files changed, 6 insertions, 15 deletions
diff --git a/tests/manual/diaglib/diaglib.pri b/tests/manual/diaglib/diaglib.pri index ace9caecc6..dd5bfa5330 100644 --- a/tests/manual/diaglib/diaglib.pri +++ b/tests/manual/diaglib/diaglib.pri @@ -38,7 +38,7 @@ contains(QT, opengl) { SOURCES += \ $$PWD/glinfo.cpp - QT += opengl + QT += opengl openglwidgets } DEFINES += QT_DIAG_LIB diff --git a/tests/manual/diaglib/glinfo.cpp b/tests/manual/diaglib/glinfo.cpp index a955dd80ac..d8aec5298a 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 diff --git a/tests/manual/foreignwindows/foreignwindows.pro b/tests/manual/foreignwindows/foreignwindows.pro index 15bf2395f8..b78931bf7a 100644 --- a/tests/manual/foreignwindows/foreignwindows.pro +++ b/tests/manual/foreignwindows/foreignwindows.pro @@ -1,5 +1,5 @@ TEMPLATE = app -QT += widgets +QT += widgets opengl CONFIG += cmdline c++11 SOURCES += main.cpp include(../diaglib/diaglib.pri) |