This commit is contained in:
2026-05-28 21:45:21 +02:00
parent 653439ac24
commit a356a3d369
610 changed files with 205679 additions and 0 deletions
@@ -0,0 +1,24 @@
import QtQuick
QtObject {
id: root
// Migrate keybinds from single strings to arrays of strings
function migrate(adapter, logger, rawJson) {
logger.i("Settings", "Migrating settings to v50");
const keybinds = rawJson?.general?.keybinds;
if (!keybinds)
return true;
const keys = ["keyUp", "keyDown", "keyLeft", "keyRight", "keyEnter", "keyEscape"];
for (const key of keys) {
if (keybinds[key] !== undefined && typeof keybinds[key] === "string") {
adapter.general.keybinds[key] = [keybinds[key]];
logger.i("Settings", "Migrated keybinds." + key + " from string to array: [" + keybinds[key] + "]");
}
}
return true;
}
}