diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2020-09-29 14:23:07 +0200 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2020-09-29 14:46:43 +0200 |
commit | 0265fd381f7d5379a16587341f7c8e8f5ca4431e (patch) | |
tree | 75bb78ad8ae542dc45d25d2c2f65ac118e077ab2 | |
parent | kde-frameworks/kio: Drop 5.74.1 (r0) (diff) | |
download | gentoo-0265fd381f7d5379a16587341f7c8e8f5ca4431e.tar.gz gentoo-0265fd381f7d5379a16587341f7c8e8f5ca4431e.tar.bz2 gentoo-0265fd381f7d5379a16587341f7c8e8f5ca4431e.zip |
kde-frameworks/qqc2-desktop-style: Move dbus connection in singleton
"Substantially improves the speed and responsiveness of large and complicated
QML-based apps."
Upstream commit f8e56a22721057107bccdf319da36ff82ca2a804
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r-- | kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.74.0-move-dbus-connection-in-singleton.patch | 67 | ||||
-rw-r--r-- | kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.74.0-r1.ebuild | 30 |
2 files changed, 97 insertions, 0 deletions
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 new file mode 100644 index 000000000000..026a5b65d02f --- /dev/null +++ b/kde-frameworks/qqc2-desktop-style/files/qqc2-desktop-style-5.74.0-move-dbus-connection-in-singleton.patch @@ -0,0 +1,67 @@ +From f8e56a22721057107bccdf319da36ff82ca2a804 Mon Sep 17 00:00:00 2001 +From: Marco Martin <notmart@gmail.com> +Date: Mon, 7 Sep 2020 09:52:57 +0000 +Subject: [PATCH] move the dbus connection in the singleton + +connecting to dbus is expensive, do it only once in the singleton +the theme instance will only connecto to the signal forwarded by +the singleton +--- + .../plasmadesktoptheme.cpp | 20 +++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp b/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp +index babb433..ff046eb 100644 +--- a/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp ++++ b/kirigami-plasmadesktop-integration/plasmadesktoptheme.cpp +@@ -45,6 +45,14 @@ public: + { + connect(qGuiApp, &QGuiApplication::paletteChanged, + this, &StyleSingleton::refresh); ++ ++ // Use DBus in order to listen for kdeglobals changes directly, as the ++ // QApplication doesn't expose the font variants we're looking for, ++ // namely smallFont. ++ QDBusConnection::sessionBus().connect( QString(), ++ QStringLiteral( "/KGlobalSettings" ), ++ QStringLiteral( "org.kde.KGlobalSettings" ), ++ QStringLiteral( "notifyChange" ), this, SIGNAL(configurationChanged())); + } + + void refresh() +@@ -125,6 +133,7 @@ public: + KColorScheme viewScheme; + + Q_SIGNALS: ++ void configurationChanged(); + void paletteChanged(); + + private: +@@ -161,14 +170,6 @@ PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent) + }); + } + +- // Use DBus in order to listen for kdeglobals changes directly, as the +- // QApplication doesn't expose the font variants we're looking for, +- // namely smallFont. +- QDBusConnection::sessionBus().connect( QString(), +- QStringLiteral( "/KGlobalSettings" ), +- QStringLiteral( "org.kde.KGlobalSettings" ), +- QStringLiteral( "notifyChange" ), this, SLOT(configurationChanged())); +- + //TODO: correct? depends from https://codereview.qt-project.org/206889 + connect(qGuiApp, &QGuiApplication::fontDatabaseChanged, this, [this]() {setDefaultFont(qApp->font());}); + configurationChanged(); +@@ -181,6 +182,9 @@ PlasmaDesktopTheme::PlasmaDesktopTheme(QObject *parent) + connect(s_style->data(), &StyleSingleton::paletteChanged, + this, &PlasmaDesktopTheme::syncColors); + ++ connect(s_style->data(), &StyleSingleton::configurationChanged, ++ this, &PlasmaDesktopTheme::configurationChanged); ++ + syncColors(); + } + +-- +GitLab + 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 new file mode 100644 index 000000000000..5c012a581d59 --- /dev/null +++ b/kde-frameworks/qqc2-desktop-style/qqc2-desktop-style-5.74.0-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +ECM_QTHELP="false" +PVCUT=$(ver_cut 1-2) +QTMIN=5.14.2 +inherit ecm kde.org + +DESCRIPTION="Style for QtQuickControls 2 that uses QWidget's QStyle for painting" + +LICENSE="|| ( GPL-2+ LGPL-3+ )" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86" +IUSE="" + +DEPEND=" + >=dev-qt/qtdeclarative-${QTMIN}:5= + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtwidgets-${QTMIN}:5 + =kde-frameworks/kconfigwidgets-${PVCUT}*:5 + =kde-frameworks/kiconthemes-${PVCUT}*:5 + =kde-frameworks/kirigami-${PVCUT}*:5 +" +RDEPEND="${DEPEND} + >=dev-qt/qtgraphicaleffects-${QTMIN}:5 + >=dev-qt/qtquickcontrols2-${QTMIN}:5 +" + +PATCHES=( "${FILESDIR}"/${P}-move-dbus-connection-in-singleton.patch ) |