Bug 479183 - With Qt 6.7, no "Add to favorites" and "Remove from favorites" menu items
Summary: With Qt 6.7, no "Add to favorites" and "Remove from favorites" menu items
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Application Launcher (Kickoff) (show other bugs)
Version: 5.93.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: qt6
: 480625 481447 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-30 06:50 UTC by Jin Liu
Modified: 2024-02-17 10:09 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2023-12-30 06:50:45 UTC
SUMMARY
This seems to happen with Qt 6.7 beta.

Debugging shows that in
https://invent.kde.org/plasma/plasma-desktop/-/blob/384135e4c4f98b515a926440810a562404cf7639/applets/kickoff/package/contents/ui/AbstractKickoffItemDelegate.qml#L69
The `actions` arrary doesn't change after the `push` call.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.91.0
KDE Frameworks Version: 5.247.0
Qt Version: 6.7.0
Kernel Version: 6.6.8-arch1-1 (64-bit)
Graphics Platform: offscreen
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 2 Nate Graham 2024-01-11 19:07:23 UTC
Works for me in Qt 6.6, so I guess it's a Qt 6.7 regression.
Comment 3 Antonio Rojas 2024-01-28 15:26:29 UTC
(In reply to Nicolas Fella from comment #1)
> I suspect
> https://code.qt.io/cgit/qt/qtdeclarative.git/commit/
> ?id=b9bfdea0e2c6721d2306af0ecc44f88da9988957 caused it

Confirmed. Somehow model.actionList seems to be immutable. This fixes it for me, but i don't know if it's the right fix (hence not creating a PR)

--- a/applets/kickoff/package/contents/ui/AbstractKickoffItemDelegate.qml
+++ b/applets/kickoff/package/contents/ui/AbstractKickoffItemDelegate.qml
@@ -58,7 +58,7 @@ T.ItemDelegate {
     function openActionMenu(x = undefined, y = undefined) {
         if (!hasActionList) { return; }
 
-        let actions = model.actionList;
+        var actions = [].concat(model.actionList);
         const favoriteActions = Tools.createFavoriteActions(
             i18n, //i18n() function callback
             view.model.favoritesModel,
Comment 4 Antonio Rojas 2024-01-31 22:30:02 UTC
*** Bug 480625 has been marked as a duplicate of this bug. ***
Comment 5 Bug Janitor Service 2024-02-11 06:36:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2032
Comment 6 Iyán Méndez Veiga 2024-02-11 23:00:35 UTC
I can confirm the issue on RC 2 and that the patch from https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2032 fixes it for me.
Comment 7 Fushan Wen 2024-02-12 01:02:47 UTC
Git commit 2bc049f792725917f4b262e79eabadbdefc901d6 by Fushan Wen, on behalf of Darshan Phaldesai.
Committed on 12/02/2024 at 01:02.
Pushed by fusionfuture into branch 'master'.

applets/kickoff: fix favourites actions for Kickoff in QT 6.7

QT 6.7 makes actionsList immutable and thus `push()` fails on it.
FIXED-IN: 6.0

M  +1    -1    applets/kickoff/package/contents/ui/AbstractKickoffItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/2bc049f792725917f4b262e79eabadbdefc901d6
Comment 8 Fushan Wen 2024-02-12 01:11:17 UTC
Git commit dafe25df477bdb642b3217f4d488dcd2af87b281 by Fushan Wen, on behalf of Darshan Phaldesai.
Committed on 12/02/2024 at 01:03.
Pushed by fusionfuture into branch 'Plasma/6.0'.

applets/kickoff: fix favourites actions for Kickoff in QT 6.7

QT 6.7 makes actionsList immutable and thus `push()` fails on it.
FIXED-IN: 6.0


(cherry picked from commit 2bc049f792725917f4b262e79eabadbdefc901d6)

M  +1    -1    applets/kickoff/package/contents/ui/AbstractKickoffItemDelegate.qml

https://invent.kde.org/plasma/plasma-desktop/-/commit/dafe25df477bdb642b3217f4d488dcd2af87b281
Comment 9 Antonio Rojas 2024-02-17 10:09:39 UTC
*** Bug 481447 has been marked as a duplicate of this bug. ***