mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Ignore unknown shortcut names in settings (#5565)
This commit is contained in:
parent
e6e3333673
commit
12ae7a9eeb
1 changed files with 7 additions and 0 deletions
|
|
@ -28,6 +28,13 @@ ShortcutsSettings::ShortcutsSettings(const QString &settingsPath, QObject *paren
|
||||||
QMap<QString, QString> invalidItems;
|
QMap<QString, QString> invalidItems;
|
||||||
for (QStringList::const_iterator it = customKeys.constBegin(); it != customKeys.constEnd(); ++it) {
|
for (QStringList::const_iterator it = customKeys.constBegin(); it != customKeys.constEnd(); ++it) {
|
||||||
QString stringSequence = shortCutsFile.value(*it).toString();
|
QString stringSequence = shortCutsFile.value(*it).toString();
|
||||||
|
|
||||||
|
// check whether shortcut name exists
|
||||||
|
if (!shortCuts.contains(*it)) {
|
||||||
|
qCWarning(ShortcutsSettingsLog) << "Unknown shortcut name:" << *it;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// check whether shortcut is forbidden
|
// check whether shortcut is forbidden
|
||||||
if (isKeyAllowed(*it, stringSequence)) {
|
if (isKeyAllowed(*it, stringSequence)) {
|
||||||
auto shortcut = getShortcut(*it);
|
auto shortcut = getShortcut(*it);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue