mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
settings: added migration49 to delete the old 'launcher_app_usage.json' file
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
|
||||
QtObject {
|
||||
id: root
|
||||
|
||||
// Remove old launcher_app_usage.json (usage tracking moved to ShellState)
|
||||
function migrate(adapter, logger, rawJson) {
|
||||
logger.i("Settings", "Migrating settings to v49");
|
||||
|
||||
Quickshell.execDetached(["rm", "-f", Settings.cacheDir + "launcher_app_usage.json"]);
|
||||
logger.i("Settings", "Removed old launcher_app_usage.json");
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,8 @@ QtObject {
|
||||
45: migration45Component,
|
||||
46: migration46Component,
|
||||
47: migration47Component,
|
||||
48: migration48Component
|
||||
48: migration48Component,
|
||||
49: migration49Component
|
||||
})
|
||||
|
||||
// Migration components
|
||||
@@ -42,4 +43,5 @@ QtObject {
|
||||
property Component migration46Component: Migration46 {}
|
||||
property Component migration47Component: Migration47 {}
|
||||
property Component migration48Component: Migration48 {}
|
||||
property Component migration49Component: Migration49 {}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ Singleton {
|
||||
- Default cache directory: ~/.cache/noctalia
|
||||
*/
|
||||
readonly property alias data: adapter // Used to access via Settings.data.xxx.yyy
|
||||
readonly property int settingsVersion: 49
|
||||
readonly property int settingsVersion: 50
|
||||
readonly property bool isDebug: Quickshell.env("NOCTALIA_DEBUG") === "1"
|
||||
readonly property string shellName: "noctalia"
|
||||
readonly property string configDir: Quickshell.env("NOCTALIA_CONFIG_DIR") || (Quickshell.env("XDG_CONFIG_HOME") || Quickshell.env("HOME") + "/.config") + "/" + shellName + "/"
|
||||
|
||||
Reference in New Issue
Block a user