Bug 439526

Summary: [single-process] kcommandbar displays options from other konsole windows
Product: [Frameworks and Libraries] frameworks-kxmlgui Reporter: Podagric <kde.podagric>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: waqar.17a
Priority: NOR    
Version: 5.84.0   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: screenshot
attachment-19287-0.html

Description Podagric 2021-07-05 20:15:33 UTC
Created attachment 139882 [details]
screenshot

STEPS TO REPRODUCE
1. Go to settings and activate single process
2. Start some konsole windows
3. Open kcommandbar

OBSERVED RESULT
Repeated options will be displayed depending on the number of windows.
I have attached an image with an example for three konsole windows


SOFTWARE/OS VERSIONS
Konsole Version: 21.04.2
KDE Plasma Version: 5.22.2
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Graphics Platform: X11
ADDITIONAL INFORMATION
Comment 1 tcanabrava 2021-07-05 20:42:24 UTC
Created attachment 139884 [details]
attachment-19287-0.html

That’s a bug in kcommandbar. I’ll try to fix it.

On Mon, 5 Jul 2021 at 21:15 Podagric <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=439526
>
>             Bug ID: 439526
>            Summary: [single-process] kcommandbar displays options from
>                     other konsole windows
>            Product: konsole
>            Version: 21.04.2
>           Platform: Other
>                 OS: Other
>             Status: REPORTED
>           Severity: normal
>           Priority: NOR
>          Component: single-process
>           Assignee: konsole-devel@kde.org
>           Reporter: kde.podagric@slmail.me
>   Target Milestone: ---
>
> Created attachment 139882 [details]
>   --> https://bugs.kde.org/attachment.cgi?id=139882&action=edit
> screenshot
>
> STEPS TO REPRODUCE
> 1. Go to settings and activate single process
> 2. Start some konsole windows
> 3. Open kcommandbar
>
> OBSERVED RESULT
> Repeated options will be displayed depending on the number of windows.
> I have attached an image with an example for three konsole windows
>
>
> SOFTWARE/OS VERSIONS
> Konsole Version: 21.04.2
> KDE Plasma Version: 5.22.2
> KDE Frameworks Version: 5.83.0
> Qt Version: 5.15.2
> Graphics Platform: X11
> ADDITIONAL INFORMATION
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 2 Podagric 2021-07-05 20:46:30 UTC
Sorry, I reported here because I haven't seen this happening in other KDE Apps.
Comment 3 Bug Janitor Service 2021-07-27 05:00:14 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/71
Comment 4 Waqar Ahmed 2021-07-28 18:58:11 UTC
Git commit ab6959ef0fea5879c767df16df27ff556798570f by Waqar Ahmed.
Committed on 28/07/2021 at 18:53.
Pushed by waqar into branch 'master'.

commandbar: collect actions using the guiFactory

Using `KActionCollection::allCollections` is a really bad idea here
because it can lead to actions with same names from different clients
being present in the KCommandBar and the user has no way to tell which
action is from which client. In Kate, that means for each opened tab you
get tons of actions with same name, leading to a really unusable
experience for some actions.
Signed-off-by: Waqar Ahmed <waqar.17a@gmail.com>

M  +28   -2    src/kxmlguiwindow.cpp

https://invent.kde.org/frameworks/kxmlgui/commit/ab6959ef0fea5879c767df16df27ff556798570f