Bug 390740

Summary: When opening already open session kate leaves unnecessary open instance behind
Product: [Applications] kate Reporter: cat22 <erbenton>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cullmann
Priority: NOR    
Version: 17.04.2   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description cat22 2018-02-19 15:46:10 UTC
openSUSE Leap 42.3 (x86_64)
KDE 5.32.0 Plasma 5.8.7  Qt version 5.6.2
Kater 17.04.2

If you try to open an already open session, kate prompts you to re-use the already open session. This is good, but if you say 'Yes' then it fails to close the unused instance of itself. Kate should close itself because you agreed to just switch to the already running session.
See also bug 277089 from 2011 (7 years!?!?) as a better solution.
Comment 1 Christoph Cullmann 2019-07-13 21:13:53 UTC
Git commit 97b2390a2813729b761ec93352247908ba124f5c by Christoph Cullmann.
Committed on 13/07/2019 at 21:13.
Pushed by cullmann into branch 'master'.

avoid crash on re-open already running session
just quit kate

M  +4    -2    kate/session/katesessionmanagedialog.cpp

https://commits.kde.org/kate/97b2390a2813729b761ec93352247908ba124f5c
Comment 2 Christoph Cullmann 2019-07-13 23:53:57 UTC
Hmm, still crashes :-)
Comment 3 Christoph Cullmann 2019-07-14 00:15:50 UTC
Git commit f12c2e3b3b64e7df07212a49fcd547965e49af7d by Christoph Cullmann.
Committed on 14/07/2019 at 00:15.
Pushed by cullmann into branch 'master'.

avoid crash on re-open already running session
just quit kate
do check all return values properly

M  +3    -4    kate/session/katesessionmanager.cpp

https://commits.kde.org/kate/f12c2e3b3b64e7df07212a49fcd547965e49af7d