aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <[email protected]>2018-01-22 12:41:30 +0100
committerDaniel Vrátil <[email protected]>2018-01-22 23:45:03 +0100
commit73c7dc630353976e40d2bf5f451b94dc65b68201 (patch)
tree8b88da74556da07d3554c42e5f21d990cf6b1e8f
parent0ee66c1a23f697e5d9478803dbca30a401ef284e (diff)
Port away from XdgBaseDirs::findAllResourceDirs()
We can use QStandardPaths::locateAll() instead.
-rw-r--r--src/akonadicontrol/agentmanager.cpp5
-rw-r--r--src/akonadictl/main.cpp4
-rw-r--r--src/server/storage/dbconfigpostgresql.cpp1
-rw-r--r--src/widgets/selftestdialog.cpp3
4 files changed, 7 insertions, 6 deletions
diff --git a/src/akonadicontrol/agentmanager.cpp b/src/akonadicontrol/agentmanager.cpp
index 2012206..5c45bee 100644
--- a/src/akonadicontrol/agentmanager.cpp
+++ b/src/akonadicontrol/agentmanager.cpp
@@ -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()
diff --git a/src/akonadictl/main.cpp b/src/akonadictl/main.cpp
index f7bdb91..f227f70 100644
--- a/src/akonadictl/main.cpp
+++ b/src/akonadictl/main.cpp
@@ -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);
diff --git a/src/server/storage/dbconfigpostgresql.cpp b/src/server/storage/dbconfigpostgresql.cpp
index 351797c..60e6272 100644
--- a/src/server/storage/dbconfigpostgresql.cpp
+++ b/src/server/storage/dbconfigpostgresql.cpp
@@ -21,7 +21,6 @@
#include "utils.h"
#include "akonadiserver_debug.h"
-#include <private/xdgbasedirs_p.h>
#include <private/standarddirs_p.h>
#include <QDir>
diff --git a/src/widgets/selftestdialog.cpp b/src/widgets/selftestdialog.cpp
index 0e88b1e..4e19122 100644
--- a/src/widgets/selftestdialog.cpp
+++ b/src/widgets/selftestdialog.cpp
@@ -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."));