on xenial help sign in
Fix power dialogs on desktop
7ebab8cLukáš Tinkl
plugins/Unity/Session/dbusunitysessionservice.cpp+5
@@ -197,6 +197,7 @@ void DBusUnitySessionService::Logout()
197{
197{
198 // TODO ask the apps to quit and then emit the signal
198 // TODO ask the apps to quit and then emit the signal
199 Q_EMIT LogoutReady();
199 Q_EMIT LogoutReady();
200+ Q_EMIT logoutReady();
200}
201}
201
202
202void DBusUnitySessionService::EndSession()
203void DBusUnitySessionService::EndSession()
@@ -275,6 +276,7 @@ QString DBusUnitySessionService::HostName() const
275void DBusUnitySessionService::PromptLock()
276void DBusUnitySessionService::PromptLock()
276{
277{
277 Q_EMIT LockRequested();
278 Q_EMIT LockRequested();
279+ Q_EMIT lockRequested();
278}
280}
279
281
280void DBusUnitySessionService::Lock()
282void DBusUnitySessionService::Lock()
@@ -303,6 +305,7 @@ bool DBusUnitySessionService::IsLocked() const
303void DBusUnitySessionService::RequestLogout()
305void DBusUnitySessionService::RequestLogout()
304{
306{
305 Q_EMIT LogoutRequested(false);
307 Q_EMIT LogoutRequested(false);
308+ Q_EMIT logoutRequested(false);
306}
309}
307
310
308void DBusUnitySessionService::Reboot()
311void DBusUnitySessionService::Reboot()
@@ -313,6 +316,7 @@ void DBusUnitySessionService::Reboot()
313void DBusUnitySessionService::RequestReboot()
316void DBusUnitySessionService::RequestReboot()
314{
317{
315 Q_EMIT RebootRequested(false);
318 Q_EMIT RebootRequested(false);
319+ Q_EMIT rebootRequested(false);
316}
320}
317
321
318void DBusUnitySessionService::Shutdown()
322void DBusUnitySessionService::Shutdown()
@@ -338,6 +342,7 @@ void DBusUnitySessionService::HybridSleep()
338void DBusUnitySessionService::RequestShutdown()
342void DBusUnitySessionService::RequestShutdown()
339{
343{
340 Q_EMIT ShutdownRequested(false);
344 Q_EMIT ShutdownRequested(false);
345+ Q_EMIT shutdownRequested(false);
341}
346}
342
347
343enum class Action : unsigned
348enum class Action : unsigned
plugins/Unity/Session/dbusunitysessionservice.h+7
@@ -46,6 +46,8 @@ public:
46 Q_INVOKABLE void shutdown() { Shutdown(); }
46 Q_INVOKABLE void shutdown() { Shutdown(); }
47 Q_INVOKABLE void endSession() { EndSession(); }
47 Q_INVOKABLE void endSession() { EndSession(); }
48
48
49+ // TODO: remove duplicate signals and split D-Bus and QML API's
50+ // Apparently QML needs the signals in lowercase, while DBUS spec needs the uppercase version
49Q_SIGNALS:
51Q_SIGNALS:
50 /**
52 /**
51 * LogoutRequested signal
53 * LogoutRequested signal
@@ -56,6 +58,7 @@ Q_SIGNALS:
56 * which inhibit the logout.
58 * which inhibit the logout.
57 */
59 */
58 Q_SCRIPTABLE void LogoutRequested(bool have_inhibitors);
60 Q_SCRIPTABLE void LogoutRequested(bool have_inhibitors);
61+ void logoutRequested(bool have_inhibitors);
59
62
60 /**
63 /**
61 * RebootRequested signal
64 * RebootRequested signal
@@ -66,6 +69,7 @@ Q_SIGNALS:
66 * which inhibit the reboot.
69 * which inhibit the reboot.
67 */
70 */
68 Q_SCRIPTABLE void RebootRequested(bool have_inhibitors);
71 Q_SCRIPTABLE void RebootRequested(bool have_inhibitors);
72+ void rebootRequested(bool have_inhibitors);
69
73
70 /**
74 /**
71 * ShutdownRequested signal
75 * ShutdownRequested signal
@@ -76,6 +80,7 @@ Q_SIGNALS:
76 * which inhibit the shutdown.
80 * which inhibit the shutdown.
77 */
81 */
78 Q_SCRIPTABLE void ShutdownRequested(bool have_inhibitors);
82 Q_SCRIPTABLE void ShutdownRequested(bool have_inhibitors);
83+ void shutdownRequested(bool have_inhibitors);
79
84
80 /**
85 /**
81 * LogoutReady signal
86 * LogoutReady signal
@@ -84,11 +89,13 @@ Q_SIGNALS:
84 * is safe to logout.
89 * is safe to logout.
85 */
90 */
86 Q_SCRIPTABLE void LogoutReady();
91 Q_SCRIPTABLE void LogoutReady();
92+ void logoutReady();
87
93
88 /**
94 /**
89 * Emitted as a result of calling PromptLock()
95 * Emitted as a result of calling PromptLock()
90 */
96 */
91 Q_SCRIPTABLE void LockRequested();
97 Q_SCRIPTABLE void LockRequested();
98+ void lockRequested();
92
99
93 /**
100 /**
94 * Emitted after the session has been locked.
101 * Emitted after the session has been locked.