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

applets/kicker: put all applications whose names begin with numbers in group "#"

parent 9e2b3938
......@@ -55,6 +55,11 @@ QString groupName(const QString &name)
const QChar firstChar = name[0];
// Put all applications whose names begin with numbers in group #
if (firstChar.isDigit()) {
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) {
......
......@@ -732,6 +732,13 @@ void AppsModel::sortEntries()
return a->type() > b->type();
} else {
if (a->group() != b->group()) {
// Number 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