Bug 427163 - Quick Open Session toolbar button does nothing
Summary: Quick Open Session toolbar button does nothing
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 22.04.0
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-30 16:00 UTC by Matt Scott
Modified: 2022-07-14 17:42 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 22.08.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Scott 2020-09-30 16:00:45 UTC
SUMMARY
The Quick Open Session menu item works fine, it produces a pop out menu list of my saved sessions. I would expect the same functionality with the Quick Open Session toolbar button, but it does nothing when clicked, not even a blank pop out menu.

I'm relatively new to Kate and only just started working with sessions so can't confirm if this is a new issue.

STEPS TO REPRODUCE
1. Have multiple sessions saved
2. Confirm they appear in the menu Sessions>Quick Open Session>
3. Add Quick Open Session button to toolbar and click

OBSERVED RESULT
Nothing at all

EXPECTED RESULT
A pop out list of my recent saved sessions, allowing me to select one to open.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux (x86_64) release 5.8.6-1-MANJARO
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0

ADDITIONAL INFORMATION
Let me know if any more info required.
Comment 1 Dominik Haumann 2020-10-08 06:26:19 UTC
Is the submenu maybe filled with an aboutToShow() signal that somehow does not work when placed in the toolbar?
Comment 2 Justin Zobel 2020-10-27 06:12:06 UTC
Can confirm on kate git master.
Comment 3 Pozsgay Máté 2022-04-28 14:10:21 UTC
I can also confirm this, however, if you hold your click on the button the menu will eventually show up after a cuouple of seconds.
Comment 4 Pozsgay Máté 2022-07-13 20:23:45 UTC
This is fixed on 22.04.3. I actually tracking down a similar issue regarding the Sessions menu.
I learned that KActionMenu have a PopupMode property, which by default set to DelayedPopup (https://doc.qt.io/qt-5/qtoolbutton.html#popupMode-prop), this is why all of the Action menu affected this problem where it is not set explicitly to InstantPopup.

Knowing this it is trivial to fix all the session-related menus, by adding the following line to the KateSessionsAction::KateSessionsAction constructor (or whatever it is, I do not really know C++):
    setPopupMode(QToolButton::InstantPopup);

I'm wondering how many other component are affected...
Comment 5 Pozsgay Máté 2022-07-13 20:30:12 UTC
Actually I was wrong, I mixed up with the Open Recent menu, this one is not fixed, but it is an easy fix, see my previous comment
Comment 6 Christoph Cullmann 2022-07-14 17:42:45 UTC
Thanks for the fix, backported to 22.08

https://invent.kde.org/utilities/kate/commit/4f58104fb00d862b12ec98baa268b3cb6bdd7cbb