Fix QDialogButtonBox connections in the edit profile dialog
KPageDialog already creates the accepted()/rejected() connections, since the code here created another connection, the accept() slot was being called twice for each OK button click, with e.g. the profile name empty, clicking Ok: - the first time isProfileNameValid() would return false, and the saving would abort, as it should - the second time around, isProfileNameValid() would return true since the name has been reverted to the original value in the Name line edit The same goes for the reject() slot. Also use a lambda instead of apply(), it's a very small method and this was the code is more readable, since we don't need to jump back and forth.
Showing with 13 additions and 30 deletions