From 6c7e121738dbf22b1b0acbe2a63481c54053f014 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 20 Jan 2020 11:08:21 +0000 Subject: Revert "Do not read Xft.dpi on platforms that shouldn't be using Xft settings" This reverts commit c7fec68e1936576070d0fbac6cf40b818366d298. This commit introduces a behavioural change within 5.14. It's designed to special case plasma with a fix, but in practice it will cause us more problems. It will break: - font size on plasmashell and kwin on xcb which do not use Qt scaling - xwayland on projectors/headless tests The original bug of double scaling that this was trying to fix is fixed by b31852c4caa36cc564e25adbdacfa534e1dfe7c0 which is in 5.14.1 which works in combination with the environment variables we set in plasma so this is not needed. Fixes: QTBUG-81532 Change-Id: I2f1b8ae4aecf7b80be4dbee812e6b4a64244fb1f Reviewed-by: Allan Sandfeld Jensen --- src/plugins/platforms/xcb/qxcbscreen.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp index 44d0bb3f55..e937464c62 100644 --- a/src/plugins/platforms/xcb/qxcbscreen.cpp +++ b/src/plugins/platforms/xcb/qxcbscreen.cpp @@ -41,7 +41,6 @@ #include "qxcbwindow.h" #include "qxcbcursor.h" #include "qxcbimage.h" -#include "qxcbintegration.h" #include "qnamespace.h" #include "qxcbxsettings.h" @@ -50,7 +49,6 @@ #include #include -#include #include #include #include @@ -368,15 +366,6 @@ static QFontEngine::SubpixelAntialiasingType parseXftRgba(const QByteArray& stri void QXcbVirtualDesktop::readXResources() { - const QPlatformServices *services = QXcbIntegration::instance()->services(); - bool useXftConf = false; - if (services) { - const QList desktopEnv = services->desktopEnvironment().split(':'); - useXftConf = desktopEnv.contains("GNOME") || desktopEnv.contains("UNITY") || desktopEnv.contains("XFCE"); - } - if (!useXftConf) - return; - int offset = 0; QByteArray resources; while (true) { -- cgit v1.2.3 From 6c23f006e07b774b0eef863cccd36a992274ca32 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 20 Jan 2020 16:34:15 +0100 Subject: Windows QPA: Prospective fix for crash occurring when changing screen during session lock Check on currentScreen in QWindowsWindow::checkForScreenChanged(). Fixes: QTBUG-80436 Change-Id: I19e34b9e2c32c9cfc8e5e5b758783c0ab89d5556 Reviewed-by: Oliver Wolff --- src/plugins/platforms/windows/qwindowswindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index ea91e3bb2d..496b18ba1a 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1935,12 +1935,13 @@ void QWindowsWindow::checkForScreenChanged(ScreenChangeMode mode) if (newScreen == nullptr || newScreen == currentScreen) return; // For screens with different DPI: postpone until WM_DPICHANGE - if (mode == FromGeometryChange + // Check on currentScreen as it can be 0 when resuming a session (QTBUG-80436). + if (mode == FromGeometryChange && currentScreen != nullptr && !equalDpi(currentScreen->logicalDpi(), newScreen->logicalDpi())) { return; } qCDebug(lcQpaWindows).noquote().nospace() << __FUNCTION__ - << ' ' << window() << " \"" << currentScreen->name() + << ' ' << window() << " \"" << (currentScreen ? currentScreen->name() : QString()) << "\"->\"" << newScreen->name() << '"'; if (mode == FromGeometryChange) setFlag(SynchronousGeometryChangeEvent); -- cgit v1.2.3 From 3bbd21ccc40805fce3437cf95bb238fc52bbf026 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 20 Jan 2020 16:50:21 +0200 Subject: Release the local ref immediately The local refs are released by the JVM when we exit the function, but if we need tons of local refs, JVM will not be happy. Fixes: QTBUG-81077 Change-Id: Ic38a5be1a563cb9c2465f9f902ff6ae6c61e698b Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins') diff --git a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp index fcc08ea00d..625473964d 100644 --- a/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp +++ b/src/plugins/platforms/android/qandroidassetsfileenginehandler.cpp @@ -146,7 +146,7 @@ public: jobjectArray jFiles = static_cast(files.object()); const jint nFiles = env->GetArrayLength(jFiles); for (int i = 0; i < nFiles; ++i) { - AssetItem item{QJNIObjectPrivate(env->GetObjectArrayElement(jFiles, i)).toString()}; + AssetItem item{QJNIObjectPrivate::fromLocalRef(env->GetObjectArrayElement(jFiles, i)).toString()}; insert(std::upper_bound(begin(), end(), item, [](const auto &a, const auto &b){ return a.name < b.name; }), item); -- cgit v1.2.3