Problem Compiling class derived from QXmlDefaultHandler with Qt 5.4



  • I'm starting to make sure that all my code compiles under Qt 5.4, the problem is that one of my classes that derives from QXmlDefaultHandler has some kind of conflict and I'm not sure where.

    Previously everything compiled with Qt 5.3.2. The system I'm using is Debian Linux, g++ (Debian 4.7.2-5) 4.7.2. I'm building using manually edited project files.

    Here is the relevant line that fails to build:
    @g++ -c -pipe -std=c++11 -O2 -D_REENTRANT -Wall -W -fPIE -DGL_GLEXT_PROTOTYPES=1 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_CORE_LIB -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/mkspecs/linux-g++ -I. -I/home/developer00/Company/source -I/usr/local/include -I/usr/include/freetype2 -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtOpenGL -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtWidgets -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtGui -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtNetwork -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtXml -I/home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtCore -I. -I. -o projectmanager.o projectmanager.cc
    In file included from /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtCore/qobjectdefs.h:43:0,
    from /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtCore/qobject.h:40,
    from /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtCore/qiodevice.h:39,
    from /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtCore/qtextstream.h:37,
    from /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtXml/qxml.h:38,
    from /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtXml/QXmlDefaultHandler:1,
    from projecthandler.h:11,
    from projectmanager.cc:9:
    /home/developer00/Source/Qt-5.4.0/5.4/gcc_64/include/QtCore/qobjectdefs_impl.h:49:1: error: expected constructor, destructor, or type conversion before ‘namespace’
    make: *** [projectmanager.o] Error 1@


  • Lifetime Qt Champion

    Hi,

    Can you show the content of your projecthandler.h file ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.