Bug 416728 - Konsole and Okular with multiple tabs pop up an unnecessary "N open terminals/tabs" warning on logout or shutdown when session restore is in use
Summary: Konsole and Okular with multiple tabs pop up an unnecessary "N open terminals...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.68.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2020-01-25 09:02 UTC by Michael Hamilton
Modified: 2020-09-25 16:06 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.75
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hamilton 2020-01-25 09:02:32 UTC
SUMMARY
Konsole with multiple tabs pops up an N open terminals warning on logout or shutdown.

STEPS TO REPRODUCE
1. Start a konsole and create more than one terminal/tab.
2. Logout or shutdown

OBSERVED RESULT
Konsole raises a popup with "There are N open terminals in this window. Do you still want to quit?"  It is impossible to respond sensibly because it is too late in the logout/shutdown sequence of activities.

EXPECTED RESULT
Previous behavior did not bring up any dialog which seems to make sense given there is no way to respond sensibly.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Seems similar to old Bug 127194 but it only just started happening this week. Does not happen if there is only one tab open.
Comment 1 Wolfgang Bauer 2020-01-25 13:31:54 UTC
That's not a bug in konsole though, IMHO.

IIRC, it started with the upgrade to Qt 5.14.0, and also affects other applications like Konqueror.
Comment 2 Wolfgang Bauer 2020-03-17 08:02:30 UTC
It's caused by this change in Qt 5.14:
https://code.qt.io/cgit/qt/qtbase.git/commit?h=5.14&id=1b6db1849477be30ef0ca52c288d358b911ea1e4
(I built and installed Qt 5.14.1 with this change reverted, and the problem was gone)

What happens is that KMainWindow::tryClose() is called twice on logout now.
The first time qApp->isSavingSession() is true (and so konsole doesn't show the warning dialog), but the second time qApp->isSavingSession() is false (this didn't happen earlier, it causes the dialog to be shown now, but doesn't block the logout).

I suppose kxmlgui would need to be adjusted to that Qt change...
Comment 3 Wolfgang Bauer 2020-03-17 08:06:56 UTC
(In reply to Wolfgang Bauer from comment #2)
> What happens is that KMainWindow::tryClose() is called twice on logout now.
I mean KMainWindow::queryClose()...
Comment 4 Nate Graham 2020-04-15 13:41:23 UTC
*** Bug 418885 has been marked as a duplicate of this bug. ***
Comment 5 Allan Sandfeld 2020-08-02 08:54:35 UTC
So it is a change in what plasma does when logging out?
Comment 6 Allan Sandfeld 2020-08-02 09:02:23 UTC
(In reply to Allan Sandfeld from comment #5)
> So it is a change in what plasma does when logging out?

Ah right, read the comments again. So a change in how Qt closes applications.
Comment 7 Allan Sandfeld 2020-08-02 11:00:41 UTC
Should be fixed by https://phabricator.kde.org/D29873
Comment 8 Bug Janitor Service 2020-08-02 13:26:43 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/10
Comment 9 Nate Graham 2020-09-25 16:06:33 UTC
Fixed with https://invent.kde.org/frameworks/kxmlgui/-/commit/ab73c532cbcb16d9a3912670f021477dc25634fc in Frameworks 5.75!