When saving the fallback profile to a new profile, we have to delay
calling addProfile until after a path has been set for the new profile.
This is because ProfileModel::populate calls ProfileManager::sortProfiles,
and the latter skips profiles that have path == FALLBACK/ .
This also seems to take care of duplicate entries in "Switch Profile"
menu, with respect to the fallback profile after saving.
Modify changeProfile to always work on the Profile::Ptr arg it's called
on,this is needed to be able to call setProfile from EditProfileDialog
aftersaving the fallback profile; the fallback profile is special in
many ways,most important of which is that it's never saved to a .profile
on disk, sincechangeProfile is going to give the newly saved profile a
unique name, e.g."Profile 1", we need to update the EditProfileDialog
with the new profile,so that saving settings works and actually modifies
the new profile ratherthan the fallback one. This also means that the
profile ptr that the currentSession is using will point to the
modified/saved profile and not thefallback one.
After the fallback profile is "saved" to a new profile, we init another
instance of the fallback profile, so that it's always availabe in the
"Switch profile" context menu.
Reserve the profile name "Default" for the fallback profile.
The previous behavior was actually the intended one, the URL hints are
intended to strictly increase from start to finish (physically on the
keyboard).
It might not be "technically" correct, but that's the original behavior
before the refactor (and I think it makes the most sense, that's why I
implemented it that way originally).
Also fixes activating the first URL, activating 0 didn't work.
This reverts commit 28e1a3e634.
BUG: 427293
Good explanation from Tomaz (he's better with words than me):
I think he wants to quick swap the text from primary and secondary screens:
ls folder
vim somefile.txt
- mmm, what's the name of the file I need, I just did the LS for that reason -
peek into primary screen, note the file name, go back to secondary screen
Merge request:
https://invent.kde.org/utilities/konsole/-/merge_requests/210