Commit d617dd8e authored by Dan Leinir Turthra Jensen's avatar Dan Leinir Turthra Jensen 🌈

Search new knsrc locations

Using the search location getter added in D19338, ensure we get
all locations which KNSCore::Engine will search for knsrc files, without
making assumptions about where that might be.

Differential Revision:
parent 3a8b8ebe
......@@ -65,7 +65,12 @@ class KNSBackendFactory : public AbstractResourcesBackendFactory {
QVector<AbstractResourcesBackend*> newInstance(QObject* parent, const QString &/*name*/) const override
QVector<AbstractResourcesBackend*> ret;
for (const QString &path: QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)) {
QStringList locations = KNSCore::Engine::configSearchLocations();
QStringList locations = QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation);
for (const QString &path: locations) {
QDirIterator dirIt(path, {QStringLiteral("*.knsrc")}, QDir::Files);
for(; dirIt.hasNext(); ) {;
Markdown is supported
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