Verified Commit fa5457a4 authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

applets/kicker: put all applications whose names begin with punctuations/symbols/spaces in group &

parent c001f917
Pipeline #189053 passed with stage
in 6 minutes and 21 seconds
......@@ -60,6 +60,11 @@ QString groupName(const QString &name)
return QStringLiteral("#");
}
// Put all applications whose names begin with punctuations/symbols/spaces in group &
if (firstChar.isPunct() || firstChar.isSymbol() || firstChar.isSpace()) {
return QStringLiteral("&");
}
// Here we will apply a locale based strategy for the first character.
// If first character is hangul, run decomposition and return the choseong (consonants).
if (firstChar.script() == QChar::Script_Hangul) {
......
......@@ -739,6 +739,13 @@ void AppsModel::sortEntries()
return false;
}
// Symbol group
if (a->group() == QLatin1Char('&')) {
return true;
} else if (b->group() == QLatin1Char('&')) {
return false;
}
return c.compare(a->group(), b->group()) < 0;
} else {
return c.compare(a->name(), b->name()) < 0;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment