Changeset View
Changeset View
Standalone View
Standalone View
src/kshortcutseditor.cpp
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 103 | { | |||
---|---|---|---|---|---|
125 | hier[KShortcutsEditorPrivate::Root] = d->ui.list->invisibleRootItem(); | 125 | hier[KShortcutsEditorPrivate::Root] = d->ui.list->invisibleRootItem(); | ||
126 | hier[KShortcutsEditorPrivate::Program] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Root], displayTitle); | 126 | hier[KShortcutsEditorPrivate::Program] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Root], displayTitle); | ||
127 | hier[KShortcutsEditorPrivate::Action] = nullptr; | 127 | hier[KShortcutsEditorPrivate::Action] = nullptr; | ||
128 | 128 | | |||
129 | // Set to remember which actions we have seen. | 129 | // Set to remember which actions we have seen. | ||
130 | QSet<QAction *> actionsSeen; | 130 | QSet<QAction *> actionsSeen; | ||
131 | 131 | | |||
132 | // Add all categories in their own subtree below the collections root node | 132 | // Add all categories in their own subtree below the collections root node | ||
133 | QList<KActionCategory *> categories = collection->findChildren<KActionCategory *>(); | 133 | const QList<KActionCategory *> categories = collection->findChildren<KActionCategory *>(); | ||
134 | foreach (KActionCategory *category, categories) { | 134 | for (KActionCategory *category : categories) { | ||
135 | hier[KShortcutsEditorPrivate::Action] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Program], category->text()); | 135 | hier[KShortcutsEditorPrivate::Action] = d->findOrMakeItem(hier[KShortcutsEditorPrivate::Program], category->text()); | ||
136 | foreach (QAction *action, category->actions()) { | 136 | foreach (QAction *action, category->actions()) { | ||
137 | // Set a marker that we have seen this action | 137 | // Set a marker that we have seen this action | ||
138 | actionsSeen.insert(action); | 138 | actionsSeen.insert(action); | ||
139 | d->addAction(action, hier, KShortcutsEditorPrivate::Action); | 139 | d->addAction(action, hier, KShortcutsEditorPrivate::Action); | ||
140 | } | 140 | } | ||
141 | } | 141 | } | ||
142 | 142 | | |||
▲ Show 20 Lines • Show All 654 Lines • Show Last 20 Lines |