Changeset View
Changeset View
Standalone View
Standalone View
src/kshortcutseditor.cpp
Show First 20 Lines • Show All 189 Lines • ▼ Show 20 Line(s) | 189 | { | |||
---|---|---|---|---|---|
190 | Q_ASSERT(config); | 190 | Q_ASSERT(config); | ||
191 | if (!config) { | 191 | if (!config) { | ||
192 | return; | 192 | return; | ||
193 | } | 193 | } | ||
194 | 194 | | |||
195 | if (d->actionTypes & KShortcutsEditor::GlobalAction) { | 195 | if (d->actionTypes & KShortcutsEditor::GlobalAction) { | ||
196 | QString groupName(QStringLiteral("Global Shortcuts")); | 196 | QString groupName(QStringLiteral("Global Shortcuts")); | ||
197 | KConfigGroup group(config, groupName); | 197 | KConfigGroup group(config, groupName); | ||
198 | foreach (KActionCollection *collection, d->actionCollections) { | 198 | for (KActionCollection *collection : qAsConst(d->actionCollections)) { | ||
199 | collection->exportGlobalShortcuts(&group, true); | 199 | collection->exportGlobalShortcuts(&group, true); | ||
200 | } | 200 | } | ||
201 | } | 201 | } | ||
202 | if (d->actionTypes & ~KShortcutsEditor::GlobalAction) { | 202 | if (d->actionTypes & ~KShortcutsEditor::GlobalAction) { | ||
203 | QString groupName(QStringLiteral("Shortcuts")); | 203 | QString groupName(QStringLiteral("Shortcuts")); | ||
204 | KConfigGroup group(config, groupName); | 204 | KConfigGroup group(config, groupName); | ||
205 | foreach (KActionCollection *collection, d->actionCollections) { | 205 | for (KActionCollection *collection : qAsConst(d->actionCollections)) { | ||
206 | collection->writeSettings(&group, true); | 206 | collection->writeSettings(&group, true); | ||
207 | } | 207 | } | ||
208 | } | 208 | } | ||
209 | } | 209 | } | ||
210 | 210 | | |||
211 | void KShortcutsEditor::writeConfiguration(KConfigGroup *config) const | 211 | void KShortcutsEditor::writeConfiguration(KConfigGroup *config) const | ||
212 | { | 212 | { | ||
213 | foreach (KActionCollection *collection, d->actionCollections) { | 213 | for (KActionCollection *collection : qAsConst(d->actionCollections)) { | ||
214 | collection->writeSettings(config); | 214 | collection->writeSettings(config); | ||
215 | } | 215 | } | ||
216 | } | 216 | } | ||
217 | 217 | | |||
218 | //slot | 218 | //slot | ||
219 | void KShortcutsEditor::resizeColumns() | 219 | void KShortcutsEditor::resizeColumns() | ||
220 | { | 220 | { | ||
221 | for (int i = 0; i < d->ui.list->columnCount(); i++) { | 221 | for (int i = 0; i < d->ui.list->columnCount(); i++) { | ||
▲ Show 20 Lines • Show All 577 Lines • Show Last 20 Lines |