From b0ffb332f2aa2ffc0b752c2ad740fbb6a69e0167 Mon Sep 17 00:00:00 2001 From: Jake Petroules Date: Fri, 22 Sep 2017 13:19:36 -0700 Subject: Add missing math.h include (for sqrt function) Change-Id: Ia9cee8a941e31d71d3df6094b21d20a26f1b46f1 Reviewed-by: Thiago Macieira --- src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/platformsupport') diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 11f7311bb7..5d839cced7 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -55,6 +55,8 @@ #include #endif +#include + #if QT_CONFIG(mtdev) extern "C" { #include -- cgit v1.2.3 From 32ca19b2c5fbd515cdb84ebf379cb5b43e3570cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Tue, 12 Sep 2017 09:20:19 +0100 Subject: Fix typo in debug statement: QPlatformScren -> QPlatformScreen Change-Id: Ibf5046ff88cbad1f03966f39f62183b0bd750221 Reviewed-by: Laszlo Agocs --- src/platformsupport/kmsconvenience/qkmsdevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/kmsconvenience/qkmsdevice.cpp b/src/platformsupport/kmsconvenience/qkmsdevice.cpp index 669abab331..a8eefe65ed 100644 --- a/src/platformsupport/kmsconvenience/qkmsdevice.cpp +++ b/src/platformsupport/kmsconvenience/qkmsdevice.cpp @@ -489,7 +489,7 @@ void QKmsDevice::createScreens() } else { virtualPos = orderedScreen.vinfo.virtualPos; } - qCDebug(qLcKmsDebug) << "Adding QPlatformScren" << s << "(" << s->name() << ")" + qCDebug(qLcKmsDebug) << "Adding QPlatformScreen" << s << "(" << s->name() << ")" << "to QPA with geometry" << s->geometry() << "and isPrimary=" << orderedScreen.vinfo.isPrimary; // The order in qguiapp's screens list will match the order set by -- cgit v1.2.3 From 3c59065d5cb5f82f90ed2e830e10c5807deeaf2c Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Tue, 12 Sep 2017 16:18:58 +0200 Subject: qglxconvenience: Avoid null pointer dereference glXGetVisualFromFBConfig according to documentation can return NULL [1]. This may result in a crash when running Qt applications using ARGB windows with XLIB_SKIP_ARGB_VISUALS defined. Also guard QXlibScopedPointerDeleter against illegally calling XFree(nullptr). [1] https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glXGetVisualFromFBConfig.xml Task-number: QTBUG-58910 Change-Id: Ie076a1e906ed632543bdab03ef365f699533a61a Reviewed-by: Gatis Paeglis --- src/platformsupport/glxconvenience/qglxconvenience.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp index 8c26550c1e..74b7c63473 100644 --- a/src/platformsupport/glxconvenience/qglxconvenience.cpp +++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp @@ -164,7 +164,8 @@ bool QXcbSoftwareOpenGLEnforcer::forceSoftwareOpenGL = false; template struct QXlibScopedPointerDeleter { static inline void cleanup(T *pointer) { - XFree(pointer); + if (pointer) + XFree(pointer); } }; @@ -202,6 +203,8 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format GLXFBConfig candidate = configs[i]; QXlibPointer visual(glXGetVisualFromFBConfig(display, candidate)); + if (visual.isNull()) + continue; const int actualRed = qPopulationCount(visual->red_mask); const int actualGreen = qPopulationCount(visual->green_mask); -- cgit v1.2.3