Commit a4086522 authored by Matthias Möller's avatar Matthias Möller

- fix contextmenu crash under win32 with qt5 using replacing in qt5 deprecated class

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17182 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b4899465
......@@ -100,7 +100,6 @@ class QSplitter;
class QTimer;
class QImage;
class QSocketNotifier;
class QGLFramebufferObject;
//== NAMESPACES ===============================================================
......@@ -116,6 +115,11 @@ class QGraphicsScene;
class QtGLViewerLayout;
class QtShiftPopupMenu;
class CursorPainter;
#if QT_VERSION < 0x050000
class QGLFramebufferObject;
#else
class QOpenGLFramebufferObject;
#endif
//== CLASS DEFINITION =========================================================
......@@ -805,8 +809,14 @@ private:
private:
#if QT_VERSION < 0x050000
typedef QGLFramebufferObject QFrameBufferObject;
#else
typedef QOpenGLFramebufferObject QFrameBufferObject;
#endif
/// Framebuffer object that holds the pick cache
QGLFramebufferObject *pickCache_;
QFrameBufferObject* pickCache_;
/// Should the pick cache be updated
bool updatePickCache_;
......
......@@ -56,7 +56,13 @@
#include "QtGLGraphicsScene.hh"
#include "QtGLGraphicsView.hh"
#include <QGLFramebufferObject>
#if QT_VERSION < 0x050000
#include <QGLFrameBufferObject>
#else // QT_VERSION > 0x050000
#undef QT_NO_OPENGL
#include <QOpenGLFramebufferObject>
#define QT_NO_OPENGL
#endif //QT_VERSION < 0x050000
//== NAMESPACES ===============================================================
......@@ -136,7 +142,7 @@ int glViewer::pickColor( ACG::SceneGraph::PickTarget _pickTarget,
// create a new pick cache frambuffer object
if (!pickCache_)
{
pickCache_ = new QGLFramebufferObject (glWidth (), glHeight (), QGLFramebufferObject::Depth);
pickCache_ = new QFrameBufferObject (glWidth (), glHeight (), QFrameBufferObject::Depth);
if (!pickCache_->isValid ())
{
pickCacheSupported_ = false;
......@@ -535,7 +541,7 @@ bool glViewer::pick_region( ACG::SceneGraph::PickTarget _pickTarg
// create a new pick cache frambuffer object
if (!pickCache_)
{
pickCache_ = new QGLFramebufferObject (glWidth (), glHeight (), QGLFramebufferObject::Depth);
pickCache_ = new QFrameBufferObject (glWidth (), glHeight (), QFrameBufferObject::Depth);
if (!pickCache_->isValid ())
{
pickCacheSupported_ = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment