NImageCached: restored to its original glory. Warnings are expected and are acceptable.

This commit is contained in:
ItsLemmy
2025-11-10 08:29:34 -05:00
parent bb8ab1f7eb
commit f24d2f758a

View File

@@ -31,9 +31,9 @@ Image {
}
onCachePathChanged: {
if (imageHash && cachePath) {
// Check if cache file exists before trying to load it
cacheChecker.command = ["test", "-f", cachePath]
cacheChecker.running = true
// Try to load the cached version, failure will be detected below in onStatusChanged
// Failure is expected and warnings are ok in the console. Don't try to improve without consulting.
source = cachePath
}
}
onStatusChanged: {
@@ -49,19 +49,4 @@ Image {
})
}
}
// Check if cache file exists to avoid warnings
Process {
id: cacheChecker
running: false
onExited: function (exitCode) {
if (exitCode === 0 && root.cachePath) {
// Cache file exists, load it
root.source = root.cachePath
} else if (root.imagePath) {
// Cache doesn't exist, load original directly
root.source = root.imagePath
}
}
}
}