diff options
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) |