You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
plasma-workspace/plasma-workspace-ksyncdbuse...

39 lines
1.6 KiB

diff --git a/startkde/ksyncdbusenv/ksyncdbusenv.cpp b/startkde/ksyncdbusenv/ksyncdbusenv.cpp
index 8a01e7d..06e54d2 100644
--- a/startkde/ksyncdbusenv/ksyncdbusenv.cpp
+++ b/startkde/ksyncdbusenv/ksyncdbusenv.cpp
@@ -17,6 +17,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <stdlib.h>
+
#include <QCoreApplication>
#include <QDBusConnection>
#include <QDBusMessage>
@@ -31,6 +33,7 @@ Q_DECLARE_METATYPE(EnvMap)
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
+ qDBusRegisterMetaType<EnvMap>();
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
@@ -43,13 +46,12 @@ int main(int argc, char **argv)
QStringLiteral("/org/freedesktop/DBus"),
QStringLiteral("org.freedesktop.DBus"),
QStringLiteral("UpdateActivationEnvironment"));
- qDBusRegisterMetaType<EnvMap>();
- msg.setArguments(QList<QVariant>({QVariant::fromValue(envMap)}));
+ msg << QVariant::fromValue(envMap);
QDBusPendingCall reply = QDBusConnection::sessionBus().asyncCall(msg);
reply.waitForFinished();
if (reply.isError()) {
- qDebug() << reply.error().name() << reply.error().message();
+ qDebug() << reply.error().name() << reply.error().message();
}
- return reply.isError() ? 1 : 0;
+ return reply.isError() ? EXIT_FAILURE : EXIT_SUCCESS;
}