[kde-workspace] Enable the systemd shutdown patch and (hopefully) fix it.
Kevin Kofler
kkofler at fedoraproject.org
Mon Mar 12 18:21:04 UTC 2012
commit 8ad01704cf80a903e241f1ba5fe48ef9999adcbe
Author: Kevin Kofler <Kevin at tigcc.ticalc.org>
Date: Mon Mar 12 19:20:23 2012 +0100
Enable the systemd shutdown patch and (hopefully) fix it.
QObject::property takes a const char *, not a QString, so remove the
QLatin1String() around the property names.
kde-workspace-4.8.0-systemd-shutdown.patch | 18 +++++++++---------
kde-workspace.spec | 6 +++---
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/kde-workspace-4.8.0-systemd-shutdown.patch b/kde-workspace-4.8.0-systemd-shutdown.patch
index 007ee7c..1223dc4 100644
--- a/kde-workspace-4.8.0-systemd-shutdown.patch
+++ b/kde-workspace-4.8.0-systemd-shutdown.patch
@@ -15,7 +15,7 @@ diff -ur kde-workspace-4.8.0/libs/kworkspace/CMakeLists.txt kde-workspace-4.8.0-
qt4_add_dbus_interface( kworkspace_LIB_SRCS ${ksmserver_xml} ksmserver_interface )
diff -ur kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp kde-workspace-4.8.0-systemd-shutdown/libs/kworkspace/kdisplaymanager.cpp
--- kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp 2012-01-18 21:08:42.000000000 +0100
-+++ kde-workspace-4.8.0-systemd-shutdown/libs/kworkspace/kdisplaymanager.cpp 2012-03-01 07:14:23.000000000 +0100
++++ kde-workspace-4.8.0-systemd-shutdown/libs/kworkspace/kdisplaymanager.cpp 2012-03-12 19:15:42.000000000 +0100
@@ -40,6 +40,91 @@
#include <errno.h>
#include <stdio.h>
@@ -143,7 +143,7 @@ diff -ur kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp kde-workspace-4
+ if (r.isValid()) {
+ SystemdSession sess(r.value());
+ if (sess.isValid()) {
-+ QVariant p = sess.property(QLatin1String("Seat"));
++ QVariant p = sess.property("Seat");
+ if (p.canConvert<NamedDBusObjectPath>()) {
+ NamedDBusObjectPath namedPath = p.value<NamedDBusObjectPath>();
+ if (currentSession)
@@ -170,7 +170,7 @@ diff -ur kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp kde-workspace-4
+#ifdef KWORKSPACE_USE_SYSTEMD
+ SystemdSeat seat(path);
+ if (seat.isValid()) {
-+ QVariant p = seat.property(QLatin1String("Sessions"));
++ QVariant p = seat.property("Sessions");
+ if (p.canConvert<QList<NamedDBusObjectPath> >()) {
+ QList<NamedDBusObjectPath> r = p.value<QList<NamedDBusObjectPath> >();
+ QList<QDBusObjectPath> result;
@@ -197,9 +197,9 @@ diff -ur kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp kde-workspace-4
+#ifdef KWORKSPACE_USE_SYSTEMD
+static void getSessionLocation(SystemdSession &lsess, SessEnt &se)
+{
-+ se.tty = (lsess.property(QLatin1String("Type")).toString() != QLatin1String("x11"));
-+ se.display = lsess.property(QLatin1String(se.tty ? "TTY" : "Display")).toString();
-+ se.vt = lsess.property(QLatin1String("VTNr")).toInt();
++ se.tty = (lsess.property("Type").toString() != QLatin1String("x11"));
++ se.display = lsess.property(se.tty ? "TTY" : "Display").toString();
++ se.vt = lsess.property("VTNr").toInt();
+}
+#else
static void getSessionLocation(CKSession &lsess, SessEnt &se)
@@ -245,7 +245,7 @@ diff -ur kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp kde-workspace-4
+#ifdef KWORKSPACE_USE_SYSTEMD
+ SystemdSeat seat(currentSeat);
+ if (seat.isValid())
-+ return seat.property(QLatin1String("CanMultiSession")).toBool();
++ return seat.property("CanMultiSession").toBool();
+#else
CKSeat seat(currentSeat);
if (seat.isValid()) {
@@ -266,8 +266,8 @@ diff -ur kde-workspace-4.8.0/libs/kworkspace/kdisplaymanager.cpp kde-workspace-4
+ if (lsess.isValid()) {
+ SessEnt se;
+ getSessionLocation(lsess, se);
-+ if (lsess.property(QLatin1String("Class")).toString() != QLatin1String("greeter")) {
-+ QVariant p = lsess.property(QLatin1String("User"));
++ if (lsess.property("Class").toString() != QLatin1String("greeter")) {
++ QVariant p = lsess.property("User");
+ NumberedDBusObjectPath numberedPath = p.value<NumberedDBusObjectPath>();
+ se.user = KUser(K_UID(numberedPath.num)).loginName();
+ se.session = "<unknown>";
diff --git a/kde-workspace.spec b/kde-workspace.spec
index 9febaf9..506b2c4 100644
--- a/kde-workspace.spec
+++ b/kde-workspace.spec
@@ -7,9 +7,9 @@
%define consolekit 1
%endif
-#if 0%{?fedora} > 16
-#define systemd 1
-#endif
+%if 0%{?fedora} > 16
+%define systemd 1
+%endif
Summary: KDE Workspace
Name: kde-workspace
More information about the scm-commits
mailing list