Skip to content

Doesn't compile with Qt 5.8.0 #222

@jclc

Description

@jclc

Compilation fails with the following output:

$ make
[ 25%] Built target voglcore
[ 26%] Built target voglgen
[ 26%] Built target voglgen_make_inc
[ 32%] Built target backtracevogl
[ 49%] Built target voglcommon
[ 54%] Built target vogl
[ 54%] Built target voglbench
[ 56%] Built target vogltrace
[ 57%] Built target vogltest
[ 57%] Built target glxspheres
[ 59%] Built target pxfmt
[ 59%] Building CXX object src/vogleditor/CMakeFiles/vogleditor.dir/vogleditor_qapicalltreemodel.cpp.o
In file included from /usr/include/qt/QtGui/qregion.h:49:0,
                 from /usr/include/qt/QtGui/qevent.h:45,
                 from /usr/include/qt/QtGui/QList:1,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_apicalltreeitem.h:29,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:37:
/usr/include/qt/QtCore/qdatastream.h:48:2: error: #error qdatastream.h must be included before any header file that defines Status
 #error qdatastream.h must be included before any header file that defines Status
  ^~~~~
In file included from /home/jclc/programs/vogl/src/voglcommon/vogl_common.h:47:0,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.h:31,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:30:
/usr/include/qt/QtCore/qdatastream.h:109:10: error: expected identifier before 'int'
     enum Status {
          ^
In file included from /usr/include/qt/QtGui/qregion.h:49:0,
                 from /usr/include/qt/QtGui/qevent.h:45,
                 from /usr/include/qt/QtGui/QList:1,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_apicalltreeitem.h:29,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:37:
/usr/include/qt/QtCore/qdatastream.h:109:17: error: expected unqualified-id before '{' token
     enum Status {
                 ^
In file included from /home/jclc/programs/vogl/src/voglcommon/vogl_common.h:47:0,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.h:31,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:30:
/usr/include/qt/QtCore/qdatastream.h:222:18: error: expected unqualified-id before 'int'
     QDataStream::Status oldStatus;
                  ^
In file included from /usr/include/qt/QtGui/qregion.h:49:0,
                 from /usr/include/qt/QtGui/qevent.h:45,
                 from /usr/include/qt/QtGui/QList:1,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_apicalltreeitem.h:29,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:37:
/usr/include/qt/QtCore/qdatastream.h: In constructor 'QtPrivate::StreamStateSaver::StreamStateSaver(QDataStream*)':
/usr/include/qt/QtCore/qdatastream.h:207:58: error: class 'QtPrivate::StreamStateSaver' does not have any field named 'oldStatus'
     inline StreamStateSaver(QDataStream *s) : stream(s), oldStatus(s->status())
                                                          ^~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In destructor 'QtPrivate::StreamStateSaver::~StreamStateSaver()':
/usr/include/qt/QtCore/qdatastream.h:214:13: error: 'oldStatus' was not declared in this scope
         if (oldStatus != QDataStream::Ok) {
             ^~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h:214:26: error: 'Ok' is not a member of 'QDataStream'
         if (oldStatus != QDataStream::Ok) {
                          ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In function 'QDataStream& operator>>(QDataStream&, QList<T>&)':
/usr/include/qt/QtCore/qdatastream.h:280:27: error: 'Ok' is not a member of 'QDataStream'
         if (s.status() != QDataStream::Ok) {
                           ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In function 'QDataStream& operator>>(QDataStream&, QLinkedList<T>&)':
/usr/include/qt/QtCore/qdatastream.h:311:27: error: 'Ok' is not a member of 'QDataStream'
         if (s.status() != QDataStream::Ok) {
                           ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In function 'QDataStream& operator>>(QDataStream&, QVector<T>&)':
/usr/include/qt/QtCore/qdatastream.h:343:27: error: 'Ok' is not a member of 'QDataStream'
         if (s.status() != QDataStream::Ok) {
                           ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In function 'QDataStream& operator>>(QDataStream&, QSet<T>&)':
/usr/include/qt/QtCore/qdatastream.h:373:28: error: 'Ok' is not a member of 'QDataStream'
         if (in.status() != QDataStream::Ok) {
                            ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In function 'QDataStream& operator>>(QDataStream&, QHash<K, V>&)':
/usr/include/qt/QtCore/qdatastream.h:405:28: error: 'Ok' is not a member of 'QDataStream'
         if (in.status() != QDataStream::Ok)
                            ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h:414:24: error: 'Ok' is not a member of 'QDataStream'
     if (in.status() != QDataStream::Ok)
                        ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h: In function 'QDataStream& operator>>(QDataStream&, QMap<K, V>&)':
/usr/include/qt/QtCore/qdatastream.h:447:28: error: 'Ok' is not a member of 'QDataStream'
         if (in.status() != QDataStream::Ok)
                            ^~~~~~~~~~~
/usr/include/qt/QtCore/qdatastream.h:455:24: error: 'Ok' is not a member of 'QDataStream'
     if (in.status() != QDataStream::Ok)
                        ^~~~~~~~~~~
In file included from /usr/include/X11/Xlib.h:44:0,
                 from /home/jclc/programs/vogl/src/voglcommon/vogl_common.h:47,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.h:31,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:30:
/usr/include/qt/QtCore/qcoreevent.h: At global scope:
/usr/include/qt/QtCore/qcoreevent.h:63:9: error: expected identifier before numeric constant
         None = 0,                               // invalid event
         ^
/usr/include/qt/QtCore/qcoreevent.h:63:9: error: expected '}' before numeric constant
/usr/include/qt/QtCore/qcoreevent.h:63:9: error: expected unqualified-id before numeric constant
In file included from /usr/include/qt/QtGui/qwindowdefs.h:44:0,
                 from /usr/include/qt/QtGui/qfont.h:44,
                 from /usr/include/qt/QtGui/QFont:1,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:27:
/usr/include/qt/QtCore/qcoreevent.h:293:5: error: 'friend' used outside of class
     Q_ENUM(Type)
     ^
/usr/include/qt/QtCore/qcoreevent.h:293:5: error: 'constexpr const QMetaObject* const qt_getEnumMetaObject' redeclared as different kind of symbol
     Q_ENUM(Type)
     ^
/usr/include/qt/QtGui/qkeysequence.h:149:6: note: previous declaration 'constexpr const QMetaObject* qt_getEnumMetaObject(QKeySequence::StandardKey)'
      Q_ENUM(StandardKey)
      ^
/usr/include/qt/QtCore/qcoreevent.h:293:5: error: 'Type' was not declared in this scope
     Q_ENUM(Type)
     ^
/usr/include/qt/QtCore/qcoreevent.h:293:5: error: 'friend' used outside of class
     Q_ENUM(Type)
     ^
/usr/include/qt/QtCore/qcoreevent.h:293:5: error: 'constexpr const char* const qt_getEnumName' redeclared as different kind of symbol
     Q_ENUM(Type)
     ^
/usr/include/qt/QtGui/qkeysequence.h:149:6: note: previous declaration 'constexpr const char* qt_getEnumName(QKeySequence::StandardKey)'
      Q_ENUM(StandardKey)
      ^
/usr/include/qt/QtCore/qcoreevent.h:293:5: error: 'Type' was not declared in this scope
     Q_ENUM(Type)
     ^
In file included from /usr/include/qt/QtGui/qevent.h:49:0,
                 from /usr/include/qt/QtGui/QList:1,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_apicalltreeitem.h:29,
                 from /home/jclc/programs/vogl/src/vogleditor/vogleditor_qapicalltreemodel.cpp:37:
/usr/include/qt/QtCore/qcoreevent.h:295:26: error: expected ')' before 'type'
     explicit QEvent(Type type);
                          ^~~~
/usr/include/qt/QtCore/qcoreevent.h:296:12: error: expected unqualified-id before 'const'
     QEvent(const QEvent &other);
            ^~~~~
/usr/include/qt/QtCore/qcoreevent.h:296:12: error: expected ')' before 'const'
/usr/include/qt/QtCore/qcoreevent.h:297:21: error: declaration of '~QEvent' as non-member
     virtual ~QEvent();
                     ^
/usr/include/qt/QtCore/qcoreevent.h:298:42: error: 'QEvent& operator=(const QEvent&)' must be a nonstatic member function
     QEvent &operator=(const QEvent &other);
                                          ^
/usr/include/qt/QtCore/qcoreevent.h:299:12: error: 'Type' does not name a type
     inline Type type() const { return static_cast<Type>(t); }
            ^~~~
/usr/include/qt/QtCore/qcoreevent.h:300:31: error: non-member function 'bool spontaneous()' cannot have cv-qualifier
     inline bool spontaneous() const { return spont; }
                               ^~~~~
/usr/include/qt/QtCore/qcoreevent.h: In function 'bool spontaneous()':
/usr/include/qt/QtCore/qcoreevent.h:300:46: error: 'spont' was not declared in this scope
     inline bool spontaneous() const { return spont; }
                                              ^~~~~
/usr/include/qt/QtCore/qcoreevent.h: In function 'void setAccepted(bool)':
/usr/include/qt/QtCore/qcoreevent.h:302:46: error: 'm_accept' was not declared in this scope
     inline void setAccepted(bool accepted) { m_accept = accepted; }
                                              ^~~~~~~~
/usr/include/qt/QtCore/qcoreevent.h: At global scope:
/usr/include/qt/QtCore/qcoreevent.h:303:30: error: non-member function 'bool isAccepted()' cannot have cv-qualifier
     inline bool isAccepted() const { return m_accept; }
                              ^~~~~
/usr/include/qt/QtCore/qcoreevent.h: In function 'bool isAccepted()':
/usr/include/qt/QtCore/qcoreevent.h:303:45: error: 'm_accept' was not declared in this scope
     inline bool isAccepted() const { return m_accept; }
                                             ^~~~~~~~
/usr/include/qt/QtCore/qcoreevent.h: In function 'void accept()':
/usr/include/qt/QtCore/qcoreevent.h:305:28: error: 'm_accept' was not declared in this scope
     inline void accept() { m_accept = true; }
                            ^~~~~~~~
/usr/include/qt/QtCore/qcoreevent.h: In function 'void ignore()':
/usr/include/qt/QtCore/qcoreevent.h:306:28: error: 'm_accept' was not declared in this scope
     inline void ignore() { m_accept = false; }
                            ^~~~~~~~
/usr/include/qt/QtCore/qcoreevent.h: At global scope:
/usr/include/qt/QtCore/qcoreevent.h:310:1: error: expected unqualified-id before 'protected'
 protected:
 ^~~~~~~~~
/usr/include/qt/QtCore/qcoreevent.h:314:1: error: expected unqualified-id before 'private'
 private:
 ^~~~~~~
/usr/include/qt/QtCore/qcoreevent.h:316:18: error: expected initializer before ':' token
     ushort spont : 1;
                  ^
/usr/include/qt/QtCore/qcoreevent.h:317:21: error: expected initializer before ':' token
     ushort m_accept : 1;
                     ^
/usr/include/qt/QtCore/qcoreevent.h:318:21: error: expected initializer before ':' token
     ushort reserved : 13;
                     ^
/usr/include/qt/QtCore/qcoreevent.h:320:5: error: 'friend' used outside of class
     friend class QCoreApplication;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:321:5: error: 'friend' used outside of class
     friend class QCoreApplicationPrivate;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:322:5: error: 'friend' used outside of class
     friend class QThreadData;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:323:5: error: 'friend' used outside of class
     friend class QApplication;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:324:5: error: 'friend' used outside of class
     friend class QShortcutMap;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:325:5: error: 'friend' used outside of class
     friend class QGraphicsView;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:326:5: error: 'friend' used outside of class
     friend class QGraphicsScene;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:327:5: error: 'friend' used outside of class
     friend class QGraphicsScenePrivate;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h:329:5: error: 'friend' used outside of class
     friend class QSpontaneKeyEvent;
     ^~~~~~
/usr/include/qt/QtCore/qcoreevent.h: In function 'void setSpontaneous()':
/usr/include/qt/QtCore/qcoreevent.h:332:29: error: 'spont' was not declared in this scope
     void setSpontaneous() { spont = true; }
                             ^~~~~
/usr/include/qt/QtCore/qcoreevent.h: At global scope:
/usr/include/qt/QtCore/qcoreevent.h:333:1: error: expected declaration before '}' token
 };
 ^

Running Arch Linux 64 bit with Qt 5.8.0. Tried on GCC and Clang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions