diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-04-14 13:48:28 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2020-04-17 11:50:24 +0200 |
commit | ad5aee2e34fad45d1d90bb059fa00a791d4ba3e2 (patch) | |
tree | 0df5be078e937caf0cec39b312449128300735dc /tests | |
parent | 009d583eef20e7732225cdeae32925ac676d3a47 (diff) |
Get rid of QT_OPENGL_ES*
The QT_OPENGL_ES* macros are leftovers from an earlier,
ad hoc configuration system, which has since been
replaced by QT_CONFIG. To clean things up in Qt 6,
we use the new way instead.
Task-number: QTBUG-83467
Change-Id: I578dc7695bff9d5ee303b22e44f60fee22fe0c28
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/cmake/test_openglextensions_module/main.cpp | 2 | ||||
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 10 | ||||
-rw-r--r-- | tests/auto/opengl/qgl/tst_qgl.cpp | 10 |
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/auto/cmake/test_openglextensions_module/main.cpp b/tests/auto/cmake/test_openglextensions_module/main.cpp index 40d33e31c1..ddaadc0791 100644 --- a/tests/auto/cmake/test_openglextensions_module/main.cpp +++ b/tests/auto/cmake/test_openglextensions_module/main.cpp @@ -33,7 +33,7 @@ int main(int argc, char **argv) { -#if defined(QT_OPENGL_ES_2) +#if QT_CONFIG(opengles2) QOpenGLExtension_OES_vertex_array_object obj; #else QOpenGLExtension_ARB_draw_buffers obj; diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index ca12461efa..7236c22fd0 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -57,7 +57,7 @@ #include <QtPlatformHeaders/QGLXNativeContext> #endif -#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2) +#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2) #include <QtPlatformHeaders/QWGLNativeContext> #endif @@ -107,7 +107,7 @@ private slots: void glxContextWrap(); #endif -#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2) +#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2) void wglContextWrap(); #endif @@ -633,7 +633,7 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat) { if (ctx->format().majorVersion() < 3) return false; -#ifndef QT_OPENGL_ES_2 +#if !QT_CONFIG(opengles2) if (!ctx->isOpenGLES() && ctx->format().majorVersion() >= 4) { GLint value = -1; auto *vFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_2_Core>(ctx); @@ -1519,7 +1519,7 @@ void tst_QOpenGL::glxContextWrap() } #endif // USE_GLX -#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2) +#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2) void tst_QOpenGL::wglContextWrap() { QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext); @@ -1572,7 +1572,7 @@ void tst_QOpenGL::wglContextWrap() QVERIFY(adopted->makeCurrent(window.data())); adopted->doneCurrent(); } -#endif // Q_OS_WIN32 && !QT_OPENGL_ES_2 +#endif // Q_OS_WIN32 && !QT_CONFIG(opengles2) void tst_QOpenGL::vaoCreate() { diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp index d860caaa37..58f4ca866e 100644 --- a/tests/auto/opengl/qgl/tst_qgl.cpp +++ b/tests/auto/opengl/qgl/tst_qgl.cpp @@ -747,14 +747,14 @@ void tst_QGL::openGLVersionCheck() // However, the complicated parts are in openGLVersionFlags(const QString &versionString) // tested above -#if defined(QT_OPENGL_ES_2) +#if QT_CONFIG(opengles2) QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0); #else if (QOpenGLContext::currentContext()->isOpenGLES()) QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0); else QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1); -#endif //defined(QT_OPENGL_ES_2) +#endif //QT_CONFIG(opengles2) } #endif //QT_BUILD_INTERNAL @@ -1639,7 +1639,7 @@ void tst_QGL::fboFormat() QCOMPARE(format1.attachment(), QGLFramebufferObject::NoAttachment); QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D)); int expectedFormat = -#ifdef QT_OPENGL_ES_2 +#if QT_CONFIG(opengles2) GL_RGBA; #else QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8; @@ -1716,7 +1716,7 @@ void tst_QGL::fboFormat() QCOMPARE(format1c, format3c); QVERIFY(!(format1c != format3c)); format3c.setInternalTextureFormat( -#ifdef QT_OPENGL_ES_2 +#if QT_CONFIG(opengles2) GL_RGBA #else QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8 @@ -1729,7 +1729,7 @@ void tst_QGL::fboFormat() QCOMPARE(format1c, format4c); QVERIFY(!(format1c != format4c)); format4c.setInternalTextureFormat( -#ifdef QT_OPENGL_ES_2 +#if QT_CONFIG(opengles2) GL_RGBA #else QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8 |