mirror of
https://invent.kde.org/system/dolphin
synced 2024-10-28 03:21:56 +00:00
[BalooRolesProvider] Simplify single tag case
When the list contains just one value, return it instead of trying to sort the list with a QCollator.
This commit is contained in:
parent
34f74e4226
commit
09b6c99325
|
@ -18,6 +18,10 @@
|
||||||
namespace {
|
namespace {
|
||||||
QString tagsFromValues(const QStringList& values)
|
QString tagsFromValues(const QStringList& values)
|
||||||
{
|
{
|
||||||
|
if (values.size() == 1) {
|
||||||
|
return values.at(0);
|
||||||
|
}
|
||||||
|
|
||||||
QStringList alphabeticalOrderTags = values;
|
QStringList alphabeticalOrderTags = values;
|
||||||
QCollator coll;
|
QCollator coll;
|
||||||
coll.setNumericMode(true);
|
coll.setNumericMode(true);
|
||||||
|
|
Loading…
Reference in a new issue