fix build failures with newer compiler versions
This commit is contained in:
@@ -167,6 +167,9 @@ public:
|
||||
#endif
|
||||
setFormat(surfaceFormat);
|
||||
}
|
||||
~CustomGLWidget()
|
||||
{
|
||||
}
|
||||
void initializeGL()
|
||||
{
|
||||
QOpenGLContext *context = QOpenGLContext::currentContext();
|
||||
@@ -187,6 +190,13 @@ public:
|
||||
}
|
||||
void aboutToDestroyGLContext()
|
||||
{
|
||||
#if QT_VERSION >= 0x050900
|
||||
// With Qt 5.9 a signal is emitted while the QuarterWidget is being destroyed.
|
||||
// At this state its type is a QWidget, not a QuarterWidget any more.
|
||||
QuarterWidget* qw = qobject_cast<QuarterWidget*>(parent());
|
||||
if (!qw)
|
||||
return;
|
||||
#endif
|
||||
QMetaObject::invokeMethod(parent(), "aboutToDestroyGLContext",
|
||||
Qt::DirectConnection,
|
||||
QGenericReturnArgument());
|
||||
|
||||
@@ -33,6 +33,12 @@
|
||||
# include <QImageWriter>
|
||||
#endif
|
||||
|
||||
#if !defined(FC_OS_MACOSX)
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/glext.h>
|
||||
#endif
|
||||
|
||||
//gcc
|
||||
# include <iomanip>
|
||||
# include <ios>
|
||||
|
||||
@@ -85,6 +85,12 @@
|
||||
# include <QMimeData>
|
||||
#endif
|
||||
|
||||
#if defined(FC_OS_MACOSX)
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/glext.h>
|
||||
#endif
|
||||
|
||||
#include <QVariantAnimation>
|
||||
|
||||
#include <sstream>
|
||||
|
||||
Reference in New Issue
Block a user