]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[BalooRolesProvider] Move static tagsFromValues to anonymous namespace
authorStefan Brüns <stefan.bruens@rwth-aachen.de>
Sun, 27 Dec 2020 23:51:23 +0000 (00:51 +0100)
committerStefan Brüns <stefan.bruens@rwth-aachen.de>
Mon, 11 Jan 2021 11:27:11 +0000 (12:27 +0100)
src/kitemviews/private/kbaloorolesprovider.cpp
src/kitemviews/private/kbaloorolesprovider.h

index f2473de3af2f6e886f48656488e42e42242f273c..f980cbec069d485faa938ffa29b51cee91fd3317 100644 (file)
 #include <QDebug>
 #include <QTime>
 
+namespace {
+    QString tagsFromValues(const QStringList& values)
+    {
+        QStringList alphabeticalOrderTags = values;
+        QCollator coll;
+        coll.setNumericMode(true);
+        std::sort(alphabeticalOrderTags.begin(), alphabeticalOrderTags.end(), [&](const QString& s1, const QString& s2){ return coll.compare(s1, s2) < 0; });
+        return alphabeticalOrderTags.join(QLatin1String(", "));
+    }
+}
+
 struct KBalooRolesProviderSingleton
 {
     KBalooRolesProvider instance;
@@ -137,13 +148,6 @@ KBalooRolesProvider::KBalooRolesProvider() :
         m_roleForProperty.insert(propertyInfoList[i].property, propertyInfoList[i].role);
         m_roles.insert(propertyInfoList[i].role);
     }
-}
 
-QString KBalooRolesProvider::tagsFromValues(const QStringList& values) const
-{
-    QStringList alphabeticalOrderTags = values;
-    QCollator coll;
-    coll.setNumericMode(true);
-    std::sort(alphabeticalOrderTags.begin(), alphabeticalOrderTags.end(), [&](const QString& s1, const QString& s2){ return coll.compare(s1, s2) < 0; });
-    return alphabeticalOrderTags.join(QLatin1String(", "));
 }
+
index 99c601e16bce11124e11c0de163b8ce0cd0aaafb..8b7bbbafac57fd9247360a532a0b111675513069 100644 (file)
@@ -47,13 +47,6 @@ public:
 protected:
     KBalooRolesProvider();
 
-private:
-    /**
-     * @return User visible string for the given tag-values.
-     *         The tag-values are sorted in alphabetical order.
-     */
-    QString tagsFromValues(const QStringList& values) const;
-
 private:
     QSet<QByteArray> m_roles;
     QHash<QString, QByteArray> m_roleForProperty;