commit:     3ee70e6a8a9a6a34c549ccf045f5f9e57e82529b
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 16 19:32:23 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Jul 16 21:40:22 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ee70e6a

kde-frameworks/knewstuff: EntryDetails.qml: Qualify newStuffModel

... use downloadItemId

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=483659

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../knewstuff-6.4.0-fix-reference-error.patch      | 38 ++++++++++++++++++++
 kde-frameworks/knewstuff/knewstuff-6.4.0-r1.ebuild | 42 ++++++++++++++++++++++
 2 files changed, 80 insertions(+)

diff --git 
a/kde-frameworks/knewstuff/files/knewstuff-6.4.0-fix-reference-error.patch 
b/kde-frameworks/knewstuff/files/knewstuff-6.4.0-fix-reference-error.patch
new file mode 100644
index 000000000000..536b8d7533ea
--- /dev/null
+++ b/kde-frameworks/knewstuff/files/knewstuff-6.4.0-fix-reference-error.patch
@@ -0,0 +1,38 @@
+From f8fb221d6f355c4f0873592fbf7dce358f4f0b40 Mon Sep 17 00:00:00 2001
+From: Akseli Lahtinen <[email protected]>
+Date: Fri, 12 Jul 2024 12:58:53 +0000
+Subject: [PATCH] EntryDetails.qml: Qualify newStuffModel, use downloadItemId
+
+There is no such thing as entryId, change it to downloadItemId
+Otherwise the item wont download anything.
+
+This fixes a bug where in detailed item view, if the list with multiple 
downloads
+appears and user clicks download, nothing would happen and knewstuff would 
report this
+warning in terminal: `qrc:/qt/qml/org/kde/newstuff/EntryDetails.qml:88: 
ReferenceError: entryId is not defined`
+
+After this fix it will download items.
+
+BUG:483659
+---
+ src/qtquick/qml/EntryDetails.qml | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/qtquick/qml/EntryDetails.qml 
b/src/qtquick/qml/EntryDetails.qml
+index d21e18fc2..94fc88d76 100644
+--- a/src/qtquick/qml/EntryDetails.qml
++++ b/src/qtquick/qml/EntryDetails.qml
+@@ -85,9 +85,9 @@ KCMUtils.SimpleKCM {
+         parent: component.QQC2.Overlay.overlay
+ 
+         onItemPicked: (entry, downloadItemId, downloadName) => {
+-            const entryName = newStuffModel.data(newStuffModel.index(entryId, 
0), NewStuff.ItemsModel.NameRole);
++            const entryName = 
component.newStuffModel.data(component.newStuffModel.index(downloadItemId, 0), 
NewStuff.ItemsModel.NameRole);
+             applicationWindow().showPassiveNotification(i18ndc("knewstuff6", 
"A passive notification shown when installation of an item is initiated", 
"Installing %1 from %2", downloadName, entryName), 1500);
+-            newStuffModel.engine.install(component.entry, downloadItemId);
++            component.newStuffModel.engine.install(component.entry, 
downloadItemId);
+         }
+     }
+ 
+-- 
+GitLab
+

diff --git a/kde-frameworks/knewstuff/knewstuff-6.4.0-r1.ebuild 
b/kde-frameworks/knewstuff/knewstuff-6.4.0-r1.ebuild
new file mode 100644
index 000000000000..266488aa0e98
--- /dev/null
+++ b/kde-frameworks/knewstuff/knewstuff-6.4.0-r1.ebuild
@@ -0,0 +1,42 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_DESIGNERPLUGIN="true"
+ECM_TEST="false"
+PVCUT=$(ver_cut 1-2)
+QTMIN=6.6.2
+inherit ecm frameworks.kde.org
+
+DESCRIPTION="Framework for downloading and sharing additional application data"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
+IUSE="opds"
+
+DEPEND="
+       >=dev-qt/qtbase-${QTMIN}:6[gui,network,widgets,xml]
+       >=dev-qt/qtdeclarative-${QTMIN}:6[widgets]
+       =kde-frameworks/attica-${PVCUT}*:6
+       =kde-frameworks/karchive-${PVCUT}*:6
+       =kde-frameworks/kconfig-${PVCUT}*:6
+       =kde-frameworks/kcoreaddons-${PVCUT}*:6
+       =kde-frameworks/ki18n-${PVCUT}*:6
+       =kde-frameworks/kpackage-${PVCUT}*:6
+       =kde-frameworks/kwidgetsaddons-${PVCUT}*:6
+       opds? ( =kde-frameworks/syndication-${PVCUT}*:6 )
+"
+RDEPEND="${DEPEND}
+       >=kde-frameworks/kirigami-${PVCUT}:6
+"
+
+PATCHES=( "${FILESDIR}/${P}-fix-reference-error.patch" ) # KDE-bug 483659
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake_use_find_package opds KF6Syndication)
+       )
+
+       ecm_src_configure
+}

Reply via email to