| 64 | } |
| 65 | |
| 66 | void KeybindSettings::setKeybind(QString &profile, KeyName &key, ModKeys &mods, QString &command, bool &is_secondary) |
| 67 | { |
| 68 | removeKeybind(profile,key,mods); // remove previous keybinds |
| 69 | |
| 70 | QString keystring = makeKeyString(key,mods); // Construct keystring from mods+key |
| 71 | |
| 72 | for(auto &p : m_keybind_profiles) |
| 73 | { |
| 74 | if(p.Name == profile) |
| 75 | p.KeybindArr.push_back({key,mods,keystring.toLatin1(),command.toLatin1(),is_secondary}); |
| 76 | } |
| 77 | |
| 78 | qCDebug(logKeybinds) << "Setting keybind: " << profile << key << mods << keystring << command << is_secondary; |
| 79 | |
| 80 | } |
| 81 | |
| 82 | void KeybindSettings::removeKeybind(QString &profile, KeyName &key, ModKeys &mods) |
| 83 | { |
no test coverage detected