Re: Review Request 117900: Cleanup of screenlocker
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/#review57490 --- This review has been submitted with commit ece22ef8e8918be1528e8055768db3b0f41e69e4 by Martin Gräßlin to branch master. - Commit Hook On May 5, 2014, 7 a.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/ --- (Updated May 5, 2014, 7 a.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Remove saverLockReady from org.kde.screensaver interface Wasn't implemented. [screenlocker] Remove setupPlasma from org.kde.screensaver interface We don't have the plasma-overlay anymore, so let's remove it. [screenlocker] Remove boolean trap in ::lock Use an enum value to indicate whether there's an immediate or a delayed lock. At the same time lock is no longer a slot. [screenlocker] Remove lock slot without argument Replace by lambda slot which delegates to lock(true). [screenlocker] Turn idleTimeout slot into lambda slot Code is only and should only be executed after the timeoutReached signal from KIdleTime. Using a lambda slot enforces that as well as adding compile time checking for connect syntax. [screenlocker] Turn lockProcessReady slot into a lambda slot Code should only be executed in reply to signal QProcess::readyReadStandardOutput. From anywhere else it would have been wrong. By using a lambda slot this gets enforces and the connection gets compile time checked. [screenlocker] Turn lockProcessFinished slot into a lambda slot LockProcessFinished should only be invoked when the QProcess::finished signal fired. Right now it was possible to invoke that from other code paths. By turning it into a lambda slot this becomes more clear and we get compile time checking for the connection. [screenlocker] Turn KSldApp::grabKeyboard and ::grabMouse into lambdas It's only used by ::establishGrab and shouldn't be used from anywhere else. To make this more clear the code is moved into lambda functions in ::establishGrab. [screenlocker] Move sanity checks for lockGrace to kcfg Kcfg provides min/max values, so we don't need the qBound in source code side. [screenlocker] Remove not needed includes Instead of using QDesktopWidget to get the id of the X11 rootWindow we just ask QX11Info. Diffs - ksmserver/screenlocker/dbus/org.kde.screensaver.xml e700b88215973f11b2601e5d164371874d262580 ksmserver/screenlocker/interface.h 97a60737632e1cd799c0a1b09cc73ab4b580d757 ksmserver/screenlocker/interface.cpp 0ce68c0d0d8aaf41588d5b5e73e66aa1b6320d15 ksmserver/screenlocker/kcfg/kscreensaversettings.kcfg 6a1cbb0935461c8045dd847a63e31e72fb6ca007 ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be ksmserver/screenlocker/ksldapp.cpp c678cfc33f82509776047894e46c4fbe15563d49 Diff: https://git.reviewboard.kde.org/r/117900/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117900: Cleanup of screenlocker
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/ --- (Updated May 7, 2014, 12:41 p.m.) Status -- This change has been marked as submitted. Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Remove saverLockReady from org.kde.screensaver interface Wasn't implemented. [screenlocker] Remove setupPlasma from org.kde.screensaver interface We don't have the plasma-overlay anymore, so let's remove it. [screenlocker] Remove boolean trap in ::lock Use an enum value to indicate whether there's an immediate or a delayed lock. At the same time lock is no longer a slot. [screenlocker] Remove lock slot without argument Replace by lambda slot which delegates to lock(true). [screenlocker] Turn idleTimeout slot into lambda slot Code is only and should only be executed after the timeoutReached signal from KIdleTime. Using a lambda slot enforces that as well as adding compile time checking for connect syntax. [screenlocker] Turn lockProcessReady slot into a lambda slot Code should only be executed in reply to signal QProcess::readyReadStandardOutput. From anywhere else it would have been wrong. By using a lambda slot this gets enforces and the connection gets compile time checked. [screenlocker] Turn lockProcessFinished slot into a lambda slot LockProcessFinished should only be invoked when the QProcess::finished signal fired. Right now it was possible to invoke that from other code paths. By turning it into a lambda slot this becomes more clear and we get compile time checking for the connection. [screenlocker] Turn KSldApp::grabKeyboard and ::grabMouse into lambdas It's only used by ::establishGrab and shouldn't be used from anywhere else. To make this more clear the code is moved into lambda functions in ::establishGrab. [screenlocker] Move sanity checks for lockGrace to kcfg Kcfg provides min/max values, so we don't need the qBound in source code side. [screenlocker] Remove not needed includes Instead of using QDesktopWidget to get the id of the X11 rootWindow we just ask QX11Info. Diffs - ksmserver/screenlocker/dbus/org.kde.screensaver.xml e700b88215973f11b2601e5d164371874d262580 ksmserver/screenlocker/interface.h 97a60737632e1cd799c0a1b09cc73ab4b580d757 ksmserver/screenlocker/interface.cpp 0ce68c0d0d8aaf41588d5b5e73e66aa1b6320d15 ksmserver/screenlocker/kcfg/kscreensaversettings.kcfg 6a1cbb0935461c8045dd847a63e31e72fb6ca007 ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be ksmserver/screenlocker/ksldapp.cpp c678cfc33f82509776047894e46c4fbe15563d49 Diff: https://git.reviewboard.kde.org/r/117900/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117900: Cleanup of screenlocker
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/ --- (Updated May 5, 2014, 9 a.m.) Review request for Plasma and David Edmundson. Changes --- changed the grabKeyboard and grabMouse to not be a lambda. Repository: plasma-workspace Description --- [screenlocker] Remove saverLockReady from org.kde.screensaver interface Wasn't implemented. [screenlocker] Remove setupPlasma from org.kde.screensaver interface We don't have the plasma-overlay anymore, so let's remove it. [screenlocker] Remove boolean trap in ::lock Use an enum value to indicate whether there's an immediate or a delayed lock. At the same time lock is no longer a slot. [screenlocker] Remove lock slot without argument Replace by lambda slot which delegates to lock(true). [screenlocker] Turn idleTimeout slot into lambda slot Code is only and should only be executed after the timeoutReached signal from KIdleTime. Using a lambda slot enforces that as well as adding compile time checking for connect syntax. [screenlocker] Turn lockProcessReady slot into a lambda slot Code should only be executed in reply to signal QProcess::readyReadStandardOutput. From anywhere else it would have been wrong. By using a lambda slot this gets enforces and the connection gets compile time checked. [screenlocker] Turn lockProcessFinished slot into a lambda slot LockProcessFinished should only be invoked when the QProcess::finished signal fired. Right now it was possible to invoke that from other code paths. By turning it into a lambda slot this becomes more clear and we get compile time checking for the connection. [screenlocker] Turn KSldApp::grabKeyboard and ::grabMouse into lambdas It's only used by ::establishGrab and shouldn't be used from anywhere else. To make this more clear the code is moved into lambda functions in ::establishGrab. [screenlocker] Move sanity checks for lockGrace to kcfg Kcfg provides min/max values, so we don't need the qBound in source code side. [screenlocker] Remove not needed includes Instead of using QDesktopWidget to get the id of the X11 rootWindow we just ask QX11Info. Diffs (updated) - ksmserver/screenlocker/dbus/org.kde.screensaver.xml e700b88215973f11b2601e5d164371874d262580 ksmserver/screenlocker/interface.h 97a60737632e1cd799c0a1b09cc73ab4b580d757 ksmserver/screenlocker/interface.cpp 0ce68c0d0d8aaf41588d5b5e73e66aa1b6320d15 ksmserver/screenlocker/kcfg/kscreensaversettings.kcfg 6a1cbb0935461c8045dd847a63e31e72fb6ca007 ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be ksmserver/screenlocker/ksldapp.cpp c678cfc33f82509776047894e46c4fbe15563d49 Diff: https://git.reviewboard.kde.org/r/117900/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117900: Cleanup of screenlocker
On May 1, 2014, 6:59 p.m., David Edmundson wrote: ksmserver/screenlocker/ksldapp.cpp, line 296 https://git.reviewboard.kde.org/r/117900/diff/1/?file=269632#file269632line296 I don't see why we're using lambdas here. IMHO it's makes establishGrab more unreadable and has no advantages. Either it can be inline properly or it can be in a new function properly. I'll turn it into a function to have it not as a class method. - Martin --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/#review57068 --- On April 30, 2014, 3:45 p.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/ --- (Updated April 30, 2014, 3:45 p.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Remove saverLockReady from org.kde.screensaver interface Wasn't implemented. [screenlocker] Remove setupPlasma from org.kde.screensaver interface We don't have the plasma-overlay anymore, so let's remove it. [screenlocker] Remove boolean trap in ::lock Use an enum value to indicate whether there's an immediate or a delayed lock. At the same time lock is no longer a slot. [screenlocker] Remove lock slot without argument Replace by lambda slot which delegates to lock(true). [screenlocker] Turn idleTimeout slot into lambda slot Code is only and should only be executed after the timeoutReached signal from KIdleTime. Using a lambda slot enforces that as well as adding compile time checking for connect syntax. [screenlocker] Turn lockProcessReady slot into a lambda slot Code should only be executed in reply to signal QProcess::readyReadStandardOutput. From anywhere else it would have been wrong. By using a lambda slot this gets enforces and the connection gets compile time checked. [screenlocker] Turn lockProcessFinished slot into a lambda slot LockProcessFinished should only be invoked when the QProcess::finished signal fired. Right now it was possible to invoke that from other code paths. By turning it into a lambda slot this becomes more clear and we get compile time checking for the connection. [screenlocker] Turn KSldApp::grabKeyboard and ::grabMouse into lambdas It's only used by ::establishGrab and shouldn't be used from anywhere else. To make this more clear the code is moved into lambda functions in ::establishGrab. [screenlocker] Move sanity checks for lockGrace to kcfg Kcfg provides min/max values, so we don't need the qBound in source code side. [screenlocker] Remove not needed includes Instead of using QDesktopWidget to get the id of the X11 rootWindow we just ask QX11Info. Diffs - ksmserver/screenlocker/dbus/org.kde.screensaver.xml e700b88215973f11b2601e5d164371874d262580 ksmserver/screenlocker/interface.h 97a60737632e1cd799c0a1b09cc73ab4b580d757 ksmserver/screenlocker/interface.cpp 0ce68c0d0d8aaf41588d5b5e73e66aa1b6320d15 ksmserver/screenlocker/kcfg/kscreensaversettings.kcfg 6a1cbb0935461c8045dd847a63e31e72fb6ca007 ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be ksmserver/screenlocker/ksldapp.cpp c678cfc33f82509776047894e46c4fbe15563d49 Diff: https://git.reviewboard.kde.org/r/117900/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Re: Review Request 117900: Cleanup of screenlocker
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/#review57068 --- Ship it! ksmserver/screenlocker/ksldapp.cpp https://git.reviewboard.kde.org/r/117900/#comment39770 I don't see why we're using lambdas here. IMHO it's makes establishGrab more unreadable and has no advantages. Either it can be inline properly or it can be in a new function properly. - David Edmundson On April 30, 2014, 1:45 p.m., Martin Gräßlin wrote: --- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/ --- (Updated April 30, 2014, 1:45 p.m.) Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Remove saverLockReady from org.kde.screensaver interface Wasn't implemented. [screenlocker] Remove setupPlasma from org.kde.screensaver interface We don't have the plasma-overlay anymore, so let's remove it. [screenlocker] Remove boolean trap in ::lock Use an enum value to indicate whether there's an immediate or a delayed lock. At the same time lock is no longer a slot. [screenlocker] Remove lock slot without argument Replace by lambda slot which delegates to lock(true). [screenlocker] Turn idleTimeout slot into lambda slot Code is only and should only be executed after the timeoutReached signal from KIdleTime. Using a lambda slot enforces that as well as adding compile time checking for connect syntax. [screenlocker] Turn lockProcessReady slot into a lambda slot Code should only be executed in reply to signal QProcess::readyReadStandardOutput. From anywhere else it would have been wrong. By using a lambda slot this gets enforces and the connection gets compile time checked. [screenlocker] Turn lockProcessFinished slot into a lambda slot LockProcessFinished should only be invoked when the QProcess::finished signal fired. Right now it was possible to invoke that from other code paths. By turning it into a lambda slot this becomes more clear and we get compile time checking for the connection. [screenlocker] Turn KSldApp::grabKeyboard and ::grabMouse into lambdas It's only used by ::establishGrab and shouldn't be used from anywhere else. To make this more clear the code is moved into lambda functions in ::establishGrab. [screenlocker] Move sanity checks for lockGrace to kcfg Kcfg provides min/max values, so we don't need the qBound in source code side. [screenlocker] Remove not needed includes Instead of using QDesktopWidget to get the id of the X11 rootWindow we just ask QX11Info. Diffs - ksmserver/screenlocker/dbus/org.kde.screensaver.xml e700b88215973f11b2601e5d164371874d262580 ksmserver/screenlocker/interface.h 97a60737632e1cd799c0a1b09cc73ab4b580d757 ksmserver/screenlocker/interface.cpp 0ce68c0d0d8aaf41588d5b5e73e66aa1b6320d15 ksmserver/screenlocker/kcfg/kscreensaversettings.kcfg 6a1cbb0935461c8045dd847a63e31e72fb6ca007 ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be ksmserver/screenlocker/ksldapp.cpp c678cfc33f82509776047894e46c4fbe15563d49 Diff: https://git.reviewboard.kde.org/r/117900/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel
Review Request 117900: Cleanup of screenlocker
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/117900/ --- Review request for Plasma and David Edmundson. Repository: plasma-workspace Description --- [screenlocker] Remove saverLockReady from org.kde.screensaver interface Wasn't implemented. [screenlocker] Remove setupPlasma from org.kde.screensaver interface We don't have the plasma-overlay anymore, so let's remove it. [screenlocker] Remove boolean trap in ::lock Use an enum value to indicate whether there's an immediate or a delayed lock. At the same time lock is no longer a slot. [screenlocker] Remove lock slot without argument Replace by lambda slot which delegates to lock(true). [screenlocker] Turn idleTimeout slot into lambda slot Code is only and should only be executed after the timeoutReached signal from KIdleTime. Using a lambda slot enforces that as well as adding compile time checking for connect syntax. [screenlocker] Turn lockProcessReady slot into a lambda slot Code should only be executed in reply to signal QProcess::readyReadStandardOutput. From anywhere else it would have been wrong. By using a lambda slot this gets enforces and the connection gets compile time checked. [screenlocker] Turn lockProcessFinished slot into a lambda slot LockProcessFinished should only be invoked when the QProcess::finished signal fired. Right now it was possible to invoke that from other code paths. By turning it into a lambda slot this becomes more clear and we get compile time checking for the connection. [screenlocker] Turn KSldApp::grabKeyboard and ::grabMouse into lambdas It's only used by ::establishGrab and shouldn't be used from anywhere else. To make this more clear the code is moved into lambda functions in ::establishGrab. [screenlocker] Move sanity checks for lockGrace to kcfg Kcfg provides min/max values, so we don't need the qBound in source code side. [screenlocker] Remove not needed includes Instead of using QDesktopWidget to get the id of the X11 rootWindow we just ask QX11Info. Diffs - ksmserver/screenlocker/dbus/org.kde.screensaver.xml e700b88215973f11b2601e5d164371874d262580 ksmserver/screenlocker/interface.h 97a60737632e1cd799c0a1b09cc73ab4b580d757 ksmserver/screenlocker/interface.cpp 0ce68c0d0d8aaf41588d5b5e73e66aa1b6320d15 ksmserver/screenlocker/kcfg/kscreensaversettings.kcfg 6a1cbb0935461c8045dd847a63e31e72fb6ca007 ksmserver/screenlocker/ksldapp.h 958b55c1ff83e21d57e3c1dfb812016f325046be ksmserver/screenlocker/ksldapp.cpp c678cfc33f82509776047894e46c4fbe15563d49 Diff: https://git.reviewboard.kde.org/r/117900/diff/ Testing --- Thanks, Martin Gräßlin ___ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel