Bug 419360

Summary: dolphin shows exit confirmation dialog on session logout with qt >= 5.14.0
Product: [Applications] dolphin Reporter: i.Dark_Templar <idarktemplar>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: glyphimor, kfm-devel
Priority: NOR    
Version: 19.12.3   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: some information from gdb

Description i.Dark_Templar 2020-03-29 09:10:49 UTC
Created attachment 127076 [details]
some information from gdb

After upgrade from Qt-5.13.2 to Qt-5.14.1 on KDE session shutdown dolphin started asking to confirm if I want to quit while multiple tabs are open. It didn't ask for such confirmation with Qt-5.13.2 on session logout. And current session is saved successfully with no regards which button was pressed in this dialog or if any button was pressed at all.

STEPS TO REPRODUCE
1. Open at least 2 tabs in dolphin
2. Ensure that confirmation to close dolphin window with multiple open tabs is enabled
3. Ensure that qt-5.14.1 or newer is used
4. Ensure that previous session restoring is selected in session management configuration of KDE
4. Logout from KDE session

OBSERVED RESULT
Dolphin asks to confirm closing window on session logout. If you wait too long, it'll just eventually crash, but on next start session would be restored.

EXPECTED RESULT
Dolphin should silently save current session and restore it next time

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Gentoo Linux with kernel 4.14.166
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.67.0
Qt Version: 5.14.1
Dolphin Version: 19.12.3

ADDITIONAL INFORMATION
While bug appears in dolphin 19.12.3 for me, I guess it'd appear in other versions too when Qt >= 5.14.0 is used.

I suspect that it's related to following Qt change but I didn't confirm it:
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=1b6db184947

Attached file contains a bit of information I could obtain using gdb. It looks like dolphin receives two close events on session logout. In first one 'QGuiApplication::isSavingSession()' returns true and dolphin silently saves information about current session. In second one 'QGuiApplication::isSavingSession()' returns false and it triggers displaying confirmation dialog.
Comment 1 Elvis Angelaccio 2020-03-29 10:58:19 UTC
*** Bug 419315 has been marked as a duplicate of this bug. ***