aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vrátil <[email protected]>2017-12-07 02:42:23 -0800
committerDaniel Vrátil <[email protected]>2017-12-07 02:42:55 -0800
commitf9e4397db7dd6d0cf04819ba4c3aeab887881b77 (patch)
tree2aea6bbb65f90228a06a3df41bf1ef6d79e8d3a7
parente08660af41d7175706498ed85462a52e7fdf7977 (diff)
Fix log file path on Windows
-rw-r--r--autotests/server/fakeakonadiserver.cpp4
-rw-r--r--src/shared/akdebug.cpp2
2 files changed, 4 insertions, 2 deletions
diff --git a/autotests/server/fakeakonadiserver.cpp b/autotests/server/fakeakonadiserver.cpp
index f256441..8b43f33 100644
--- a/autotests/server/fakeakonadiserver.cpp
+++ b/autotests/server/fakeakonadiserver.cpp
@@ -29,6 +29,7 @@
#include <QDir>
#include <QTest>
#include <QBuffer>
+#include <QStandardPaths>
#include <private/xdgbasedirs_p.h>
#include <private/protocol_p.h>
@@ -130,7 +131,8 @@ FakeAkonadiServer::~FakeAkonadiServer()
QString FakeAkonadiServer::basePath()
{
- return QStringLiteral("/tmp/akonadiserver-test-%1").arg(QCoreApplication::instance()->applicationPid());
+ return QStandardPaths::writableLocation(QStandardPaths::TempLocation)
+ + QStringLiteral("/akonadiserver-test-%1").arg(QCoreApplication::instance()->applicationPid());
}
QString FakeAkonadiServer::socketFile()
diff --git a/src/shared/akdebug.cpp b/src/shared/akdebug.cpp
index f779eb6..246f108 100644
--- a/src/shared/akdebug.cpp
+++ b/src/shared/akdebug.cpp
@@ -129,7 +129,7 @@ public:
void setName(const QString &appName)
{
// Keep only the executable name, e.g. akonadi_control
- name = appName.mid(appName.lastIndexOf(QLatin1Char('/')) + 1);
+ name = appName.mid(appName.lastIndexOf(QDir::separator()) + 1);
if (file.isOpen()) {
file.close();