Skip to content

Checks if a profile is editable before showing the edit profile menu action

Bug: Menu action is shown as "edit current profile" (under settings) when the profile is not editable. Launches edit window and lets you make changes but as soon as you try to save it, it displays a permission error (you can change name to save as new profile but it looks like we want it to go to create new profile window to begin with).

The code is already trying to handle this case by changing the menu action to "Create new profile" but it's just checking isBuiltIn() when it also needs to check the other profiles (that may not be the default) to see if they're editable.

  • Adds isEditable() to Profile to check if the profile isbuiltIn() and if the path is writeable
    • moved from ProfileSettings to Profile - it was correctly disabling/enabling the edit button in the manage profile window ("Settings->Manage Profiles")
  • Uses isEditable() instead of isBuiltIn in SessionController (will switch action from "edit .." to "create ...")

Context: I launched the Konsole and because I have difficulty reading text I wanted to bump up the font size. I found a menu action that I thought would help under "Setting->Edit Current Profile" which launched the edit profile window and I made a few preference changes then hit ok/apply and ran into this error.

alternatives

Should the isBuiltIn() just be modified with the code from isEditable? I have two profiles when I first launch Konsole, one of them correctly returns true for isBuiltIn the other doesn't. fwiw I think isEditable is more generic and it's an impl detail that we consider built-in ones uneditable ones

Edited by Jose Flores

Merge request reports