D19389: Rewrite kworkspace logout, shutdown and suspend API
Kai Uwe Broulik
noreply at phabricator.kde.org
Fri Jun 21 17:25:54 BST 2019
broulik added inline comments.
INLINE COMMENTS
> loginddbustypes.h:103
> +
> +class NamedUserPath
> +{
You're using `struct` and `class` with all public inconsistently
> loginddbustypes.h:135
> + QString mode;
> + int userId;
> + uint processId;
`userId` is unsigned
> sessionmanagement.h:74
> +
> +
> + SessionManagement(QObject *parent = nullptr);
Whitespace
> sessionmanagement.h:80
> +
> + bool canShutdown();
> + bool canReboot();
Why are these not `const`?
> sessionmanagement.h:93
> + * These requestX methods will either launch a prompt to shutdown or
> + * The user may cancel it at any point in the process
> + */
Didn't we have a "don't ask" thing that also doesn't ask for apps to close?
> sessionmanagementbackend.cpp:63
> +{
> + return m_kserverConfig->group("General").readEntry("ConfirmLogout", true); // TODO
> +}
what's the TODO?
> sessionmanagementbackend.cpp:84
> + } else {
> + // both "yes" and "challenge" will show up in the UI
> + *argToUpdate = reply.value() != QLatin1String("no") ? true : false;
Better explicitly check for `yes` and `challenge`, as there is also:
> If "na" is returned the operation is not available because hardware, kernel or drivers do not support it.
> sessionmanagementbackend.cpp:91
> + emit stateChanged();
> + emit canShutdownChanged();
> + emit canRebootChanged();
Can we emit those only if actually different now?
> sessionmanagementbackend.cpp:200
> + auto canStop = m_ck->CanStop();
> + canStop.waitForFinished();
> + m_canShutdown = canStop.value();
Why is logind all async but consolekit is not? :)
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D19389
To: davidedmundson, #plasma
Cc: pino, broulik, plasma-devel, LeGast00n, jraleigh, fbampaloukas, GB_2, ragreen, Pitel, ZrenBot, himcesjf, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190621/52690a37/attachment-0001.html>
More information about the Plasma-devel
mailing list