mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Fix detection of xcb during configure
The QT_FEATURE_xcb macro is not in the private headers anymore. They keep changing APIs...
This commit is contained in:
parent
188c526b41
commit
c088cc4413
11
config/qt.m4
11
config/qt.m4
@ -218,16 +218,13 @@ AC_DEFUN([QT_DO_IT_ALL],
|
||||
save_CPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS="$save_CPPFLAGS $QT_CORE_INCLUDES"
|
||||
AC_CHECK_HEADER(QtGui/qtgui-config.h,
|
||||
[lyx_qt5_config=QtGui/qtgui-config.h],
|
||||
[lyx_qt5_config=qconfig.h])
|
||||
AC_CHECK_HEADER(QtGui/private/qtgui-config_p.h,
|
||||
[lyx_qt6_config=QtGui/private/qtgui-config_p.h],
|
||||
[lyx_qt6_config=qconfig.h])
|
||||
[lyx_qt_config=QtGui/qtgui-config.h],
|
||||
[lyx_qt_config=qconfig.h])
|
||||
AC_MSG_CHECKING([whether Qt uses the X Window system])
|
||||
if test x$USE_QT6 = xyes ; then
|
||||
dnl FIXME: Check whether defining QPA_XCB makes sense with Qt6
|
||||
AC_PREPROC_IFELSE([AC_LANG_SOURCE([
|
||||
[#include <$lyx_qt6_config>]
|
||||
[#include <$lyx_qt_config>]
|
||||
[#if !defined(QT_FEATURE_xcb) || QT_FEATURE_xcb < 0]
|
||||
[#error Fail]
|
||||
[#endif]])],
|
||||
@ -236,7 +233,7 @@ AC_DEFUN([QT_DO_IT_ALL],
|
||||
[AC_MSG_RESULT(no)])
|
||||
else
|
||||
AC_EGREP_CPP(xcb,
|
||||
[#include <$lyx_qt5_config>
|
||||
[#include <$lyx_qt_config>
|
||||
QT_QPA_DEFAULT_PLATFORM_NAME],
|
||||
[AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(QPA_XCB, 1, [Define if Qt uses the X Window System])],
|
||||
|
@ -3495,7 +3495,7 @@ bool GuiApplication::longOperationStarted() {
|
||||
|
||||
#if defined(QPA_XCB)
|
||||
bool GuiApplication::nativeEventFilter(const QByteArray & eventType,
|
||||
void * message, long *)
|
||||
void * message, QINTPTR *)
|
||||
{
|
||||
if (!current_view_ || eventType != "xcb_generic_event_t")
|
||||
return false;
|
||||
|
@ -121,8 +121,13 @@ public:
|
||||
bool notify(QObject * receiver, QEvent * event) override;
|
||||
void commitData(QSessionManager & sm);
|
||||
#if defined(QPA_XCB)
|
||||
#if (QT_VERSION < 0x060000)
|
||||
#define QINTPTR long
|
||||
#else
|
||||
#define QINTPTR qintptr
|
||||
#endif
|
||||
virtual bool nativeEventFilter(const QByteArray & eventType, void * message,
|
||||
long * result) override;
|
||||
QINTPTR * result) override;
|
||||
#endif
|
||||
//@}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user