Commit f3ed87e0 authored by Ivan Čukić's avatar Ivan Čukić 👁
Browse files

Remove macro string magic

parent 8d388741
......@@ -14,11 +14,11 @@
QStringLiteral("org.kde.ActivityManager")
#define KAMD_DBUS_OBJECT_PATH(A) \
(sizeof(#A) > 2 ? QLatin1String("/ActivityManager/" #A) \
: QLatin1String("/ActivityManager"))
(sizeof(A) > 2 ? QLatin1String("/ActivityManager/" A) \
: QLatin1String("/ActivityManager"))
#define KAMD_DBUS_OBJECT(A) \
QLatin1String("org.kde.ActivityManager." #A)
QLatin1String("org.kde.ActivityManager." A)
#define KAMD_DBUS_INTERFACE(OBJECT_PATH, OBJECT, PARENT) \
QDBusInterface(KAMD_DBUS_SERVICE, \
......
......@@ -481,7 +481,7 @@ Activities::Activities(QObject *parent)
new ActivitiesAdaptor(this);
QDBusConnection::sessionBus().registerObject(
KAMD_DBUS_OBJECT_PATH(Activities), this);
KAMD_DBUS_OBJECT_PATH("Activities"), this);
// Initializing config
......
......@@ -27,7 +27,7 @@ Features::Features(QObject *parent)
{
new FeaturesAdaptor(this);
QDBusConnection::sessionBus().registerObject(
KAMD_DBUS_OBJECT_PATH(Features), this);
KAMD_DBUS_OBJECT_PATH("Features"), this);
}
Features::~Features()
......
......@@ -257,7 +257,7 @@ Resources::Resources(QObject *parent)
new ResourcesAdaptor(this);
QDBusConnection::sessionBus().registerObject(
KAMD_DBUS_OBJECT_PATH(Resources), this);
KAMD_DBUS_OBJECT_PATH("Resources"), this);
connect(KWindowSystem::self(), &KWindowSystem::windowRemoved,
d.operator->(), &Resources::Private::windowClosed);
......
Supports Markdown
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