Commit e0fdeda1 authored by Tomi Leppänen's avatar Tomi Leppänen

Merge branch 'jb53879_move_socket_path' into 'master'

Move socket path.

See merge request mer-core/messagingframework!57
parents 6268432c b8568802
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tomi=20Lepp=C3=A4nen?= <tomi.leppanen@jolla.com>
Date: Mon, 12 Apr 2021 17:09:15 +0300
Subject: [PATCH] Store socket in RuntimeLocation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Tomi Leppänen <tomi.leppanen@jolla.com>
---
src/libraries/qmfclient/support/qcopchannel.cpp | 5 +++--
src/libraries/qmfclient/support/qcopserver.cpp | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/libraries/qmfclient/support/qcopchannel.cpp b/src/libraries/qmfclient/support/qcopchannel.cpp
index 2e1d67af..e921e070 100644
--- a/src/libraries/qmfclient/support/qcopchannel.cpp
+++ b/src/libraries/qmfclient/support/qcopchannel.cpp
@@ -48,6 +48,7 @@
#include "qcoreevent.h"
#include "qmetaobject.h"
#include "qmaillog.h"
+#include "qstandardpaths.h"
QCopServerRegexp::QCopServerRegexp(const QString& ch, QCopClient *cl)
: channel(ch), client(cl)
@@ -1095,8 +1096,8 @@ void QCopClient::disconnectFromServer()
QString QCopThreadData::socketPath()
{
- //return (Qtopia::inline tempDir() + "qcop-server").toUtf8();
- return QString::fromLatin1("qcop-server-0");
+ return QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation)
+ + QStringLiteral("/messageserver/qcop-server-0");
}
#else
diff --git a/src/libraries/qmfclient/support/qcopserver.cpp b/src/libraries/qmfclient/support/qcopserver.cpp
index 39def5aa..1b212e24 100644
--- a/src/libraries/qmfclient/support/qcopserver.cpp
+++ b/src/libraries/qmfclient/support/qcopserver.cpp
@@ -37,6 +37,7 @@
#include "qcopchannelmonitor_p.h"
#include <QtCore/qfile.h>
#include <QtCore/qdir.h>
+#include <QtCore/qfileinfo.h>
QCopServerPrivate::QCopServerPrivate()
: QCopLocalServer()
@@ -44,6 +45,7 @@ QCopServerPrivate::QCopServerPrivate()
bool ok;
#ifndef QT_NO_QCOP_LOCAL_SOCKET
QString path = QCopThreadData::socketPath();
+ QFileInfo(path).dir().mkpath(".");
ok = listen(path);
#ifdef Q_OS_UNIX
if (!ok) {
@@ -56,7 +58,7 @@ QCopServerPrivate::QCopServerPrivate()
socket->connectToServer(path);
if (!socket->waitForConnected()) {
delete socket;
- QFile::remove(QDir::tempPath() + QChar::fromLatin1('/') + path);
+ QFile::remove(path);
ok = listen(path);
} else {
delete socket;
--
2.30.2
......@@ -59,6 +59,7 @@ Patch27: 0027-Allow-a-service-provided-folder-to-be-set-as-the-sta.patch
Patch28: 0028-Add-QMailMessage-CalendarCancellation-flag.patch
Patch29: 0029-Use-a-queued-connection-to-handle-accountsUpdated-si.patch
Patch30: 0030-Support-as-specifier-for-log-file-paths.patch
Patch31: 0031-Store-socket-in-RuntimeLocation.patch
%description
The Qt Messaging Framework, QMF, consists of a C++ library and daemon server
......
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