Skip to content

Fix duplicated calligraphy profile save operation.

This fixes a bug where, after entering an invalid profile name, the user is prompted twice for a new name and two new profiles are saved. The cause is a recursive call to saveProfileAs(), which is redundant because the enclosing loop will continue prompting until a valid name is given.

This was originally part of !1916 but really should have been separate. I'm refactoring !1916, so moving this bug fix to a new MR simplifies things.

Test Plan

Attempt to save a new profile named "Current". This should fail, and the user should be prompted with an error message followed by a dialog requesting a new name. After entering a valid name, the profile should be saved normally, and no extra dialogs should appear.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Merge request reports