[ksmserver] Remove obsolete KDELibs4Support dependency

Summary:
The inhibition was dysfunctional, as powerdevil delays the inhibition
by 5 seconds (and is already stopped when the delay times out). Also
powerdevil handles concurrent user session shutdowns and sleep requests
itself, so the code is obsolete.

As KDELibs4Support pulled in a number of Frameworks, we have to
explicitly add these now.

Reviewers: #plasma, broulik, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: apol, sitter, anthonyfieroni, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D22296
wilder-5.17
Stefan Brüns 7 years ago
parent 7e71b864f1
commit 7fa46fa749
  1. 4
      ksmserver/CMakeLists.txt
  2. 7
      ksmserver/logout.cpp
  3. 4
      ksmserver/server.h

@ -66,6 +66,7 @@ target_link_libraries(kdeinit_ksmserver
PW::KWorkspace
KF5::XmlGui
KF5::GlobalAccel
KF5::I18n
KF5::KIOCore
KF5::KIOWidgets
${X11_LIBRARIES}
@ -75,8 +76,9 @@ target_link_libraries(kdeinit_ksmserver
Qt5::Quick
KF5::Declarative
KF5::DBusAddons
KF5::Notifications
KF5::Package
KF5::KDELibs4Support # Solid/PowerManagement
KF5::WindowSystem
${PHONON_LIBRARIES}
Qt5::Concurrent
)

@ -76,8 +76,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "global.h"
#include "client.h"
#include <solid/powermanagement.h>
#include "logoutprompt_interface.h"
#include "shutdown_interface.h"
@ -184,10 +182,6 @@ void KSMServer::performLogout()
}
state = Shutdown;
// If the logout was confirmed, let's start a powermanagement inhibition.
// We store the cookie so we can interrupt it if the logout will be canceled
inhibitCookie = Solid::PowerManagement::beginSuppressingSleep(QStringLiteral("Shutting down system"));
// shall we save the session on logout?
KConfigGroup cg(KSharedConfig::openConfig(), "General");
saveSession = ( cg.readEntry( "loginMode",
@ -393,7 +387,6 @@ void KSMServer::cancelShutdown( KSMClient* c )
clientsToSave.clear();
emit subSessionCloseCanceled();
} else {
Solid::PowerManagement::stopSuppressingSleep(inhibitCookie);
qCDebug(KSMSERVER) << "Client " << c->program() << " (" << c->clientId() << ") canceled shutdown.";
KNotification::event( QStringLiteral( "cancellogout" ),
i18n( "Logout canceled by '%1'", c->program()),

@ -245,10 +245,6 @@ private:
WindowMap legacyWindows;
int inhibitCookie;
//subSession stuff
QList<KSMClient*> clientsToKill;
QList<KSMClient*> clientsToSave;

Loading…
Cancel
Save