← Back to team overview

yade-dev team mailing list archive

Fwd: Re: [Question #691593]: avoid this message : "The constructor with a shareWidget is deprecated, use the regular contructor instead."

 

JPEG image

PNG image

JPEG image

JPEG image

JPEG image

JPEG image

diff --git a/./gui/qt5/OpenGLManager.cpp b/../trunk_modifie/gui/qt5/OpenGLManager.cpp
index d88002a71..928c6c747 100644
--- a/./gui/qt5/OpenGLManager.cpp
+++ b/../trunk_modifie/gui/qt5/OpenGLManager.cpp
@@ -53,7 +53,7 @@ void OpenGLManager::createViewSlot()
 {
        const std::lock_guard<std::mutex> lock(viewsMutex);
        if (views.size() == 0) {
-               views.push_back(shared_ptr<GLViewer>(boost::make_shared<GLViewer>(0, renderer, /*shareWidget*/ (QGLWidget*)0)));
+               views.push_back(shared_ptr<GLViewer>(boost::make_shared<GLViewer>(0, renderer, /*QopenGLWidget*/ (QOpenGLWidget*)0)));
        } else {
                throw runtime_error("Secondary views not supported");
                //views.push_back(shared_ptr<GLViewer>(new GLViewer(views.size(),renderer,views[0].get())));



diff --git a/./gui/qt5/GLViewer.cpp b/../trunk_modifie/gui/qt5/GLViewer.cpp
index 8b12514c6..5f598df4a 100644
--- a/./gui/qt5/GLViewer.cpp
+++ b/../trunk_modifie/gui/qt5/GLViewer.cpp
@@ -61,8 +61,8 @@ void GLViewer::staticCloseEvent(QCloseEvent* e, const int viewId)

 void GLViewer::closeEvent(QCloseEvent* e) { GLViewer::staticCloseEvent(e, viewId); }

-GLViewer::GLViewer(int _viewId, const shared_ptr<OpenGLRenderer>& _renderer, QGLWidget* shareWidget)
-        : QGLViewer(/*parent*/ (QWidget*)NULL, shareWidget)
+GLViewer::GLViewer(int _viewId, const shared_ptr<OpenGLRenderer>& _renderer, QOpenGLWidget* parent)
+        : QGLViewer(/*parent*/ (QWidget*) parent)
         , renderer(_renderer)
         , viewId(_viewId)
 {



diff --git a/./gui/qt5/GLViewer.hpp b/../trunk_modifie/gui/qt5/GLViewer.hpp
index d576bf724..391b73d8b 100644
--- a/./gui/qt5/GLViewer.hpp
+++ b/../trunk_modifie/gui/qt5/GLViewer.hpp
@@ -88,7 +88,7 @@ public:
        int  timeDispMask;
        enum { TIME_REAL = 1, TIME_VIRT = 2, TIME_ITER = 4 };

-       GLViewer(int viewId, const shared_ptr<OpenGLRenderer>& renderer, QGLWidget* shareWidget = 0);
+       GLViewer(int viewId, const shared_ptr<OpenGLRenderer>& renderer, QOpenGLWidget* Widget = 0);
        virtual ~GLViewer();
 #if 0
                        virtual void paintGL();

Attachment: smime.p7s
Description: Signature cryptographique S/MIME


Follow ups