Changeset View
Changeset View
Standalone View
Standalone View
kcms/keys/shortcutsmodel.cpp
Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Line(s) | 383 | for (const auto componentGroupName : config.groupList()) { | |||
---|---|---|---|---|---|
395 | } | 395 | } | ||
396 | KConfigGroup shortcutsGroup(&componentGroup, "Global Shortcuts"); | 396 | KConfigGroup shortcutsGroup(&componentGroup, "Global Shortcuts"); | ||
397 | for (const auto& key : shortcutsGroup.keyList()) { | 397 | for (const auto& key : shortcutsGroup.keyList()) { | ||
398 | auto shortcut = std::find_if(component->shortcuts.begin(), component->shortcuts.end(), [&] (const Shortcut &s) { | 398 | auto shortcut = std::find_if(component->shortcuts.begin(), component->shortcuts.end(), [&] (const Shortcut &s) { | ||
399 | return s.uniqueName == key; | 399 | return s.uniqueName == key; | ||
400 | }); | 400 | }); | ||
401 | if (shortcut == component->shortcuts.end()) { | 401 | if (shortcut == component->shortcuts.end()) { | ||
402 | qCWarning(KCMKEYS) << "Ignoring unknown action" << key; | 402 | qCWarning(KCMKEYS) << "Ignoring unknown action" << key; | ||
403 | continue; | ||||
403 | } | 404 | } | ||
404 | const auto shortcuts = QKeySequence::listFromString(shortcutsGroup.readEntry(key)); | 405 | const auto shortcuts = QKeySequence::listFromString(shortcutsGroup.readEntry(key)); | ||
405 | shortcut->activeShortcuts = QSet<QKeySequence>(shortcuts.cbegin(), shortcuts.cend()); | 406 | shortcut->activeShortcuts = QSet<QKeySequence>(shortcuts.cbegin(), shortcuts.cend()); | ||
406 | } | 407 | } | ||
407 | } | 408 | } | ||
408 | emit dataChanged(index(0, 0), index(0, rowCount()), {ActiveShortcutsRole, CustomShortcutsRole}); | 409 | emit dataChanged(index(0, 0), index(0, rowCount()), {ActiveShortcutsRole, CustomShortcutsRole}); | ||
409 | } | 410 | } | ||
410 | 411 | | |||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |