Created attachment 63355 [details] profile-with-empty-name Version: 2.7.999 (using KDE 4.7.0) OS: Linux A profile with empty name might be created and saved in some situation. This is not quite intuitive and might make users confused. Reproducible: Didn't try Steps to Reproduce: 1. execute 'konsoleprofile ShowMenuBar=trueb' within some session of konsole. 2. open the 'Edit Current Profile' dialog, where the profile name is displayed as empty. 3. change some option and click 'OK' button to close that dialog. 4. close konsole and open it again. Actual Results: A file named as '.profile'(hidden) is saved under ~/.kde4/share/apps/konsole/ , and the 'Config Profiles' dialog will display a profile whose name is empty. Expected Results: A profile with emtpy name should never be saved into disk.
Make runtime profiles hidden Runtime profile might be considered as overlay profiles that handle the profile command sequence. So make it hidden. ================================== diff --git a/src/SessionManager.cpp b/src/SessionManager.cpp index 5d5aecc..4a736fe 100644 --- a/src/SessionManager.cpp +++ b/src/SessionManager.cpp @@ -771,6 +771,7 @@ void SessionManager::sessionProfileCommandReceived(const QString& text) if ( !_sessionRuntimeProfiles.contains(session) ) { newProfile = new Profile(_sessionProfiles[session]); + newProfile->setHidden(true); _sessionRuntimeProfiles.insert(session,newProfile); } else
(In reply to comment #1) > Thanks for your kindness of helping. But that hidden property of dynamically-created profile is not the cure of this problem. The real problem is konsole does not check whether name is empty when asked to save a profile into disk(persistent). Here is another way to reproduce the problem: 1). open the 'Config profiles' dialog 2). click 'New profile' . 3). set profile name to empty 4). press 'OK' 5). that new profile is saved as '.profile' under ~/.kde4/share/apps/konsole/ I actually already have some idea about how to deal with empty profile name in a more intuitive way. I will submit it to reviewboard when I am sure it does work and does not cause regression.
Git commit 49c107966bbea1e7f57329bf281cd0cabffc5280 by Jekyll Wu. Committed on 14/09/2011 at 17:31. Pushed by jekyllwu into branch 'master'. Konsole should never save a profile with empty name into disk. BUG: 281268 FIXED-IN: 4.8 REVIEW:102559 M +21 -0 src/EditProfileDialog.cpp M +21 -17 src/EditProfileDialog.ui M +5 -1 src/SessionManager.cpp http://commits.kde.org/konsole/49c107966bbea1e7f57329bf281cd0cabffc5280