Bug 303354 - Konsole loses profiles
Summary: Konsole loses profiles
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 2.9
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-11 10:23 UTC by Henrik Pauli
Modified: 2012-07-24 17:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Pauli 2012-07-11 10:23:01 UTC
In the Konsole shipped with SC 4.8.95 (Konsole itself only says 2.9, nothing more specific), I've been noticing that the Profiles Widget only displays a few profiles, not as many as the profile editor window inside Konsole does — the moment I quit all my Konsole windows, and start a new one, the profiles are gone, and they now reflect those in the Profiles Widget.

I've recently removed all my profiles to get around an issue with one of them (in that it refused to work altogether), and hoped that recreating profiles would make them all work.

I hope we can get this fixed quickly...

Reproducible: Always
Comment 1 Henrik Pauli 2012-07-11 10:27:17 UTC
It seems that the first (?) profile created will be saved to a .profile file, the rest remain in memory only.  Not sure.
Comment 2 Jekyll Wu 2012-07-11 11:10:58 UTC
"It seems that the first (?) profile created will be saved to a .profile file, the rest remain in memory only. Not sure." 

Unlikely.  Although the code does not force syncing by hand,  the modifcations should be synced into disk in a very short time. There used to be a  problem of saving a profile with empty name (thus the .profile file), but the current code never save a profile with empty name into disk. Could you double check and see whether it is reproducible ?

In general, this report is not clear enough. Please describle the problem in a more formal way, like "Steps to reproduce", "Expected result", "Actural result", etc.
Comment 3 Henrik Pauli 2012-07-11 11:38:28 UTC
To reproduce, start with a clean slate in your apps/konsole dir, no profiles, nothing
Add a few new profiles, not all of them will be saved.  The expected result is that all of them are synced to disk (I have 114GB free, so it's not a case of having run out of space).

Not sure how to specify it more.  I'm just creating a bunch of new profiles and some of them simply don't exist on disk.  I've even created a new one, and another one got destroyed during that.

Also, this is what's happening in my profile files right now:
Profile A.profile contains Name=Profile B
Profile B.profile contains Name=Profile C
Profile C.profile contains Name=Profile D

No Profile D.profile, and Profile A's content doesn't exist on file anymore.
Maybe an issue somewhere with an array index or something?
Comment 4 Kurt Hindenburg 2012-07-21 16:00:44 UTC
Thanks for bko - well get it fixed for 4.9

when you only have the Shell profile and add a new profile "profile a" it saves to ~/.kde/share/apps/konsole/Shell.profile w/ the "profile A" title
 .kde/share/apps/konsole/Shell.profile
 %  ~  cat .kde/share/apps/konsole/Shell.profile
 [General]
 Name=Profile a
 Parent=FALLBACK/



might be 6fa0121b8ef31934153767678ed18467e900eca0
konsole(12615) Konsole::KDE4ProfileWriter::getPath: "profile1.profile"
konsole(12615) Konsole::KDE4ProfileWriter::getPath: "Shell.profile"
 The top is the before the code change, the bottom is after
Comment 5 Kurt Hindenburg 2012-07-24 12:19:37 UTC
Git commit 1930647b716a5280fc8bac706bc8d64490699122 by Kurt Hindenburg.
Committed on 24/07/2012 at 14:14.
Pushed by hindenburg into branch 'KDE/4.9'.

Fix issue where new profiles are not saved correctly

Due to new code untranslatedName, the saving of the profile was not
correct.  This patch fixes that.

Patch by Francesco Cecconi francesco.cecconi@gmail.com

Francesco, please commit to trunk when you have time.  I'm committing
this to make sure it goes in 4.9
CCMAIL: francesco.cecconi@gmail.com

M  +1    -0    src/EditProfileDialog.cpp
M  +2    -0    src/ManageProfilesDialog.cpp

http://commits.kde.org/konsole/1930647b716a5280fc8bac706bc8d64490699122
Comment 6 Francesco Cecconi 2012-07-24 17:23:56 UTC
Git commit 6b878d167a1793f1a7b492d0db7b1ec66ce1b23f by Francesco Cecconi.
Committed on 24/07/2012 at 19:15.
Pushed by cecconi into branch 'master'.

Fix issue where new profiles are not saved correctly

Due to new code untranslatedName, the saving of the profile was not
correct.  This patch fixes that.
REVIEW: 105648
FIXED-IN: 4.9.0

M  +1    -0    src/EditProfileDialog.cpp
M  +2    -0    src/ManageProfilesDialog.cpp

http://commits.kde.org/konsole/6b878d167a1793f1a7b492d0db7b1ec66ce1b23f