Changeset View
Changeset View
Standalone View
Standalone View
libkworkspace/updatelaunchenvjob.cpp
Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Line(s) | 71 | { | |||
---|---|---|---|---|---|
92 | QDBusMessage dbusActivationMsg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.DBus"), | 92 | QDBusMessage dbusActivationMsg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.DBus"), | ||
93 | QStringLiteral("/org/freedesktop/DBus"), | 93 | QStringLiteral("/org/freedesktop/DBus"), | ||
94 | QStringLiteral("org.freedesktop.DBus"), | 94 | QStringLiteral("org.freedesktop.DBus"), | ||
95 | QStringLiteral("UpdateActivationEnvironment")); | 95 | QStringLiteral("UpdateActivationEnvironment")); | ||
96 | dbusActivationMsg.setArguments({QVariant::fromValue(dbusActivationEnv)}); | 96 | dbusActivationMsg.setArguments({QVariant::fromValue(dbusActivationEnv)}); | ||
97 | 97 | | |||
98 | auto dbusActivationReply = QDBusConnection::sessionBus().asyncCall(dbusActivationMsg); | 98 | auto dbusActivationReply = QDBusConnection::sessionBus().asyncCall(dbusActivationMsg); | ||
99 | d->monitorReply(dbusActivationReply); | 99 | d->monitorReply(dbusActivationReply); | ||
100 | | ||||
101 | // _user_ systemd env | ||||
102 | QDBusMessage systemdActivationMsg = QDBusMessage::createMethodCall(QStringLiteral("org.freedesktop.systemd1"), | ||||
103 | QStringLiteral("/org/freedesktop/systemd1"), | ||||
104 | QStringLiteral("org.freedesktop.systemd1.Manager"),QStringLiteral("SetEnvironment")); | ||||
broulik: Coding style | |||||
105 | const QString updateString = d->varName + "=" + d->value; | ||||
broulik: Does this need some form of escaping? | |||||
I don't think so. you can't have an = in your var name davidedmundson: I don't think so.
you can't have an = in your var name
and that's the only part that matters | |||||
106 | systemdActivationMsg.setArguments({QVariant(QStringList{updateString})}); | ||||
107 | | ||||
108 | auto systemdActivationReply = QDBusConnection::sessionBus().asyncCall(dbusActivationMsg); | ||||
broulik: You probably want to send `systemdActivationMsg` | |||||
109 | d->monitorReply(systemdActivationReply); | ||||
100 | } | 110 | } | ||
101 | 111 | |
Coding style