internal: use Process.exec
This commit is contained in:
parent
06ffd6d767
commit
fa920fd087
1 changed files with 1 additions and 8 deletions
|
|
@ -16,11 +16,7 @@ Image {
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
|
|
||||||
onPathChanged: {
|
onPathChanged: shaProc.exec(["sha256sum", path.replace("file://", "")])
|
||||||
shaProc.signal(9);
|
|
||||||
shaProc.path = path.replace("file://", "");
|
|
||||||
shaProc.running = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
onCachePathChanged: {
|
onCachePathChanged: {
|
||||||
if (hash)
|
if (hash)
|
||||||
|
|
@ -40,9 +36,6 @@ Image {
|
||||||
Process {
|
Process {
|
||||||
id: shaProc
|
id: shaProc
|
||||||
|
|
||||||
property string path
|
|
||||||
|
|
||||||
command: ["sha256sum", path]
|
|
||||||
stdout: StdioCollector {
|
stdout: StdioCollector {
|
||||||
onStreamFinished: root.hash = text.split(" ")[0]
|
onStreamFinished: root.hash = text.split(" ")[0]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue