From e6076fc3f761399b735ea147e28ada4be98b011b Mon Sep 17 00:00:00 2001 From: Rmys Date: Mon, 11 Mar 2024 11:50:37 +0300 Subject: [PATCH] knewstuff-kf6 rebuild --- .../knewstuff-kf6/files/49f2037a.patch | 42 +++++++++++++++ .../knewstuff-kf6/files/4f01e2ff.patch | 51 +++++++++++++++++++ .../kde6/framework/knewstuff-kf6/pspec.xml | 4 ++ 3 files changed, 97 insertions(+) create mode 100644 desktop/kde6/framework/knewstuff-kf6/files/49f2037a.patch create mode 100644 desktop/kde6/framework/knewstuff-kf6/files/4f01e2ff.patch diff --git a/desktop/kde6/framework/knewstuff-kf6/files/49f2037a.patch b/desktop/kde6/framework/knewstuff-kf6/files/49f2037a.patch new file mode 100644 index 0000000000..6e0b2ca3c0 --- /dev/null +++ b/desktop/kde6/framework/knewstuff-kf6/files/49f2037a.patch @@ -0,0 +1,42 @@ +From 49f2037ac22fcb430fadd5d7b29bd8af234573a4 Mon Sep 17 00:00:00 2001 +From: Akseli Lahtinen +Date: Thu, 7 Mar 2024 16:01:44 +0000 +Subject: [PATCH] Fix link list dialog for installation button + +In gridview, installation buttons showed "Install..." for every item, +even if the item had only single download link. This fixes it +by showing correct button. + +The problem was using `entry` directly instead of `model`. + +BUG: 482349 +FIXED-IN: 6.1 +--- + .../qml/private/entrygriddelegates/TileDelegate.qml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml b/src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml +index 2fdee68b4..36224abe2 100644 +--- a/src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml ++++ b/src/qtquick/qml/private/entrygriddelegates/TileDelegate.qml +@@ -40,13 +40,13 @@ Private.GridTileDelegate { + visible: enabled + }, + Kirigami.Action { +- text: entry.downloadLinks.length === 1 ? i18ndc("knewstuff6", "Request installation of this item, available when there is exactly one downloadable item", "Install") : i18ndc("knewstuff6", "Show installation options, where there is more than one downloadable item", "Install…"); ++ text: model.downloadLinks.length === 1 ? i18ndc("knewstuff6", "Request installation of this item, available when there is exactly one downloadable item", "Install") : i18ndc("knewstuff6", "Show installation options, where there is more than one downloadable item", "Install…"); + icon.name: "install" + onTriggered: { +- if (entry.downloadLinks.length === 1) { +- newStuffEngine.install(entry.entry, NewStuff.ItemsModel.FirstLinkId); ++ if (model.downloadLinks.length === 1) { ++ newStuffEngine.install(entry, NewStuff.ItemsModel.FirstLinkId); + } else { +- downloadItemsSheet.downloadLinks = entry.downloadLinks; ++ downloadItemsSheet.downloadLinks = model.downloadLinks; + downloadItemsSheet.entry = entry; + downloadItemsSheet.open(); + } +-- +GitLab + diff --git a/desktop/kde6/framework/knewstuff-kf6/files/4f01e2ff.patch b/desktop/kde6/framework/knewstuff-kf6/files/4f01e2ff.patch new file mode 100644 index 0000000000..a7881dd72d --- /dev/null +++ b/desktop/kde6/framework/knewstuff-kf6/files/4f01e2ff.patch @@ -0,0 +1,51 @@ +From 4f01e2ff676cd4a11ba36f49d967db4635e2d216 Mon Sep 17 00:00:00 2001 +From: Nicolas Fella +Date: Wed, 6 Mar 2024 19:39:09 +0100 +Subject: [PATCH] [qtquick/action] Add API to set transient parent for dialog + +We want the dialog to have a proper parent window set. Usually +Qt automatically obtains one from the parent item. This doesn't +work here however since the dialog's loader is not part of the item +hierarchy. This causes the window to not be shown since Qt 6.7. + +See QTBUG-121197 + +Merely adding the property and setting it to null makes sure the +window can be shown. Users of the API should however pass a parent window +so that the dialog has a parent set. + +BUG: 479816 +--- + src/qtquick/qml/Action.qml | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/qtquick/qml/Action.qml b/src/qtquick/qml/Action.qml +index ae134112e..05e49d6ab 100644 +--- a/src/qtquick/qml/Action.qml ++++ b/src/qtquick/qml/Action.qml +@@ -92,6 +92,14 @@ Kirigami.Action { + */ + property bool visibleWhenDisabled: false + ++ /** ++ * The parent window for the dialog created by invoking the action ++ * ++ * @since 6.1 ++ * ++ */ ++ property var transientParent: null ++ + /** + * Show the page/dialog (same as activating the action), if allowed by the Kiosk settings + */ +@@ -185,6 +193,7 @@ Kirigami.Action { + asynchronous: true + + sourceComponent: NewStuff.Dialog { ++ transientParent: component.transientParent + configFile: component.configFile + viewMode: component.viewMode + } +-- +GitLab + diff --git a/desktop/kde6/framework/knewstuff-kf6/pspec.xml b/desktop/kde6/framework/knewstuff-kf6/pspec.xml index 1140d3ed5e..26fa3d107b 100755 --- a/desktop/kde6/framework/knewstuff-kf6/pspec.xml +++ b/desktop/kde6/framework/knewstuff-kf6/pspec.xml @@ -48,6 +48,10 @@ extra-cmake-modules-kf6 kirigami-kf6-devel + + 4f01e2ff.patch + 49f2037a.patch +