Version: 2.2 (using KDE KDE 3.2.0) Installed from: Compiled From Sources Compiler: Gcc 3.2.2 OS: Linux After being left open at logout, in new session Kate starts with all session info (opened files, window layout, etc.) lost. Other apps, most notably Kwrite, restore themselves fine. Also, during same session, Kate restores properly when closed/opened. I've poked the code a bit, but since I don't now first thing about Qt/KDE programming, I've only managed to trace the problem to this point: it seems that, unlike other apps, Kate misses its saved session config name. Here is the listing of what method KApplication::sessionConfig (in kdelibs/kdecore/kapplication.cpp) gets from KApplication::sessionConfigName: These are at session exit: session/kwin_117f000001000107572973500000015610000_1076243221_692464 session/konsole_117f000001000107592262400000015610009_1076243221_695938 session/konqueror_117f000001000107623627800000032900009_1076243221_696472 session/kwrite_117f000001000107623904200000073340011_1076243221_696639 session/kate_117f000001000107624295200000024360011_1076243221_698056 <----- session/kghostview_117f000001000107624321600000024360014_1076243221_763897 session/kwin_117f000001000107572973500000015610000_1076243221_772065 These are at next session start: session/kwin_117f000001000107572973500000015610000_1076243221_772065 session/konsole_117f000001000107592262400000015610009_1076243221_695938 session/konqueror_117f000001000107623627800000032900009_1076243221_696472 session/kwrite_117f000001000107623904200000073340011_1076243221_696639 session/kate_117f000001000107624295200000024360011_1076243244_730808 <----- Wrong! session/kghostview_117f000001000107624321600000024360014_1076243221_763897
Created attachment 4597 [details] Immediate initialization of session config in kdebase/kate/app/katemain.cpp I've poked some more... In KApplication::sessionConfigName(), function sessionKey() reports the wrong string. However, KApplication::sessionConfig() will not initialize session config again once already initialized, and sessionKey() still reports correct value right after declaration "KateApp app;" in kdebase/kate/app/katemain.cpp, so the problem is dirty-solved by calling "app.sessionConfig();" right after declaration. The patch is attached.
Confirming. This is a really annoying bug, esp. with 20 files open for development.
true ;) perhaps I should have read even the comment from 09.02 ;), would have not wasted my time with figuring that out myself ;) (but in the end, had some good results, have rewritten the rest of session restore, too) backport is now in KDE_3_2_BRANCH, therefor will be in kde 3.2.1 ;)