Always sort the Default/fallback profile first

As suggested by Kurt in
https://invent.kde.org/utilities/konsole/-/merge_requests/351
This commit is contained in:
Ahmad Samir
2021-03-01 19:24:56 +02:00
committed by Kurt Hindenburg
parent 88c58a853d
commit ce31d0e235

View File

@@ -39,6 +39,13 @@ static bool profileIndexLessThan(const Profile::Ptr& p1, const Profile::Ptr& p2)
static bool profileNameLessThan(const Profile::Ptr& p1, const Profile::Ptr& p2)
{
// Always put the Default/fallback profile at the top
if (p1->isFallback()) {
return true;
} else if (p2->isFallback()) {
return false;
}
return QString::localeAwareCompare(p1->name(), p2->name()) < 0;
}