From 815341dbec1fd4f04fe76fc438cc9b3308ffafe9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 11 Oct 2016 16:42:11 +0200 Subject: eglfs: Fix deformed mouse cursor image In 5.8 cr got changed to QRect from QRectF. This is incorrect without adjusting the calculations based on it since QRect and QRectF's right() and bottom() differs by 1. Switch back to QRectF. Task-number: QTBUG-56478 Change-Id: I5bde4ee59ca9bbf62f65493c66f42707032bfc80 Reviewed-by: Andy Nichols --- src/plugins/platforms/eglfs/api/qeglfscursor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp index 1b3446c4ac..2b54251a06 100644 --- a/src/plugins/platforms/eglfs/api/qeglfscursor.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfscursor.cpp @@ -341,14 +341,16 @@ void QEglFSCursor::paintOnScreen() if (!m_visible) return; - QRect cr = cursorRect(); // hotspot included + // cr must be a QRectF, otherwise cr.right() and bottom() would be off by + // one in the calculations below. + QRectF cr = cursorRect(); // hotspot included // Support virtual desktop too. Backends with multi-screen support (e.g. all // variants of KMS/DRM) will enable this by default. In this case all // screens are siblings of each other. When not enabled, the sibling list // only contains m_screen itself. for (QPlatformScreen *screen : m_screen->virtualSiblings()) { - if (screen->geometry().contains(cr.topLeft() + m_cursor.hotSpot) + if (screen->geometry().contains(cr.topLeft().toPoint() + m_cursor.hotSpot) && QOpenGLContext::currentContext()->screen() == screen->screen()) { cr.translate(-screen->geometry().topLeft()); -- cgit v1.2.3 From 2b9fe7d42d3e143edf8879c7af7725713611b0d3 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Tue, 4 Oct 2016 10:32:20 +0200 Subject: eglfs: clean up includes in the shared kms code Avoid unnecessary EGL and eglfs-specific includes in order to have a clearer view of the dependencies. Change-Id: Ifbd7dc4bd64024cc1ee48cd9f2607d1b5cdda1a2 Reviewed-by: Andy Nichols --- .../deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp index 6c30e8f930..5368a6d031 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsintegration.cpp @@ -42,15 +42,12 @@ #include "qeglfskmsintegration.h" #include "qeglfskmsdevice.h" #include "qeglfskmsscreen.h" -#include "private/qeglfswindow_p.h" -#include "private/qeglfscursor_p.h" -#include #include #include #include +#include #include -#include #include #include -- cgit v1.2.3 From 135fcd599200cdacf637b5c77824776c3fb181d1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 30 Sep 2016 13:08:03 +0200 Subject: port to modularized platformsupport libraries Change-Id: I20eb0e33abfd70b6a5240e7b6b0aa0425f2d2ee7 Reviewed-by: Jake Petroules --- src/plugins/platforms/eglfs/api/qeglfscontext.cpp | 4 ++-- src/plugins/platforms/eglfs/api/qeglfscontext_p.h | 2 +- .../eglfs/api/qeglfsdeviceintegration.cpp | 2 +- src/plugins/platforms/eglfs/api/qeglfsglobal_p.h | 2 +- .../platforms/eglfs/api/qeglfsintegration.cpp | 28 +++++++++++----------- .../platforms/eglfs/api/qeglfsoffscreenwindow.cpp | 2 +- src/plugins/platforms/eglfs/api/qeglfsscreen.cpp | 2 +- src/plugins/platforms/eglfs/api/qeglfswindow.cpp | 4 ++-- src/plugins/platforms/eglfs/api/qeglfswindow_p.h | 2 +- .../deviceintegration/eglfs_brcm/eglfs_brcm.pro | 2 +- .../deviceintegration/eglfs_kms/eglfs_kms.pro | 2 +- .../eglfs_kms/qeglfskmsgbmintegration.cpp | 2 +- .../eglfs_kms/qeglfskmsgbmscreen.cpp | 2 +- .../eglfs_kms_egldevice/eglfs_kms_egldevice.pro | 2 +- .../qeglfskmsegldeviceintegration.cpp | 2 +- .../qeglfskmsegldeviceintegration.h | 2 +- .../eglfs_kms_support/eglfs_kms_support.pro | 2 +- .../eglfs_kms_support/qeglfskmsscreen.cpp | 2 +- .../deviceintegration/eglfs_mali/eglfs_mali.pro | 2 +- .../deviceintegration/eglfs_viv/eglfs_viv.pro | 2 +- .../eglfs_viv_wl/eglfs_viv_wl.pro | 2 +- .../deviceintegration/eglfs_x11/eglfs_x11.pro | 2 +- src/plugins/platforms/eglfs/eglfs-plugin.pro | 2 +- .../platforms/eglfs/eglfsdeviceintegration.pro | 14 ++++++++++- 24 files changed, 51 insertions(+), 39 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/api/qeglfscontext.cpp b/src/plugins/platforms/eglfs/api/qeglfscontext.cpp index 1a33215295..c5cef34d8e 100644 --- a/src/plugins/platforms/eglfs/api/qeglfscontext.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfscontext.cpp @@ -39,8 +39,8 @@ #include "qeglfsglobal_p.h" #include -#include -#include +#include +#include #include "qeglfscontext_p.h" #include "qeglfswindow_p.h" diff --git a/src/plugins/platforms/eglfs/api/qeglfscontext_p.h b/src/plugins/platforms/eglfs/api/qeglfscontext_p.h index 65af3a7cee..ab5bf99c3c 100644 --- a/src/plugins/platforms/eglfs/api/qeglfscontext_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfscontext_p.h @@ -52,7 +52,7 @@ // #include "qeglfsglobal_p.h" -#include +#include #include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp index 9f05767366..48e0af5479 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp @@ -44,7 +44,7 @@ #include "qeglfsscreen_p.h" #include "qeglfshooks_p.h" -#include +#include #include #include #include diff --git a/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h b/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h index bad5095d21..8d76ff5ee0 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfsglobal_p.h @@ -53,7 +53,7 @@ #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp index 4974499e0a..733f0bd139 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp @@ -49,7 +49,6 @@ #include #include #include -#include #include "qeglfsintegration_p.h" #include "qeglfswindow_p.h" @@ -58,30 +57,31 @@ #include "qeglfsoffscreenwindow_p.h" #include "qeglfscursor_p.h" -#include -#include -#include +#include +#include +#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #if QT_CONFIG(libinput) -#include +#include #endif #if QT_CONFIG(evdev) -#include -#include -#include +#include +#include +#include #endif #if QT_CONFIG(tslib) -#include +#include #endif #include diff --git a/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp b/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp index 7de5379ae3..864271cd3a 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsoffscreenwindow.cpp @@ -40,7 +40,7 @@ #include "qeglfsoffscreenwindow_p.h" #include "qeglfshooks_p.h" #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp index b0c32e5176..5613179041 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include "qeglfsscreen_p.h" #include "qeglfswindow_p.h" diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp index 5ce88e6bd8..e79b377d40 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp @@ -43,8 +43,8 @@ #include #include #include -#include -#include +#include +#include #include "qeglfswindow_p.h" #include "qeglfscursor_p.h" diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h index 6e752b8f79..0889f27ae3 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h @@ -56,7 +56,7 @@ #include "qeglfsscreen_p.h" #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro index 7f1e7b9f59..fee67da2de 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_brcm/eglfs_brcm.pro @@ -1,6 +1,6 @@ TARGET = qeglfs-brcm-integration -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private +QT += core-private gui-private eglfsdeviceintegration-private INCLUDEPATH += $$PWD/../../api CONFIG += egl diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro index 10571dc978..255db824b7 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/eglfs_kms.pro @@ -4,7 +4,7 @@ PLUGIN_TYPE = egldeviceintegrations PLUGIN_CLASS_NAME = QEglFSKmsGbmIntegrationPlugin load(qt_plugin) -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private eglfs_kms_support-private +QT += core-private gui-private eglfsdeviceintegration-private eglfs_kms_support-private INCLUDEPATH += $$PWD/../../api $$PWD/../eglfs_kms_support diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp index a5ab73cca4..a78f445995 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp @@ -45,7 +45,7 @@ #include "qeglfskmsgbmcursor.h" #include "private/qeglfscursor_p.h" -#include +#include #include #include #include diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp index 75ff3ac749..bed775ff81 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp @@ -47,7 +47,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro index 582982df76..a625021aba 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/eglfs_kms_egldevice.pro @@ -1,6 +1,6 @@ TARGET = qeglfs-kms-egldevice-integration -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private eglfs_kms_support-private +QT += core-private gui-private eglfsdeviceintegration-private eglfs_kms_support-private INCLUDEPATH += $$PWD/../../api $$PWD/../eglfs_kms_support diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp index ddb2499751..d0c9c9565e 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp @@ -39,7 +39,7 @@ ****************************************************************************/ #include "qeglfskmsegldeviceintegration.h" -#include +#include #include "private/qeglfswindow_p.h" #include "private/qeglfscursor_p.h" #include "qeglfskmsegldevice.h" diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h index 375c388548..cddfdbd5c6 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.h @@ -46,7 +46,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro index f88a7c847e..487edb569e 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/eglfs_kms_support.pro @@ -2,7 +2,7 @@ TARGET = QtEglFsKmsSupport CONFIG += no_module_headers internal_module load(qt_module) -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private +QT += core-private gui-private eglfsdeviceintegration-private INCLUDEPATH += $$PWD/../../api diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp index e4b6c67f28..4021609407 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.cpp @@ -46,7 +46,7 @@ #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro index e72f5bdd14..5e6f636e2b 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_mali/eglfs_mali.pro @@ -1,6 +1,6 @@ TARGET = qeglfs-mali-integration -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private +QT += core-private gui-private eglfsdeviceintegration-private # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro index 364812ec60..f9cce8d48b 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv/eglfs_viv.pro @@ -1,6 +1,6 @@ TARGET = qeglfs-viv-integration -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private +QT += core-private gui-private eglfsdeviceintegration-private INCLUDEPATH += $$PWD/../../api CONFIG += egl diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro index ccdf20b417..f934fd85ed 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro @@ -1,6 +1,6 @@ TARGET = qeglfs-viv-wl-integration -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private +QT += core-private gui-private eglfsdeviceintegration-private INCLUDEPATH += $$PWD/../../api CONFIG += egl diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro index 51a026e2cf..391f63615b 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro @@ -1,6 +1,6 @@ TARGET = qeglfs-x11-integration -QT += core-private gui-private platformsupport-private eglfsdeviceintegration-private +QT += core-private gui-private eglfsdeviceintegration-private # Avoid X11 header collision, use generic EGL native types DEFINES += QT_EGL_NO_X11 diff --git a/src/plugins/platforms/eglfs/eglfs-plugin.pro b/src/plugins/platforms/eglfs/eglfs-plugin.pro index d8adc13226..cf4863975a 100644 --- a/src/plugins/platforms/eglfs/eglfs-plugin.pro +++ b/src/plugins/platforms/eglfs/eglfs-plugin.pro @@ -1,6 +1,6 @@ TARGET = qeglfs -QT += platformsupport-private eglfsdeviceintegration-private +QT += eglfsdeviceintegration-private SOURCES += $$PWD/qeglfsmain.cpp diff --git a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro index 15a825a7b0..638d12a368 100644 --- a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro +++ b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro @@ -8,7 +8,15 @@ TARGET = QtEglFSDeviceIntegration CONFIG += internal_module MODULE = eglfsdeviceintegration -QT += core-private gui-private platformsupport-private +QT += \ + core-private gui-private \ + devicediscovery_support-private eventdispatcher_support-private \ + service_support-private theme_support-private fontdatabase_support-private \ + fb_support-private egl_support-private platformcompositor_support-private + +qtHaveModule(input_support-private): \ + QT += input_support-private + LIBS += $$QMAKE_LIBS_DYNLOAD # Avoid X11 header collision, use generic EGL native types @@ -33,6 +41,10 @@ QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF CONFIG += egl qpa/genericunixfontdatabase +# Prevent gold linker from crashing. +# This started happening when QtPlatformSupport was modularized. +use_gold_linker: CONFIG += no_linker_version_script + !contains(DEFINES, QT_NO_CURSOR): RESOURCES += $$PWD/cursor.qrc load(qt_module) -- cgit v1.2.3 From f25afef61da17088fc9cdeb15be7144ef0c7c867 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 12 Oct 2016 12:08:33 +0200 Subject: rely on transitive library dependencies for freetype/fontconfig so far, we have been delaying the linking, because we didn't want to make the monolithic platformsupport module pull in spurious dependencies. however, now that the module was split, there is no need to play such games any more. a nice effect of this is that the hideous qpa/*unixfontdatabase.prf files disappear, and finally freetype_dependency.pri also becomes trivial and is thus inlined. Change-Id: I255376d592625542310a31222eb6ac965943df99 Reviewed-by: Jake Petroules --- src/plugins/platforms/eglfs/eglfsdeviceintegration.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro index 638d12a368..35af3615bd 100644 --- a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro +++ b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro @@ -39,7 +39,7 @@ QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF DEFINES += EGLFS_PREFERRED_PLUGIN=$$EGLFS_DEVICE_INTEGRATION } -CONFIG += egl qpa/genericunixfontdatabase +CONFIG += egl # Prevent gold linker from crashing. # This started happening when QtPlatformSupport was modularized. -- cgit v1.2.3 From b6df7257501b54521c25587c3c5e600b2c9393d1 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 20 Oct 2016 18:31:10 +0200 Subject: Fix UB (ininited pointer read) in qt_egl_device_integration() The m_integration member of DeviceIntegration, a naked pointer, was checked for nullptr in the DeviceIntegration ctor, but never set to nullptr. Fix by init'ing it to nullptr in the ctor-init-list. Coverity-Id: 172056 Change-Id: Ia1dc9b67b9d16a991bba82338eedb19de68f91d8 Reviewed-by: Thiago Macieira --- src/plugins/platforms/eglfs/qeglfshooks.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/qeglfshooks.cpp b/src/plugins/platforms/eglfs/qeglfshooks.cpp index cf016d1b01..638960d998 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks.cpp @@ -61,6 +61,7 @@ private: Q_GLOBAL_STATIC(DeviceIntegration, deviceIntegration) DeviceIntegration::DeviceIntegration() + : m_integration(Q_NULLPTR) { QStringList pluginKeys = QEGLDeviceIntegrationFactory::keys(); if (!pluginKeys.isEmpty()) { -- cgit v1.2.3 From 33aa2fdd08880d2d6e2a4ff658b34c3a81c0b4ea Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 19 Sep 2016 21:41:36 -0700 Subject: Fix change-of-sign warnings caught by ICC 17 error #68: integer conversion resulted in a change of sign Change-Id: I33dc971f005a4848bb8ffffd1475ee53d394acf6 Reviewed-by: Andrew Knight Reviewed-by: Laszlo Agocs --- .../deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp index 55d5941e5f..1f672afeb4 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp @@ -88,7 +88,7 @@ void QEglFSKmsEglDeviceScreen::waitForFlip() qCDebug(qLcEglfsKmsDebug, "Setting mode"); int ret = drmModeSetCrtc(device()->fd(), output().crtc_id, - -1, 0, 0, + uint32_t(-1), 0, 0, &output().connector_id, 1, &output().modes[output().mode]); if (ret) -- cgit v1.2.3 From c30e62c7750b804bfe6f3ed29914ebb42890230d Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 19 Oct 2016 14:27:51 +0300 Subject: Plugins: use const (and const APIs) more For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I625d57c0c19e87ac2de681bb16d0cc5a7a59b366 Reviewed-by: Edward Welbourne --- src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp | 2 +- .../eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp index 48e0af5479..3e1e93f1e4 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsdeviceintegration.cpp @@ -199,7 +199,7 @@ void QEglFSDeviceIntegration::screenDestroy() QEglFSIntegration *platformIntegration = static_cast( QGuiApplicationPrivate::platformIntegration()); while (!app->screens().isEmpty()) - platformIntegration->removeScreen(app->screens().last()->handle()); + platformIntegration->removeScreen(app->screens().constLast()->handle()); } QSizeF QEglFSDeviceIntegration::physicalScreenSize() const diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp index a78f445995..38419a55c8 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmintegration.cpp @@ -126,7 +126,7 @@ QEglFSKmsDevice *QEglFSKmsGbmIntegration::createDevice(const QString &devicePath } else { QDeviceDiscovery *d = QDeviceDiscovery::create(QDeviceDiscovery::Device_VideoMask); - QStringList devices = d->scanConnectedDevices(); + const QStringList devices = d->scanConnectedDevices(); qCDebug(qLcEglfsKmsDebug) << "Found the following video devices:" << devices; d->deleteLater(); -- cgit v1.2.3 From 04f0a69e96fca03c18e0c7eaaab7babc49e35198 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 25 Oct 2016 15:22:01 +0200 Subject: Replace PKGCONFIG+=foo usages with QMAKE_USE replace explicit pkg-config uses with the results of configure tests, for consistency. Change-Id: I3587db6085798ea7a49f8871fc6838eb687a6391 Reviewed-by: Oswald Buddenhagen --- .../platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro index f934fd85ed..065a103376 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_viv_wl/eglfs_viv_wl.pro @@ -14,8 +14,7 @@ HEADERS += $$PWD/qeglfsvivwlintegration.h OTHER_FILES += $$PWD/eglfs_viv_wl.json -CONFIG += link_pkgconfig -PKGCONFIG_PRIVATE += wayland-server +QMAKE_USE_PRIVATE += wayland_server PLUGIN_TYPE = egldeviceintegrations PLUGIN_CLASS_NAME = QEglFSVivWaylandIntegrationPlugin -- cgit v1.2.3 From f577a01f5e8d9678d268917ca727a6e9a3e819a6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 27 Oct 2016 12:29:26 +0200 Subject: eglfs: Cast to EGLNativeDisplayType in EGLDevice backend When compiling with EGL native types being the Xlib types (uncommon since we disable this both for Mesa and NVIDIA embedded, but can happen with other vendor's headers), the types for EGLDeviceEXT (void*) and EGLNativeDisplayType (Display, i.e. _XDisplay*) won't match, breaking compilation. At runtime we won't hit that path, so all we need to ensure is that the code compiles. Do this via a cast. When the native types are generic, both types are void* so the cast has no effect. Change-Id: Ib54f569d4494906f74107f08b47bd6b521d700db Reviewed-by: Louai Al-Khanji --- .../eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs') diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp index 743f714cf0..f6e86bf0bc 100644 --- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp +++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevice.cpp @@ -71,7 +71,7 @@ void QEglFSKmsEglDevice::close() EGLNativeDisplayType QEglFSKmsEglDevice::nativeDisplay() const { - return static_cast(m_integration)->eglDevice(); + return reinterpret_cast(static_cast(m_integration)->eglDevice()); } QEglFSKmsScreen *QEglFSKmsEglDevice::createScreen(QEglFSKmsIntegration *integration, QEglFSKmsDevice *device, QEglFSKmsOutput output, QPoint position) -- cgit v1.2.3