move common dirs to Directories <--renamed-- XdgDirectories

This commit is contained in:
end-4
2025-05-27 22:49:03 +02:00
parent 5ea497068c
commit 66c75342d4
17 changed files with 63 additions and 65 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ import QtQuick;
*/
Singleton {
id: root
property var filePath: `${XdgDirectories.state}/user/todo.json`
property var filePath: Directories.todoPath
property var list: []
function addItem(item) {
@@ -68,7 +68,7 @@ Singleton {
FileView {
id: todoFileView
path: filePath
path: Qt.resolvedUrl(root.filePath)
onLoaded: {
const fileContents = todoFileView.text()
root.list = JSON.parse(fileContents)