Changeset View
Changeset View
Standalone View
Standalone View
kcms/activities/SwitchingTab.cpp
Show All 33 Lines | |||||
34 | class SwitchingTab::Private : public Ui::SwitchingTabBase { | 34 | class SwitchingTab::Private : public Ui::SwitchingTabBase { | ||
35 | public: | 35 | public: | ||
36 | KActivityManagerdSettings mainConfig; | 36 | KActivityManagerdSettings mainConfig; | ||
37 | 37 | | |||
38 | KActionCollection *mainActionCollection; | 38 | KActionCollection *mainActionCollection; | ||
39 | KActivities::Consumer activities; | 39 | KActivities::Consumer activities; | ||
40 | 40 | | |||
41 | void createAction(const QString &actionName, const QString &actionText, | 41 | void createAction(const QString &actionName, const QString &actionText, | ||
42 | const QList<QKeySequence> &sequence) | 42 | const QList<QKeySequence> &defaultSequence) | ||
43 | { | 43 | { | ||
44 | auto action = mainActionCollection->addAction(actionName); | 44 | auto action = mainActionCollection->addAction(actionName); | ||
45 | action->setProperty("isConfigurationAction", true); | 45 | action->setProperty("isConfigurationAction", true); | ||
46 | action->setText(actionText); | 46 | action->setText(actionText); | ||
47 | KGlobalAccel::self()->setShortcut(action, sequence); | 47 | KGlobalAccel::self()->setShortcut(action, defaultSequence); | ||
48 | KGlobalAccel::self()->setDefaultShortcut(action, defaultSequence); | ||||
48 | } | 49 | } | ||
49 | 50 | | |||
50 | Private() | 51 | Private() | ||
51 | : mainActionCollection(nullptr) | 52 | : mainActionCollection(nullptr) | ||
52 | { | 53 | { | ||
53 | } | 54 | } | ||
54 | }; | 55 | }; | ||
55 | 56 | | |||
Show All 25 Lines | 60 | { | |||
81 | 82 | | |||
82 | defaults(); | 83 | defaults(); | ||
83 | } | 84 | } | ||
84 | 85 | | |||
85 | SwitchingTab::~SwitchingTab() | 86 | SwitchingTab::~SwitchingTab() | ||
86 | { | 87 | { | ||
87 | } | 88 | } | ||
88 | 89 | | |||
90 | bool SwitchingTab::isDefault() | ||||
ervin: { should be on its own line | |||||
91 | { | ||||
92 | return !d->checkRememberVirtualDesktop->isChecked(); | ||||
93 | } | ||||
94 | | ||||
89 | void SwitchingTab::shortcutChanged(const QKeySequence &sequence) | 95 | void SwitchingTab::shortcutChanged(const QKeySequence &sequence) | ||
90 | { | 96 | { | ||
91 | QString actionName = sender() | 97 | QString actionName = sender() | ||
92 | ? sender()->property("shortcutAction").toString() | 98 | ? sender()->property("shortcutAction").toString() | ||
93 | : QString(); | 99 | : QString(); | ||
94 | 100 | | |||
95 | if (actionName.isEmpty()) return; | 101 | if (actionName.isEmpty()) return; | ||
96 | 102 | | |||
Show All 25 Lines |
{ should be on its own line