Skip to content

Commit

Permalink
scripting: change property name
Browse files Browse the repository at this point in the history
Avoid using reserved keyword in AppleScript as property name
  • Loading branch information
naveenrajm7 committed Oct 13, 2024
1 parent a4a79fe commit 7c8f656
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Scripting/UTM.sdef
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@
</record-type>

<record-type name="qemu argument" code="QeAr" description="QEMU argument configuration.">
<property name="string" code="StAg" type="text"
<property name="argument string" code="ArSt" type="text"
description="The QEMU argument as a string."/>

<property name="file urls" code="FlUr" type="file" list="yes"
Expand Down
4 changes: 2 additions & 2 deletions Scripting/UTMScriptingConfigImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ extension UTMScriptingConfigImpl {

private func serializeQemuAdditionalArgument(_ argument: QEMUArgument) -> [AnyHashable: Any] {
var serializedArgument: [AnyHashable: Any] = [
"string": argument.string
"argumentString": argument.string
]

// Only add fileUrls if it is not nil and contains URLs
Expand Down Expand Up @@ -520,7 +520,7 @@ extension UTMScriptingConfigImpl {
private func updateQemuAdditionalArguments(from records: [[AnyHashable: Any]]) throws {
let config = config as! UTMQemuConfiguration
let additionalArguments = records.compactMap { record -> QEMUArgument? in
guard let argumentString = record["string"] as? String else { return nil }
guard let argumentString = record["argumentString"] as? String else { return nil }
var argument = QEMUArgument(argumentString)
// Qemu Additional Arguments in UI, only takes strings
// So, fileUrls of arguments will never be used
Expand Down

0 comments on commit 7c8f656

Please sign in to comment.