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>
|
||||
|
||||
@@ -14,6 +14,12 @@ include_directories(
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/3rdParty/OpenGL/api
|
||||
)
|
||||
endif(MSVC)
|
||||
|
||||
set(ImageGui_LIBS
|
||||
Image
|
||||
FreeCADGui
|
||||
|
||||
@@ -39,9 +39,13 @@
|
||||
# include <Windows.h>
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1910
|
||||
# include <GL/glext.h>
|
||||
# endif
|
||||
#else
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/glext.h>
|
||||
#endif
|
||||
|
||||
#include "OpenGLImageBox.h"
|
||||
|
||||
Reference in New Issue
Block a user