diff --git a/applets/kicker/plugin/systementry.h b/applets/kicker/plugin/systementry.h --- a/applets/kicker/plugin/systementry.h +++ b/applets/kicker/plugin/systementry.h @@ -22,8 +22,6 @@ #include "abstractentry.h" -class KDisplayManager; - class SystemEntry : public AbstractEntry { public: @@ -63,7 +61,6 @@ Action m_action; bool m_valid; - static KDisplayManager *m_displayManager; }; #endif diff --git a/applets/kicker/plugin/systementry.cpp b/applets/kicker/plugin/systementry.cpp --- a/applets/kicker/plugin/systementry.cpp +++ b/applets/kicker/plugin/systementry.cpp @@ -32,8 +32,6 @@ #include "ksmserver_interface.h" #include -KDisplayManager *SystemEntry::m_displayManager = new KDisplayManager(); - SystemEntry::SystemEntry(AbstractModel *owner, Action action) : AbstractEntry(owner) , m_action(action) , m_valid(false) @@ -92,7 +90,7 @@ } case SwitchUser: m_valid = (KAuthorized::authorizeAction("start_new_session") || KAuthorized::authorizeAction("switch_user")) - && m_displayManager->isSwitchable(); + && KDisplayManager().isSwitchable(); break; case SuspendToRam: m_valid = Solid::PowerManagement::supportedSleepStates().contains(Solid::PowerManagement::SuspendState);