Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/qqc2-desktop-style/, kde-frameworks/qqc2-desktop-style/files/
Date: Tue, 29 Sep 2020 12:49:37
Message-Id: 1601383603.0265fd381f7d5379a16587341f7c8e8f5ca4431e.asturm@gentoo
1 commit: 0265fd381f7d5379a16587341f7c8e8f5ca4431e
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 29 12:23:07 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 29 12:46:43 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0265fd38
7
8 kde-frameworks/qqc2-desktop-style: Move dbus connection in singleton
9
10 "Substantially improves the speed and responsiveness of large and complicated
11 QML-based apps."
12
13 Upstream commit f8e56a22721057107bccdf319da36ff82ca2a804
14
15 Package-Manager: Portage-3.0.8, Repoman-3.0.1
16 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
17
18 ...-5.74.0-move-dbus-connection-in-singleton.patch | 67 ++++++++++++++++++++++
19 .../qqc2-desktop-style-5.74.0-r1.ebuild | 30 ++++++++++
20 2 files changed, 97 insertions(+)
21
22 diff --git a/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.74.0-move-dbus-connection-in-singleton.patch b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.74.0-move-dbus-connection-in-singleton.patch
23 new file mode 100644
24 index 00000000000..026a5b65d02
25 --- /dev/null
26 +++ b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.74.0-move-dbus-connection-in-singleton.patch
27 @@ -0,0 +1,67 @@
28 +From f8e56a22721057107bccdf319da36ff82ca2a804 Mon Sep 17 00:00:00 2001
29 +From: Marco Martin <notmart@×××××.com>
30 +Date: Mon, 7 Sep 2020 09:52:57 +0000
31 +Subject: [PATCH] move the dbus connection in the singleton
32 +
33 +connecting to dbus is expensive, do it only once in the singleton
34 +the theme instance will only connecto to the signal forwarded by
35 +the singleton
36 +---
37 + .../plasmadesktoptheme.cpp | 20 +++++++++++--------
38 + 1 file changed, 12 insertions(+), 8 deletions(-)
39 +
40 +diff --git a/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp b/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
41 +index babb433..ff046eb 100644
42 +--- a/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
43 ++++ b/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp
44 +@@ -45,6 +45,14 @@ public:
45 + {
46 + connect(qGuiApp, &QGuiApplication::paletteChanged,
47 + this, &StyleSingleton::refresh);
48 ++
49 ++ // Use DBus in order to listen for kdeglobals changes directly, as the
50 ++ // QApplication doesn't expose the font variants we're looking for,
51 ++ // namely smallFont.
52 ++ QDBusConnection::sessionBus().connect( QString(),
53 ++ QStringLiteral( "/KGlobalSettings" ),
54 ++ QStringLiteral( "org.kde.KGlobalSettings" ),
55 ++ QStringLiteral( "notifyChange" ), this, SIGNAL(configurationChanged()));
56 + }
57 +
58 + void refresh()
59 +@@ -125,6 +133,7 @@ public:
60 + KColorScheme viewScheme;
61 +
62 + Q_SIGNALS:
63 ++ void configurationChanged();
64 + void paletteChanged();
65 +
66 + private:
67 +@@ -161,14 +170,6 @@ PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent)
68 + });
69 + }
70 +
71 +- // Use DBus in order to listen for kdeglobals changes directly, as the
72 +- // QApplication doesn't expose the font variants we're looking for,
73 +- // namely smallFont.
74 +- QDBusConnection::sessionBus().connect( QString(),
75 +- QStringLiteral( "/KGlobalSettings" ),
76 +- QStringLiteral( "org.kde.KGlobalSettings" ),
77 +- QStringLiteral( "notifyChange" ), this, SLOT(configurationChanged()));
78 +-
79 + //TODO: correct? depends from https://codereview.qt-project.org/206889
80 + connect(qGuiApp, &QGuiApplication::fontDatabaseChanged, this, [this]() {setDefaultFont(qApp->font());});
81 + configurationChanged();
82 +@@ -181,6 +182,9 @@ PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent)
83 + connect(s_style->data(), &StyleSingleton::paletteChanged,
84 + this, &PlasmaDesktopTheme::syncColors);
85 +
86 ++ connect(s_style->data(), &StyleSingleton::configurationChanged,
87 ++ this, &PlasmaDesktopTheme::configurationChanged);
88 ++
89 + syncColors();
90 + }
91 +
92 +--
93 +GitLab
94 +
95
96 diff --git a/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.74.0-r1.ebuild b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.74.0-r1.ebuild
97 new file mode 100644
98 index 00000000000..5c012a581d5
99 --- /dev/null
100 +++ b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.74.0-r1.ebuild
101 @@ -0,0 +1,30 @@
102 +# Copyright 1999-2020 Gentoo Authors
103 +# Distributed under the terms of the GNU General Public License v2
104 +
105 +EAPI=7
106 +
107 +ECM_QTHELP="false"
108 +PVCUT=$(ver_cut 1-2)
109 +QTMIN=5.14.2
110 +inherit ecm kde.org
111 +
112 +DESCRIPTION="Style for QtQuickControls 2 that uses QWidget's QStyle for painting"
113 +
114 +LICENSE="|| ( GPL-2+ LGPL-3+ )"
115 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
116 +IUSE=""
117 +
118 +DEPEND="
119 + >=dev-qt/qtdeclarative-${QTMIN}:5=
120 + >=dev-qt/qtgui-${QTMIN}:5
121 + >=dev-qt/qtwidgets-${QTMIN}:5
122 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5
123 + =kde-frameworks/kiconthemes-${PVCUT}*:5
124 + =kde-frameworks/kirigami-${PVCUT}*:5
125 +"
126 +RDEPEND="${DEPEND}
127 + >=dev-qt/qtgraphicaleffects-${QTMIN}:5
128 + >=dev-qt/qtquickcontrols2-${QTMIN}:5
129 +"
130 +
131 +PATCHES=( "${FILESDIR}"/${P}-move-dbus-connection-in-singleton.patch )