D12893: Fix Logout screen countdown not cancelling on multi-monitor setups
Kai Uwe Broulik
noreply at phabricator.kde.org
Tue May 15 10:13:59 UTC 2018
broulik added a comment.
This is both genius and evil. I like that you kept it all in the theme.
INLINE COMMENTS
> timer.js:25
>
> -import "../components"
> +var callbacks = new Array();
>
`var callbacks = [];`
> timer.js:27
>
> -ActionButton {
> - property var action
> - onClicked: action()
> - Layout.alignment: Qt.AlignTop
> - iconSize: units.iconSizes.huge
> - opacity: activeFocus || containsMouse ? 1 : 0.5
> - font.underline: false
> - Behavior on opacity {
> - OpacityAnimator {
> - duration: units.longDuration
> - easing.type: Easing.InOutQuad
> +function setCancelAutoTriggerCallback(callback) {
> + callbacks.push(callback);
Name it `add` as first reading the QML file I thought you were overwriting the callback every time
> timer.js:32
> +function cancelAutoTrigger() {
> + for (var i in callbacks) {
> + var c = callbacks[i]();
I recall `for .. in` with JS Arrays being bad. I don't remember why, though.
Perhaps do
callbacks.forEach(function(c) { ... })
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D12893
To: davidedmundson, #plasma
Cc: broulik, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20180515/7a7c03af/attachment.html>
More information about the Plasma-devel
mailing list