Bug 418885

Summary: Okular asks whether to close tabs when logging out of session, which is saved anyway
Product: [Applications] okular Reporter: postix <postix>
Component: generalAssignee: Okular developers <okular-devel>
Status: REOPENED ---    
Severity: normal CC: nate, postix, robert, wbauer1
Priority: NOR    
Version: 21.04.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=416728
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot

Description postix 2020-03-15 16:02:56 UTC
Created attachment 126816 [details]
Screenshot

SUMMARY

If Okular runs with at least two opened tabs and you log out of the session, 
Okular asks you whether you want to close the two tabs. Once you click on "Close tabs",
Okular will ask you again in the process of logging out. I.e. you see the dialog twice.

However, in my case, where I save the session, there should be no need to ask whether I want to close the two tabs or not
as Okular and the tabs are recovered when I re-login.


STEPS TO REPRODUCE
1. In the systemsettings, set "save session on logout"
2. Open Okular with two tabs
3. Logout of the session

OBSERVED RESULT

Okular asks (twice) if the tabs shall be closed.


EXPECTED RESULT

Okular does not ask.


SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.1
Comment 1 Wolfgang Bauer 2020-03-16 10:43:49 UTC
Likely the same as bug#416728, it seems to be a more general problem.
IIANM, it started with Qt 5.14.0.
Comment 2 Wolfgang Bauer 2020-03-16 10:45:37 UTC
Btw, you don't have to respond to the dialogs.
If you just wait, the logout continues as usual (and the session is saved AFAICT).
Comment 3 Wolfgang Bauer 2020-03-16 11:12:35 UTC
(In reply to Wolfgang Bauer from comment #1)
> Likely the same as bug#416728, it seems to be a more general problem.
Although, konsole (and other applications like konqueror) only ask once, while okular asks twice. So it's not a full duplicate.

(In reply to Wolfgang Bauer from comment #2)
> Btw, you don't have to respond to the dialogs.
> If you just wait, the logout continues as usual (and the session is saved
> AFAICT).
This only applies to the *second* dialog in the case of okular though.
Comment 4 Robert Riemann 2020-03-27 14:34:29 UTC
I find the current behaviour also confusing.
Comment 5 Nate Graham 2020-04-15 13:41:23 UTC

*** This bug has been marked as a duplicate of bug 416728 ***
Comment 6 Wolfgang Bauer 2020-04-17 10:22:02 UTC
(In reply to Nate Graham from comment #5)
> 
> *** This bug has been marked as a duplicate of bug 416728 ***
See comment#3, this is not really a duplicate.

Okular itself does ask for confirmation on logout when several tabs are open (unlike konsole e.g.), and that results in *two* dialogs (unlike konsole).

Okular probably should not ask for confirmation if QApplication::isSavingSession() is true, that's how other applications (konsole, dolphin, konqueror) behave.