From e694ced803589b3504b6bdb2fc8bf97bc891c794 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 4 Aug 2016 12:22:05 +0200 Subject: Add X11 support for the DRIVE CX The spec, added in 5.7.0, simply defined WIN_INTERFACE_CUSTOM, leading to the generic, non-X11 typedefs for the EGL native types. This is fine for the typical embedded use, but is not what is wanted when targeting xcb, and leads to disabling EGL-on-X support. Therefore, move the define into a comon header and let the individual libs decide by defining or not defining QT_EGL_NO_X11. This sets both MESA_EGL_NO_X11_HEADERS and WIN_INTERFACE_CUSTOM in qt_egl_p.h. This way Qt builds supporting all three of eglfs (DRM+EGLDevice), wayland, and xcb (EGL) can be generated out of the box. [ChangeLog][Platform Specific Changes][Linux] xcb with EGL and OpenGL ES, as well as eglfs with the eglfs_x11 backend, are now supported on DRIVE CX boards when using the linux-drive-cx-g++ device spec. Done-with: Louai Al-Khanji Task-number: QTBUG-55140 Change-Id: I6f186d16612e170995e3bca1214bcabad59af08e Reviewed-by: Andy Nichols --- src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h | 2 +- src/plugins/platforms/xcb/qxcbintegration.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h index 9729f610b6..7c6524c8ee 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h @@ -46,7 +46,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index cdbf9b295e..5a89113a4f 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -65,7 +65,7 @@ #include #ifdef XCB_USE_EGL -#include +# include #endif #ifdef XCB_USE_XLIB -- cgit v1.2.3 From d5dc46d319bb1f58f8a0ba64d2ef270eecbe8e65 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sat, 13 Aug 2016 21:38:19 +0200 Subject: employ QMAKE_USE: LIBS += $$QMAKE_LIBS_FOO this migrates the cases where the build system already made (some) use of variables (possibly) set by configure. Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e Reviewed-by: Lars Knoll --- .../xcb/gl_integrations/gl_integrations_plugin_base.pri | 9 +++------ src/plugins/platforms/xcb/xcb_qpa_lib.pro | 15 +++++---------- 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index c2d3849d8e..8fd57da29d 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -21,18 +21,15 @@ contains(QT_CONFIG, xcb-sm) { DEFINES += XCB_USE_SM } -DEFINES += $$QMAKE_DEFINES_XCB -LIBS += $$QMAKE_LIBS_XCB -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB - CONFIG += qpa/genericunixfontdatabase contains(QT_CONFIG, xcb-qt) { DEFINES += XCB_USE_RENDER XCB_DIR = $$clean_path($$PWD/../../../../3rdparty/xcb) INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude - LIBS += -lxcb -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() + LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() + QMAKE_USE += xcb } else { - LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb + QMAKE_USE += xcb_syslibs } diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index 2013f40dd0..1cf13c7795 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -72,26 +72,22 @@ contains(QT_CONFIG, xcb-sm) { include(gl_integrations/gl_integrations.pri) -DEFINES += $$QMAKE_DEFINES_XCB -LIBS += $$QMAKE_LIBS_XCB -QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB -QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB - CONFIG += qpa/genericunixfontdatabase contains(QT_CONFIG, dbus-linked) { QT += dbus - LIBS += $$QMAKE_LIBS_DBUS } contains(QT_CONFIG, xcb-qt) { DEFINES += XCB_USE_RENDER XCB_DIR = ../../../3rdparty/xcb INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude - LIBS += -lxcb -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() + LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() + QMAKE_USE += xcb } else { - LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxcb-xinerama + LIBS += -lxcb-xinerama ### there is no configure test for this! !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb + QMAKE_USE += xcb_syslibs } # libxkbcommon @@ -99,8 +95,7 @@ contains(QT_CONFIG, xkbcommon-qt) { QT_CONFIG += use-xkbcommon-x11support include(../../../3rdparty/xkbcommon.pri) } else { - LIBS += $$QMAKE_LIBS_XKBCOMMON - QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XKBCOMMON + QMAKE_USE += xkbcommon } load(qt_module) -- cgit v1.2.3 From 4b288e30efda67212b54d7f2e084d0f3acc594ae Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 12 Aug 2016 20:19:33 +0200 Subject: employ QMAKE_USE: LIBS += -lfoo this switches all instances of LIBS[_PRIVATE] += -lfoo where a config tests exists for foo. this removes some code duplication between tests and project files (in case of conditionals), and ensures that the projects always actually use the libraries configure has found. Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- .../xcb/gl_integrations/gl_integrations_plugin_base.pri | 2 +- src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro | 5 ++--- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index 8fd57da29d..b60de79fa0 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -30,6 +30,6 @@ contains(QT_CONFIG, xcb-qt) { LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() QMAKE_USE += xcb } else { - !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb + !contains(DEFINES, QT_NO_XKB): QMAKE_USE += xcb_xkb QMAKE_USE += xcb_syslibs } diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro index 67fd68765a..adac4b2e22 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro @@ -5,12 +5,11 @@ include(../gl_integrations_plugin_base.pri) #should be removed from the sources DEFINES += XCB_USE_GLX XCB_USE_XLIB -LIBS += -lxcb - contains(QT_CONFIG, xcb-glx) { DEFINES += XCB_HAS_XCB_GLX - LIBS += -lxcb-glx + QMAKE_USE += xcb_glx } +QMAKE_USE += xcb LIBS += $$QMAKE_LIBS_DYNLOAD diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index 1cf13c7795..b81d38fab1 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -42,12 +42,12 @@ DEFINES += QT_BUILD_XCB_PLUGIN # needed by Xcursor ... contains(QT_CONFIG, xcb-xlib) { DEFINES += XCB_USE_XLIB - LIBS += -lX11 -lX11-xcb + QMAKE_USE += xcb_xlib contains(QT_CONFIG, xinput2) { DEFINES += XCB_USE_XINPUT2 SOURCES += qxcbconnection_xi2.cpp - LIBS += -lXi + QMAKE_USE += xinput2 !isEmpty(QMAKE_XINPUT2_VERSION_MAJOR) { DEFINES += LIBXI_MAJOR=$$QMAKE_XINPUT2_VERSION_MAJOR \ LIBXI_MINOR=$$QMAKE_XINPUT2_VERSION_MINOR \ @@ -59,13 +59,13 @@ contains(QT_CONFIG, xcb-xlib) { # to support custom cursors with depth > 1 contains(QT_CONFIG, xcb-render) { DEFINES += XCB_USE_RENDER - LIBS += -lxcb-render -lxcb-render-util + QMAKE_USE += xcb_render } # build with session management support contains(QT_CONFIG, xcb-sm) { DEFINES += XCB_USE_SM - LIBS += -lSM -lICE + QMAKE_USE += x11sm SOURCES += qxcbsessionmanager.cpp HEADERS += qxcbsessionmanager.h } @@ -86,7 +86,7 @@ contains(QT_CONFIG, xcb-qt) { QMAKE_USE += xcb } else { LIBS += -lxcb-xinerama ### there is no configure test for this! - !contains(DEFINES, QT_NO_XKB):LIBS += -lxcb-xkb + !contains(DEFINES, QT_NO_XKB): QMAKE_USE += xcb_xkb QMAKE_USE += xcb_syslibs } -- cgit v1.2.3 From 48b4e0bf6f1cc4ce4831c2212d57f00fe792468f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 20 Jul 2016 12:44:16 +0200 Subject: Improve library version handling Output the version as a define into the private config header as a define using a hex number. Like that we can easily do version checks on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK() macros. Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76 Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 9 ++++++--- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 5 ----- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp index 5b7f45fb6c..bda167bce9 100644 --- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp @@ -697,7 +697,7 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo if (m_xiGrab) { // XIAllowTouchEvents deadlocks with libXi < 1.7.4 (this has nothing to do with the XI2 versions like 2.2) // http://lists.x.org/archives/xorg-devel/2014-July/043059.html -#ifndef LIBXI_MAJOR +#ifndef XCB_USE_XINPUT2 static bool allowTouchWarningShown = false; if (!allowTouchWarningShown) { allowTouchWarningShown = true; @@ -705,13 +705,16 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo " Minimum libXi version required is 1.7.4." " Expect issues with touch behavior."); } -#elif LIBXI_MAJOR == 1 && (LIBXI_MINOR < 7 || (LIBXI_MINOR == 7 && LIBXI_PATCH < 4)) +#elif QT_LIBRARY_VERSION(xinput2) < QT_VERSION_CHECK(1, 7, 4) static bool allowTouchWarningShown = false; if (!allowTouchWarningShown) { allowTouchWarningShown = true; qWarning("Skipping XIAllowTouchEvents() due to not having libXi >= 1.7.4." " libXi version at build time was %d.%d.%d." - " Expect issues with touch behavior.", LIBXI_MAJOR, LIBXI_MINOR, LIBXI_PATCH); + " Expect issues with touch behavior.", + QT_LIBRARY_VERSION_MAJOR(xinput2), + QT_LIBRARY_VERSION_MINOR(xinput2), + QT_LIBRARY_VERSION_PATCH(xinput2)); } #else XIAllowTouchEvents(static_cast(m_xlib_display), xiDeviceEvent->deviceid, diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index b81d38fab1..d2584ca291 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -48,11 +48,6 @@ contains(QT_CONFIG, xcb-xlib) { DEFINES += XCB_USE_XINPUT2 SOURCES += qxcbconnection_xi2.cpp QMAKE_USE += xinput2 - !isEmpty(QMAKE_XINPUT2_VERSION_MAJOR) { - DEFINES += LIBXI_MAJOR=$$QMAKE_XINPUT2_VERSION_MAJOR \ - LIBXI_MINOR=$$QMAKE_XINPUT2_VERSION_MINOR \ - LIBXI_PATCH=$$QMAKE_XINPUT2_VERSION_PATCH - } } } -- cgit v1.2.3 From 56ee007b3f44eb3276b244a630f55482c2b02228 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 18 Aug 2016 22:25:08 +0200 Subject: Rework privateFeature privateFeature would add QT_NO_FEATURE to the DEFINES in the private .pri file, which was somewhat inelegant. Additionally, it would add the feature to the _public_ QT_CONFIG variable, which was plain wrong. Replace the implementation with the one just introduced for publicFeature, with the difference that the features are written to the private files instead. As this entirely disposes of the old system, all usages in the project files need to be replaced atomically as well. Change-Id: I506b5d41054410659ea503bc6901736cd5edec6e Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- .../xcb/gl_integrations/gl_integrations_plugin_base.pri | 2 +- src/plugins/platforms/xcb/qxcbconnection.cpp | 8 ++++---- src/plugins/platforms/xcb/qxcbconnection.h | 3 ++- src/plugins/platforms/xcb/qxcbkeyboard.cpp | 12 ++++++------ src/plugins/platforms/xcb/qxcbkeyboard.h | 6 +++--- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 2 +- 6 files changed, 17 insertions(+), 16 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index b60de79fa0..8d34e98940 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -30,6 +30,6 @@ contains(QT_CONFIG, xcb-qt) { LIBS += -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix() QMAKE_USE += xcb } else { - !contains(DEFINES, QT_NO_XKB): QMAKE_USE += xcb_xkb + qtConfig(xkb): QMAKE_USE += xcb_xkb QMAKE_USE += xcb_syslibs } diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp index 7065bb0ffb..2d959688b3 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.cpp +++ b/src/plugins/platforms/xcb/qxcbconnection.cpp @@ -599,7 +599,7 @@ QXcbConnection::QXcbConnection(QXcbNativeInterface *nativeInterface, bool canGra xcb_extension_t *extensions[] = { &xcb_shm_id, &xcb_xfixes_id, &xcb_randr_id, &xcb_shape_id, &xcb_sync_id, -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) &xcb_xkb_id, #endif #ifdef XCB_USE_RENDER @@ -1069,7 +1069,7 @@ Qt::MouseButton QXcbConnection::translateMouseButton(xcb_button_t s) } } -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) namespace { typedef union { /* All XKB events share these fields. */ @@ -1252,7 +1252,7 @@ void QXcbConnection::handleXcbEvent(xcb_generic_event_t *event) s->handleScreenChange(change_event); } handled = true; -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) } else if (response_type == xkb_first_event) { // https://bugs.freedesktop.org/show_bug.cgi?id=51295 _xkb_event *xkb_event = reinterpret_cast<_xkb_event *>(event); if (xkb_event->any.deviceID == m_keyboard->coreDeviceId()) { @@ -2174,7 +2174,7 @@ void QXcbConnection::initializeXShape() void QXcbConnection::initializeXKB() { -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) const xcb_query_extension_reply_t *reply = xcb_get_extension_data(m_connection, &xcb_xkb_id); if (!reply || !reply->present) { qWarning("Qt: XKEYBOARD extension not present on the X server."); diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h index 1336b3f5d3..59054fae2d 100644 --- a/src/plugins/platforms/xcb/qxcbconnection.h +++ b/src/plugins/platforms/xcb/qxcbconnection.h @@ -53,10 +53,11 @@ #include #include #include +#include // This is needed to make Qt compile together with XKB. xkb.h is using a variable // which is called 'explicit', this is a reserved keyword in c++ -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) #define explicit dont_use_cxx_explicit #include #undef explicit diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp index 811ef4251a..07932ceeb8 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp +++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp @@ -711,7 +711,7 @@ void QXcbKeyboard::updateKeymap() xkb_keymap = 0; struct xkb_state *new_state = 0; -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) if (connection()->hasXKB()) { xkb_keymap = xkb_x11_keymap_new_from_device(xkb_context, xcb_connection(), core_device_id, (xkb_keymap_compile_flags)0); if (xkb_keymap) { @@ -754,7 +754,7 @@ void QXcbKeyboard::updateKeymap() checkForLatinLayout(); } -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) void QXcbKeyboard::updateXKBState(xcb_xkb_state_notify_event_t *state) { if (m_config && connection()->hasXKB()) { @@ -1140,7 +1140,7 @@ QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection) , m_hasLatinLayout(false) { memset(&xkb_names, 0, sizeof(xkb_names)); -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) core_device_id = 0; if (connection->hasXKB()) { updateVModMapping(); @@ -1154,7 +1154,7 @@ QXcbKeyboard::QXcbKeyboard(QXcbConnection *connection) #endif m_key_symbols = xcb_key_symbols_alloc(xcb_connection()); updateModifiers(); -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) } #endif updateKeymap(); @@ -1173,7 +1173,7 @@ QXcbKeyboard::~QXcbKeyboard() void QXcbKeyboard::updateVModMapping() { -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) xcb_xkb_get_names_cookie_t names_cookie; xcb_xkb_get_names_reply_t *name_reply; xcb_xkb_get_names_value_list_t names_list; @@ -1242,7 +1242,7 @@ void QXcbKeyboard::updateVModMapping() void QXcbKeyboard::updateVModToRModMapping() { -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) xcb_xkb_get_map_cookie_t map_cookie; xcb_xkb_get_map_reply_t *map_reply; xcb_xkb_get_map_map_t map; diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h index 75e6d2ec82..817b57ff5b 100644 --- a/src/plugins/platforms/xcb/qxcbkeyboard.h +++ b/src/plugins/platforms/xcb/qxcbkeyboard.h @@ -45,7 +45,7 @@ #include #include -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) #include #endif @@ -77,7 +77,7 @@ public: #ifdef XCB_USE_XINPUT22 void updateXKBStateFromXI(void *modInfo, void *groupInfo); #endif -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) // when XKEYBOARD is present on the X server int coreDeviceId() const { return core_device_id; } void updateXKBState(xcb_xkb_state_notify_event_t *state); @@ -136,7 +136,7 @@ private: xkb_mod_index_t mod5; }; _xkb_mods xkb_mods; -#ifndef QT_NO_XKB +#if QT_CONFIG(xkb) // when XKEYBOARD is present on the X server _mod_masks vmod_masks; int core_device_id; diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index d2584ca291..326aa356df 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -81,7 +81,7 @@ contains(QT_CONFIG, xcb-qt) { QMAKE_USE += xcb } else { LIBS += -lxcb-xinerama ### there is no configure test for this! - !contains(DEFINES, QT_NO_XKB): QMAKE_USE += xcb_xkb + qtConfig(xkb): QMAKE_USE += xcb_xkb QMAKE_USE += xcb_syslibs } -- cgit v1.2.3 From b786993f8da01c9432d2736f565d3c7e8f2ab122 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 16 Aug 2016 08:57:03 +0200 Subject: fix xcb-render nesting xcb-render is emitIf on xcb-syslibs, so it needs to move into the respective branches in the project files. Change-Id: Iaa6db9012287ae0e9c363ca5eeec48daad862320 Reviewed-by: Lars Knoll --- .../xcb/gl_integrations/gl_integrations_plugin_base.pri | 9 ++++----- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 11 +++++------ 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index 8d34e98940..e97f24e974 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -11,11 +11,6 @@ contains(QT_CONFIG, xcb-xlib) { } } -# to support custom cursors with depth > 1 -contains(QT_CONFIG, xcb-render) { - DEFINES += XCB_USE_RENDER -} - # build with session management support contains(QT_CONFIG, xcb-sm) { DEFINES += XCB_USE_SM @@ -31,5 +26,9 @@ contains(QT_CONFIG, xcb-qt) { QMAKE_USE += xcb } else { qtConfig(xkb): QMAKE_USE += xcb_xkb + # to support custom cursors with depth > 1 + contains(QT_CONFIG, xcb-render) { + DEFINES += XCB_USE_RENDER + } QMAKE_USE += xcb_syslibs } diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index 326aa356df..c496fb7452 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -51,12 +51,6 @@ contains(QT_CONFIG, xcb-xlib) { } } -# to support custom cursors with depth > 1 -contains(QT_CONFIG, xcb-render) { - DEFINES += XCB_USE_RENDER - QMAKE_USE += xcb_render -} - # build with session management support contains(QT_CONFIG, xcb-sm) { DEFINES += XCB_USE_SM @@ -82,6 +76,11 @@ contains(QT_CONFIG, xcb-qt) { } else { LIBS += -lxcb-xinerama ### there is no configure test for this! qtConfig(xkb): QMAKE_USE += xcb_xkb + # to support custom cursors with depth > 1 + contains(QT_CONFIG, xcb-render) { + DEFINES += XCB_USE_RENDER + QMAKE_USE += xcb_render + } QMAKE_USE += xcb_syslibs } -- cgit v1.2.3 From 792a99438707c78ed96a1b066489f9100c24a922 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 16 Aug 2016 10:17:23 +0200 Subject: Clean up xkbcommon.pri Don't set a variable in QT_CONFIG to build the right things. Instead have an xkbcommon-x11.pri in addition to xkbcommon.pri that also builds the x11 specific things. Change-Id: I16a5f0bcb39b7f4039583a676b6c14b0e073a37f Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index c496fb7452..f995249c0d 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -86,8 +86,7 @@ contains(QT_CONFIG, xcb-qt) { # libxkbcommon contains(QT_CONFIG, xkbcommon-qt) { - QT_CONFIG += use-xkbcommon-x11support - include(../../../3rdparty/xkbcommon.pri) + include(../../../3rdparty/xkbcommon-x11.pri) } else { QMAKE_USE += xkbcommon } -- cgit v1.2.3 From 60985aa42b37217fb4c01ed85bbf6f14410c3491 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Fri, 5 Aug 2016 13:35:39 +0200 Subject: Use qtConfig throughout in qtbase Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll Reviewed-by: Oswald Buddenhagen --- .../platforms/xcb/gl_integrations/gl_integrations.pro | 4 ++-- .../xcb/gl_integrations/gl_integrations_plugin_base.pri | 10 +++++----- .../platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro | 2 +- .../platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro | 2 +- src/plugins/platforms/xcb/xcb.pro | 2 +- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 15 +++++++-------- 6 files changed, 17 insertions(+), 18 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro b/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro index 9de0476810..0cdee03f62 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations.pro @@ -1,9 +1,9 @@ TEMPLATE = subdirs -contains(QT_CONFIG, egl): contains(QT_CONFIG, egl_x11): contains(QT_CONFIG, opengl) { +qtConfig(egl):qtConfig(egl_x11):qtConfig(opengl) { SUBDIRS += xcb_egl } -contains(QT_CONFIG, xcb-xlib): contains(QT_CONFIG, opengl): !contains(QT_CONFIG, opengles2) { +qtConfig(xcb-xlib):qtConfig(opengl):!qtConfig(opengles2) { SUBDIRS += xcb_glx } diff --git a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri index e97f24e974..57c8f27d9c 100644 --- a/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri +++ b/src/plugins/platforms/xcb/gl_integrations/gl_integrations_plugin_base.pri @@ -4,21 +4,21 @@ INCLUDEPATH += $$PWD INCLUDEPATH += $$PWD/../ # needed by Xcursor ... -contains(QT_CONFIG, xcb-xlib) { +qtConfig(xcb-xlib) { DEFINES += XCB_USE_XLIB - contains(QT_CONFIG, xinput2) { + qtConfig(xinput2) { DEFINES += XCB_USE_XINPUT2 } } # build with session management support -contains(QT_CONFIG, xcb-sm) { +qtConfig(xcb-sm) { DEFINES += XCB_USE_SM } CONFIG += qpa/genericunixfontdatabase -contains(QT_CONFIG, xcb-qt) { +!qtConfig(system-xcb) { DEFINES += XCB_USE_RENDER XCB_DIR = $$clean_path($$PWD/../../../../3rdparty/xcb) INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/include/xcb $$XCB_DIR/sysinclude @@ -27,7 +27,7 @@ contains(QT_CONFIG, xcb-qt) { } else { qtConfig(xkb): QMAKE_USE += xcb_xkb # to support custom cursors with depth > 1 - contains(QT_CONFIG, xcb-render) { + qtConfig(xcb-render) { DEFINES += XCB_USE_RENDER } QMAKE_USE += xcb_syslibs diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro index 6d52332bad..92e6c18fbe 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/xcb_egl.pro @@ -4,7 +4,7 @@ include(../gl_integrations_plugin_base.pri) CONFIG += egl -contains(QT_CONFIG, xcb-xlib): DEFINES += XCB_USE_XLIB +qtConfig(xcb-xlib): DEFINES += XCB_USE_XLIB HEADERS += \ qxcbeglcontext.h \ diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro index adac4b2e22..88c4144fd9 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/xcb_glx.pro @@ -5,7 +5,7 @@ include(../gl_integrations_plugin_base.pri) #should be removed from the sources DEFINES += XCB_USE_GLX XCB_USE_XLIB -contains(QT_CONFIG, xcb-glx) { +qtConfig(xcb-glx) { DEFINES += XCB_HAS_XCB_GLX QMAKE_USE += xcb_glx } diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index 5915a59c0b..7840a4583f 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -1,7 +1,7 @@ TEMPLATE = subdirs CONFIG += ordered -contains(QT_CONFIG, xcb-qt):SUBDIRS+=xcb-static +!qtConfig(system-xcb): SUBDIRS += xcb-static SUBDIRS += xcb_qpa_lib.pro SUBDIRS += xcb-plugin.pro diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index f995249c0d..0d5f0ca001 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -40,11 +40,11 @@ HEADERS = \ DEFINES += QT_BUILD_XCB_PLUGIN # needed by Xcursor ... -contains(QT_CONFIG, xcb-xlib) { +qtConfig(xcb-xlib) { DEFINES += XCB_USE_XLIB QMAKE_USE += xcb_xlib - contains(QT_CONFIG, xinput2) { + qtConfig(xinput2) { DEFINES += XCB_USE_XINPUT2 SOURCES += qxcbconnection_xi2.cpp QMAKE_USE += xinput2 @@ -52,7 +52,7 @@ contains(QT_CONFIG, xcb-xlib) { } # build with session management support -contains(QT_CONFIG, xcb-sm) { +qtConfig(xcb-sm) { DEFINES += XCB_USE_SM QMAKE_USE += x11sm SOURCES += qxcbsessionmanager.cpp @@ -63,11 +63,10 @@ include(gl_integrations/gl_integrations.pri) CONFIG += qpa/genericunixfontdatabase -contains(QT_CONFIG, dbus-linked) { +qtConfig(dbus-linked): \ QT += dbus -} -contains(QT_CONFIG, xcb-qt) { +!qtConfig(system-xcb) { DEFINES += XCB_USE_RENDER XCB_DIR = ../../../3rdparty/xcb INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude @@ -77,7 +76,7 @@ contains(QT_CONFIG, xcb-qt) { LIBS += -lxcb-xinerama ### there is no configure test for this! qtConfig(xkb): QMAKE_USE += xcb_xkb # to support custom cursors with depth > 1 - contains(QT_CONFIG, xcb-render) { + qtConfig(xcb-render) { DEFINES += XCB_USE_RENDER QMAKE_USE += xcb_render } @@ -85,7 +84,7 @@ contains(QT_CONFIG, xcb-qt) { } # libxkbcommon -contains(QT_CONFIG, xkbcommon-qt) { +!qtConfig(xkbcommon-system) { include(../../../3rdparty/xkbcommon-x11.pri) } else { QMAKE_USE += xkbcommon -- cgit v1.2.3