[neon/qt/qtbase/Neon/testing] debian/patches: add patch from branch for dpi

Jonathan Riddell null at kde.org
Wed Oct 28 14:26:41 GMT 2020


Git commit 05dc84007c9e20e5d4055ab0d677de4ac0d12c3a by Jonathan Riddell.
Committed on 28/10/2020 at 14:26.
Pushed by jriddell into branch 'Neon/testing'.

add patch from branch for dpi

A  +83   -0    debian/patches/qtbase.git-65243ad7aef48af4689ea4454916b504025b5051.patch
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/qtbase/commit/05dc84007c9e20e5d4055ab0d677de4ac0d12c3a

diff --git a/debian/patches/qtbase.git-65243ad7aef48af4689ea4454916b504025b5051.patch b/debian/patches/qtbase.git-65243ad7aef48af4689ea4454916b504025b5051.patch
new file mode 100644
index 0000000..5ee94f0
--- /dev/null
+++ b/debian/patches/qtbase.git-65243ad7aef48af4689ea4454916b504025b5051.patch
@@ -0,0 +1,83 @@
+From: Friedemann Kleint <Friedemann.Kleint at qt.io>
+Date: Fri, 25 Sep 2020 12:10:58 +0000 (+0200)
+Subject: Emit QScreen::geometryChanged when the logical DPI changes
+X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqtbase.git;a=commitdiff_plain;h=65243ad7aef48af4689ea4454916b504025b5051;hp=37f5c4a3ee314ac671c07bea6ebf5ae985013cc1
+
+Emit QScreen::geometryChanged when the logical DPI changes
+
+Add the missing call to QScreenPrivate::emitGeometryChangeSignals()
+along with an emission of physicalDotsPerInchChanged()
+since that is calculated from geometry and physical size.
+
+Rearrange the code in
+QGuiApplicationPrivate::processScreenGeometryChange()
+to prevent duplicate emissions of geometryChanged(),
+physicalDotsPerInchChanged() which this change would introduce.
+
+Amends 5290027e3bab75f14fc0a2b7c206594d9cb91e76.
+
+Task-number: QTBUG-76902
+Task-number: QTBUG-79248
+Fixes: QTBUG-86604
+Change-Id: I3dc2ec5ccd9c6413e92f9246242f323e8afc5e57
+Reviewed-by: David Edmundson <davidedmundson at kde.org>
+(cherry picked from commit 5c7307775d32ae0a54acad8ae7a1c9d3cff7d45e)
+Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot at qt-project.org>
+---
+
+diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
+index 239a78313c5..ef090605819 100644
+--- a/src/gui/kernel/qguiapplication.cpp
++++ b/src/gui/kernel/qguiapplication.cpp
+@@ -3162,13 +3162,14 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
+     bool availableGeometryChanged = e->availableGeometry != s->d_func()->availableGeometry;
+     s->d_func()->availableGeometry = e->availableGeometry;
+ 
+-    if (geometryChanged) {
+-        Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
++    const Qt::ScreenOrientation primaryOrientation = s->primaryOrientation();
++    if (geometryChanged)
+         s->d_func()->updatePrimaryOrientation();
+ 
+-        emit s->geometryChanged(s->geometry());
++    s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
++
++    if (geometryChanged) {
+         emit s->physicalSizeChanged(s->physicalSize());
+-        emit s->physicalDotsPerInchChanged(s->physicalDotsPerInch());
+         emit s->logicalDotsPerInchChanged(s->logicalDotsPerInch());
+ 
+         if (s->primaryOrientation() != primaryOrientation)
+@@ -3178,8 +3179,6 @@ void QGuiApplicationPrivate::processScreenGeometryChange(QWindowSystemInterfaceP
+             updateFilteredScreenOrientation(s);
+     }
+ 
+-    s->d_func()->emitGeometryChangeSignals(geometryChanged, availableGeometryChanged);
+-
+     resetCachedDevicePixelRatio();
+ }
+ 
+diff --git a/src/gui/kernel/qscreen.cpp b/src/gui/kernel/qscreen.cpp
+index df628fcc73a..a1afc1ba143 100644
+--- a/src/gui/kernel/qscreen.cpp
++++ b/src/gui/kernel/qscreen.cpp
+@@ -88,6 +88,9 @@ void QScreenPrivate::updateGeometriesWithSignals()
+ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availableGeometryChanged)
+ {
+     Q_Q(QScreen);
++    if (geometryChanged)
++        emit q->geometryChanged(geometry);
++
+     if (availableGeometryChanged)
+         emit q->availableGeometryChanged(availableGeometry);
+ 
+@@ -96,6 +99,9 @@ void QScreenPrivate::emitGeometryChangeSignals(bool geometryChanged, bool availa
+         for (QScreen* sibling : siblings)
+             emit sibling->virtualGeometryChanged(sibling->virtualGeometry());
+     }
++
++    if (geometryChanged)
++        emit q->physicalDotsPerInchChanged(q->physicalDotsPerInch());
+ }
+ 
+ void QScreenPrivate::setPlatformScreen(QPlatformScreen *screen)
diff --git a/debian/patches/series b/debian/patches/series
index 17a775c..9b36ddd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ nonlinux_utime.diff
 qdoc_default_incdirs.diff
 path_max.diff
 qstorageinfo_linux.diff
+qtbase.git-65243ad7aef48af4689ea4454916b504025b5051.patch


More information about the Neon-commits mailing list