Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 278a85f8 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖

Remove XdgBaseDirs

The codebase now uses QStandardPaths everywhere. This ensures that there
will be no difference between how Akonadi sees default paths and how other
parts of the stack (especially those parts that use Frameworks) see them,
as they are all using the same method to look up the paths. This is
especially important on Windows where XDG_* environment variables don't
exist and are not honored by QStandardPaths. XdgBaseDirs still tried to
simulate XDG-like directory structure even on Windows, which caused
QStandardPaths-based code (like KConfig) to not find the correct config
files.
parent 27533799
......@@ -31,7 +31,6 @@
#include <QBuffer>
#include <QStandardPaths>
#include <private/xdgbasedirs_p.h>
#include <private/protocol_p.h>
#include <private/scope_p.h>
#include <private/standarddirs_p.h>
......
......@@ -32,7 +32,6 @@
#include "relationsync.h"
#include "resourcescheduler_p.h"
#include "tracerinterface.h"
#include "private/xdgbasedirs_p.h"
#include "changerecorder.h"
#include "collectionfetchjob.h"
......
......@@ -21,7 +21,6 @@
#include "akonadiagentserver_debug.h"
#include "agentthread.h"
#include <private/xdgbasedirs_p.h>
#include <private/dbus_p.h>
#include <QCoreApplication>
......
......@@ -23,8 +23,6 @@
#include "agenttype.h"
#include "agentmanager.h"
#include <private/xdgbasedirs_p.h>
AgentInstance::AgentInstance(AgentManager *manager)
: QObject(manager)
, mManager(manager)
......
......@@ -167,7 +167,7 @@ static void listInstances()
bool running;
};
QVector<Instance> instances { { QStringLiteral("(default)"), instanceRunning() } };
const QDir instanceDir(Akonadi::XdgBaseDirs::saveDir("config", QStringLiteral("akonadi/instance")));
const QDir instanceDir(QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + QStringLiteral("/akonadi/instance"));
if (instanceDir.exists()) {
const auto list = instanceDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
for (const auto &e : list) {
......
......@@ -31,7 +31,6 @@
#include "persistentsearchattribute.h"
#include "private/protocol_p.h"
#include "private/xdgbasedirs_p.h"
#include "private/externalpartstorage_p.h"
#include <QFile>
......
......@@ -18,7 +18,6 @@ set(akonadiprivate_SRCS
protocol.cpp
scope.cpp
tristate.cpp
xdgbasedirs.cpp
standarddirs.cpp
dbus.cpp
)
......@@ -82,7 +81,6 @@ install(FILES
protocol_p.h
${CMAKE_CURRENT_BINARY_DIR}/protocol_gen.h
protocol_exception_p.h
xdgbasedirs_p.h
capabilities_p.h
scope_p.h
tristate_p.h
......
......@@ -20,9 +20,10 @@
#ifndef AKSTANDARDDIRS_H
#define AKSTANDARDDIRS_H
#include "xdgbasedirs_p.h"
#include "akonadiprivate_export.h"
#include <QString>
namespace Akonadi
{
......
This diff is collapsed.
This diff is collapsed.
......@@ -41,7 +41,6 @@
#include "collectionreferencemanager.h"
#include <private/xdgbasedirs_p.h>
#include <private/standarddirs_p.h>
#include <private/protocol_p.h>
#include <private/dbus_p.h>
......
......@@ -26,7 +26,6 @@
#include <private/standarddirs_p.h>
#include <private/xdgbasedirs_p.h>
#include <QSettings>
#include <QThreadPool>
......
......@@ -26,8 +26,6 @@
#include "connection.h"
#include "akonadiserver_debug.h"
#include <private/xdgbasedirs_p.h>
using namespace Akonadi::Server;
SearchRequest::SearchRequest(const QByteArray &connectionId)
......
......@@ -25,7 +25,6 @@
#include "akonadiserver_debug.h"
#include <private/standarddirs_p.h>
#include <private/xdgbasedirs_p.h>
#include <private/instance_p.h>
#include <QProcess>
......
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