sjinks / qt_eventdispatcher_libev

libev-based event dispatcher for Qt
MIT License
37 stars 24 forks source link

Failed to build with Qt 6.5.3 #6

Open lengocthuong15 opened 7 months ago

lengocthuong15 commented 7 months ago

Hi @sjinks I am trying to build this lib with Qt 6.5.3 Everything looks good except there is an error the link state

qt_eventdispatcher_libev/libqt_eventdispatcher_libev.a(eventdispatcher_libev.cpp.o): In function `EventDispatcherLibEv::hasPendingEvents()':
eventdispatcher_libev.cpp:(.text+0x135): undefined reference to `qGlobalPostedEventsCount()'

For more context, I can build this with Qt 6.3.1 but got this issue when upgrading to Qt 6.5.3 Here is the output for qGlobalPostedEventsCount 6.3.1 image And here is the output for qGlobalPostedEventsCount 6.5.3 image It seems that in the new version, they change the use of qGlobalPostedEventsCount Do you have any idea?

lengocthuong15 commented 7 months ago

I've figured it out by myself, in Qt 6.5.3, they don't export the function qGlobalPostedEventsCount anymore, so when building with this lib, we cannot link it. https://codereview.qt-project.org/c/qt/qtbase/+/411667/1 image

The workaround is to enable it again Revert Q_CORE_EXPORT back to src/corelib/kernel/qcoreapplication.cpp But I don't know is there any particular reason (especially about security) that they need to remove this export. From my point of view, there is no solid reason, they just think that this function is not using anywhere other than autotest, so just the not export it to outside anymore.