Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/systementry.cpp
Show All 37 Lines | |||||
38 | { | 38 | { | ||
39 | init(); | 39 | init(); | ||
40 | } | 40 | } | ||
41 | 41 | | |||
42 | SystemEntry::SystemEntry(AbstractModel *owner, const QString &id) : AbstractEntry(owner) | 42 | SystemEntry::SystemEntry(AbstractModel *owner, const QString &id) : AbstractEntry(owner) | ||
43 | , m_action(NoAction) | 43 | , m_action(NoAction) | ||
44 | , m_valid(false) | 44 | , m_valid(false) | ||
45 | { | 45 | { | ||
46 | if (id == QStringLiteral("lock-screen")) { | 46 | if (id == QLatin1String("lock-screen")) { | ||
47 | m_action = LockSession; | 47 | m_action = LockSession; | ||
48 | } else if (id == QStringLiteral("logout")) { | 48 | } else if (id == QLatin1String("logout")) { | ||
49 | m_action = LogoutSession; | 49 | m_action = LogoutSession; | ||
50 | } else if (id == QStringLiteral("save-session")) { | 50 | } else if (id == QLatin1String("save-session")) { | ||
51 | m_action = SaveSession; | 51 | m_action = SaveSession; | ||
52 | } else if (id == QStringLiteral("switch-user")) { | 52 | } else if (id == QLatin1String("switch-user")) { | ||
53 | m_action = SwitchUser; | 53 | m_action = SwitchUser; | ||
54 | } else if (id == QStringLiteral("suspend")) { | 54 | } else if (id == QLatin1String("suspend")) { | ||
55 | m_action = SuspendToRam; | 55 | m_action = SuspendToRam; | ||
56 | } else if (id == QStringLiteral("hibernate")) { | 56 | } else if (id == QLatin1String("hibernate")) { | ||
57 | m_action = SuspendToDisk; | 57 | m_action = SuspendToDisk; | ||
58 | } else if (id == QStringLiteral("reboot")) { | 58 | } else if (id == QLatin1String("reboot")) { | ||
59 | m_action = Reboot; | 59 | m_action = Reboot; | ||
60 | } else if (id == QStringLiteral("shutdown")) { | 60 | } else if (id == QLatin1String("shutdown")) { | ||
61 | m_action = Shutdown; | 61 | m_action = Shutdown; | ||
62 | } | 62 | } | ||
63 | 63 | | |||
64 | init(); | 64 | init(); | ||
65 | } | 65 | } | ||
66 | 66 | | |||
67 | void SystemEntry::init() | 67 | void SystemEntry::init() | ||
68 | { | 68 | { | ||
▲ Show 20 Lines • Show All 282 Lines • Show Last 20 Lines |