Test for Qt5 when using obsolete OpenGL functions

This commit is contained in:
Magne Sjaastad 2024-01-07 13:33:09 +01:00
parent 2c02d61846
commit 870bcf0a46

View File

@ -41,7 +41,10 @@
#include <QPushButton>
#include <QVBoxLayout>
#include <QVariant>
#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
#include <QtOpenGL/QGLFormat>
#endif
namespace caf
{
@ -299,6 +302,7 @@ QString AboutDialog::versionStringForcurrentOpenGLContext()
{
QString versionString( "OpenGL " );
#if ( QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) )
QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();
if ( flags & QGLFormat::OpenGL_Version_4_0 )
@ -339,7 +343,7 @@ QString AboutDialog::versionStringForcurrentOpenGLContext()
versionString += "None";
else
versionString += "Unknown";
#endif
return versionString;
}