GillesDebunne / libQGLViewer

libQGLViewer is an open source C++ library based on Qt that eases the creation of OpenGL 3D viewers.
Other
241 stars 94 forks source link

Fix a compilation error: missing <QMap> #37

Closed lrineau closed 7 years ago

lrineau commented 7 years ago
In file included from qglviewer.h:4:0,
                 from qglviewer.cpp:1:
camera.h:528:46: error: field ‘kfi_’ has incomplete type ‘QMap<unsigned int, qglviewer::KeyFrameInterpolator*>’
   QMap<unsigned int, KeyFrameInterpolator *> kfi_;
                                              ^~~~

Tested on Fedora 25, with Qt 5.7.1.

(Cc @maxGimeno)

lrineau commented 7 years ago

Hi Gilles,

The recent modifications broke code.

  1. First, the use of QOpenGLWidget in libQGLViewer-2.7.0 made it require Qt-5.4 or later. It seems libQGLViewer-2.6.4 was documented as compatible with any version of Qt4 or Qt5. I suggest that the changes of 2.7.0 make it clear there is a big change in the requirements.

  2. Even with a recent Qt (5.7 from Fedora 25), there was a compilation error. This PR fixes that compilation issue, by adding

    #include <QMap>

    in camera.h.

Now that you use Github, maybe you should use the Travis CI integration to make the new commits tested automatically with a few different versions of Qt.

GillesDebunne commented 7 years ago
  1. First, the use of QOpenGLWidget http://doc.qt.io/qt-5/qopenglwidget.html in libQGLViewer-2.7.0 made it require Qt-5.4 or later. It seems libQGLViewer-2.6.4 was documented as compatible with any version of Qt4 or Qt5. I suggest that the changes of 2.7.0 make it clear there is a big change in the requirements.

You're absolutely right. I didn't realize this.

  1. Even with a recent Qt (5.7 from Fedora 25), there was a compilation error. This PR fixes that compilation issue, by adding

thanks, merged

Now that you use Github, maybe you should use the Travis CI integration to make the new commits tested automatically with a few different versions of Qt.

I could, indeed. I never played with Travis, but I should google it.

Gilles