diff options
author | Andreas Sturmlechner <asturm@gentoo.org> | 2024-11-15 14:31:17 +0100 |
---|---|---|
committer | Andreas Sturmlechner <asturm@gentoo.org> | 2024-11-15 14:46:30 +0100 |
commit | a628f1fbc68740bf9a9ea3c829b5df8a6783328c (patch) | |
tree | 8da544dcfdf97be6236356366d016f16c8416bf3 /kde-frameworks | |
parent | kde-frameworks/kio: KFilePlacesItem: Use Solid to find home mount point (diff) | |
download | gentoo-a628f1fbc68740bf9a9ea3c829b5df8a6783328c.tar.gz gentoo-a628f1fbc68740bf9a9ea3c829b5df8a6783328c.tar.bz2 gentoo-a628f1fbc68740bf9a9ea3c829b5df8a6783328c.zip |
kde-frameworks/solid: fstab: Emit accessibilityChanged only when changed
See also:
https://invent.kde.org/frameworks/solid/-/merge_requests/179
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-frameworks')
-rw-r--r-- | kde-frameworks/solid/files/solid-5.116.0-accessibilityChanged-only-when-changed.patch | 43 | ||||
-rw-r--r-- | kde-frameworks/solid/solid-5.116.0-r1.ebuild | 52 |
2 files changed, 95 insertions, 0 deletions
diff --git a/kde-frameworks/solid/files/solid-5.116.0-accessibilityChanged-only-when-changed.patch b/kde-frameworks/solid/files/solid-5.116.0-accessibilityChanged-only-when-changed.patch new file mode 100644 index 000000000000..4791f19dfb49 --- /dev/null +++ b/kde-frameworks/solid/files/solid-5.116.0-accessibilityChanged-only-when-changed.patch @@ -0,0 +1,43 @@ +From d8d9502e5fee9e35ee4b8dc7e5aeabee962fb0c2 Mon Sep 17 00:00:00 2001 +From: Kai Uwe Broulik <kai.uwe.broulik@basyskom.com> +Date: Wed, 18 Sep 2024 12:37:37 +0200 +Subject: [PATCH] fstab: Emit accessibilityChanged only when actually changed + +Otherwise this will signal a change whenever mtab changes, +leading to redundant updates and wakeups downstream. + +Signed-off-by: Kiriakos Antoniadis <kiriakos.antoniadis@advantest.com> +(cherry picked from commit 493e5e3b919d7e421e5355c43fd5dbdfcdbabaa8) +--- + .../devices/backends/fstab/fstabstorageaccess.cpp | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/solid/devices/backends/fstab/fstabstorageaccess.cpp b/src/solid/devices/backends/fstab/fstabstorageaccess.cpp +index 6baaf1d7..5c46cc82 100644 +--- a/src/solid/devices/backends/fstab/fstabstorageaccess.cpp ++++ b/src/solid/devices/backends/fstab/fstabstorageaccess.cpp +@@ -145,13 +145,17 @@ void FstabStorageAccess::onMtabChanged(const QString &device) + if (currentMountPoints.isEmpty()) { + // device umounted + m_filePath = FstabHandling::mountPoints(device).first(); +- m_isAccessible = false; +- Q_EMIT accessibilityChanged(false, QString(FSTAB_UDI_PREFIX) + "/" + device); ++ if (m_isAccessible) { ++ m_isAccessible = false; ++ Q_EMIT accessibilityChanged(false, QString(FSTAB_UDI_PREFIX) + "/" + device); ++ } + } else { + // device added + m_filePath = currentMountPoints.first(); +- m_isAccessible = true; +- Q_EMIT accessibilityChanged(true, QString(FSTAB_UDI_PREFIX) + "/" + device); ++ if (!m_isAccessible) { ++ m_isAccessible = true; ++ Q_EMIT accessibilityChanged(true, QString(FSTAB_UDI_PREFIX) + "/" + device); ++ } + } + } + +-- +GitLab + diff --git a/kde-frameworks/solid/solid-5.116.0-r1.ebuild b/kde-frameworks/solid/solid-5.116.0-r1.ebuild new file mode 100644 index 000000000000..aa3e75dc981d --- /dev/null +++ b/kde-frameworks/solid/solid-5.116.0-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +QTMIN=5.15.9 +inherit ecm frameworks.kde.org optfeature + +DESCRIPTION="Provider for platform independent hardware discovery, abstraction and management" + +LICENSE="LGPL-2.1+" +KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" +IUSE="ios" + +RDEPEND=" + >=dev-qt/qtdbus-${QTMIN}:5 + >=dev-qt/qtdeclarative-${QTMIN}:5 + >=dev-qt/qtgui-${QTMIN}:5 + >=dev-qt/qtxml-${QTMIN}:5 + sys-apps/util-linux + sys-fs/udisks:2 + virtual/libudev:= + ios? ( + app-pda/libimobiledevice:= + app-pda/libplist:= + ) +" +DEPEND="${RDEPEND} + test? ( >=dev-qt/qtconcurrent-${QTMIN}:5 ) +" +BDEPEND=" + app-alternatives/lex + app-alternatives/yacc + >=dev-qt/linguist-tools-${QTMIN}:5 +" + +PATCHES=( "${FILESDIR}/${P}-accessibilityChanged-only-when-changed.patch" ) + +src_configure() { + local mycmakeargs=( + $(cmake_use_find_package ios IMobileDevice) + $(cmake_use_find_package ios PList) + ) + ecm_src_configure +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + optfeature "media player devices support" app-misc/media-player-info + fi + ecm_pkg_postinst +} |