Commit 73c7dc63 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Port away from XdgBaseDirs::findAllResourceDirs()

We can use QStandardPaths::locateAll() instead.
parent 0ee66c1a
......@@ -32,7 +32,6 @@
#include "akonadicontrol_debug.h"
#include <private/protocol_p.h>
#include <private/xdgbasedirs_p.h>
#include <private/instance_p.h>
#include <private/standarddirs_p.h>
#include <private/dbus_p.h>
......@@ -560,7 +559,9 @@ void AgentManager::readPluginInfos(const QDir &directory)
QStringList AgentManager::pluginInfoPathList()
{
return Akonadi::XdgBaseDirs::findAllResourceDirs("data", QStringLiteral("akonadi/agents"));
return QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
QStringLiteral("akonadi/agents"),
QStandardPaths::LocateDirectory);
}
void AgentManager::load()
......
......@@ -38,7 +38,6 @@
#include <QSettings>
#include <private/protocol_p.h>
#include <private/xdgbasedirs_p.h>
#include <private/dbus_p.h>
#include <private/instance_p.h>
......@@ -124,7 +123,8 @@ static bool checkSearchSupportStatus()
static bool checkAvailableAgentTypes()
{
const QStringList dirs = Akonadi::XdgBaseDirs::findAllResourceDirs("data", QStringLiteral("akonadi/agents"));
const auto dirs = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("akonadi/agents"),
QStandardPaths::LocateDirectory);
QStringList types;
for (const QString &pluginDir : dirs) {
QDir dir(pluginDir);
......
......@@ -21,7 +21,6 @@
#include "utils.h"
#include "akonadiserver_debug.h"
#include <private/xdgbasedirs_p.h>
#include <private/standarddirs_p.h>
#include <QDir>
......
......@@ -471,7 +471,8 @@ void SelfTestDialog::testResources()
}
}
const QStringList pathList = XdgBaseDirs::findAllResourceDirs("data", QStringLiteral("akonadi/agents"));
const auto pathList = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("akonadi/agents"),
QStandardPaths::LocateDirectory);
QStandardItem *item = nullptr;
if (resourceFound) {
item = report(Success, ki18n("Resource agents found."), ki18n("At least one resource agent has been found."));
......
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