[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:
Stefan Brüns 2020-12-28 03:29:06 +01:00
parent 34f74e4226
commit 09b6c99325

View file

@ -18,6 +18,10 @@
namespace {
QString tagsFromValues(const QStringList& values)
{
if (values.size() == 1) {
return values.at(0);
}
QStringList alphabeticalOrderTags = values;
QCollator coll;
coll.setNumericMode(true);