Skip to content

Commit

Permalink
Merge pull request #117 from dobey/dbus-path
Browse files Browse the repository at this point in the history
connection: Move dbus socket to well known path in XDG_RUNTIME_DIR
  • Loading branch information
dobey authored Oct 13, 2022
2 parents 5b0d1a0 + 3fef6c2 commit 8129694
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions connection/serverdbusaddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#include <QDebug>
#include <QDBusConnection>

#include <QDBusServer>
#include <QStandardPaths>

#include <cstdlib>

Expand Down Expand Up @@ -61,7 +61,8 @@ DynamicAddress::DynamicAddress()

QDBusServer* DynamicAddress::connect()
{
QLatin1String dbusAddress("unix:tmpdir=/tmp/maliit-server");
auto runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation);
auto dbusAddress = QLatin1String("unix:path=%1/maliit-server").arg(runtimeDir);

QDBusServer *server = new QDBusServer(dbusAddress);

Expand Down

0 comments on commit 8129694

Please sign in to comment.