소스 검색

scripting: change property name
Avoid using reserved keyword in AppleScript as property name

Naveenraj M 10 달 전
부모
커밋
7c8f656592
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      Scripting/UTM.sdef
  2. 2 2
      Scripting/UTMScriptingConfigImpl.swift

+ 1 - 1
Scripting/UTM.sdef

@@ -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"

+ 2 - 2
Scripting/UTMScriptingConfigImpl.swift

@@ -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
@@ -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