Another Linux build issue

Issue #38 new
Joseph Newing created an issue

Still trying to build libqxt on linux using Qt5, this is using the latest master ec51438

compiling x11/qxtapplication_x11.cpp
In file included from x11/qxtapplication_x11.cpp:33:0:
./qxtnativeeventfilter.h: In destructor ‘virtual QxtNativeEventFilter::~QxtNativeEventFilter()’:
./qxtnativeeventfilter.h:41:45: error: no matching function for call to ‘QxtApplication::removeNativeEventFilter(QxtNativeEventFilter* const)’
./qxtnativeeventfilter.h:41:45: note: candidate is:
/home/jnewing/Qt5.0.2/5.0.2/gcc/include/QtCore/qcoreapplication.h:154:10: note: void QCoreApplication::removeNativeEventFilter(QAbstractNativeEventFilter*)
/home/jnewing/Qt5.0.2/5.0.2/gcc/include/QtCore/qcoreapplication.h:154:10: note:   no known conversion for argument 1 from ‘QxtNativeEventFilter* const’ to ‘QAbstractNativeEventFilter*’
x11/qxtapplication_x11.cpp: At global scope:
x11/qxtapplication_x11.cpp:35:31: error: expected constructor, destructor, or type conversion before ‘(’ token
x11/qxtapplication_x11.cpp:40:31: error: expected constructor, destructor, or type conversion before ‘(’ token
x11/qxtapplication_x11.cpp:48:37: error: ‘bool QxtApplication::x11EventFilter’ is not a static member of ‘class QxtApplication’
x11/qxtapplication_x11.cpp:48:37: error: ‘XEvent’ was not declared in this scope
x11/qxtapplication_x11.cpp:49:1: error: expected ‘,’ or ‘;’ before ‘{’ token
make[1]: *** [release/.obj/qxtapplication_x11.o] Error 1
make[1]: Leaving directory `/home/jnewing/libqxt/src/widgets'
make: *** [sub-src-widgets-make_first] Error 2

Comments (4)

  1. Arkadiusz Piekarz

    If you look at qxtapplication.h, it says:

    // native event filter support is not required for Qt5 because Qt5
    // QCoreApplication already supports installation of native event filters
    

    Function void removeNativeEventFilter(QxtNativeEventFilter* filter) is defined only for Qt lower than 5, so I think we can put similar #ifdefs around qxtApp->removeNativeEventFilter(this) in QxtNativeEventFilter destructor.

    There are more compilation errors related to X11 and QPA, code should be changed to use a new class QxtX11Data, currently in qxtglobalshortcut.cpp (btw that class should be moved to separate file).

  2. microwavesafe

    You can compile this against Qt5.2.0 using the -qws switch in ./configure. This isn't a solution, but if you don't need the X11 related parts (I only use the JSON parser and the rpc functions), then it is a workaround for now.

    Without the -qws switch I get the same issue as above on the latest MASTER commit.

  3. Log in to comment