Explorar el Código

config(qemu): make constants a class property

osy hace 3 años
padre
commit
0d5fba7659

+ 2 - 2
Configuration/UTMQemuConfiguration+Constants.h

@@ -20,8 +20,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface UTMQemuConfiguration (Constants)
 
-+ (NSString *)diskImagesDirectory;
-+ (NSString *)debugLogName;
+@property (class, nonatomic, readonly) NSString *diskImagesDirectory;
+@property (class, nonatomic, readonly) NSString *debugLogName;
 @property (class, nonatomic, readonly) NSString *efiVariablesFileName;
 
 + (NSArray<NSString *>*)supportedOptions:(NSString *)key pretty:(BOOL)pretty;

+ 1 - 1
Platform/Shared/VMConfigQEMUView.swift

@@ -32,7 +32,7 @@ struct VMConfigQEMUView: View {
         guard let path = config.existingPath else {
             return false
         }
-        let logPath = path.appendingPathComponent(UTMQemuConfiguration.debugLogName())
+        let logPath = path.appendingPathComponent(UTMQemuConfiguration.debugLogName)
         return FileManager.default.fileExists(atPath: logPath.path)
     }
     

+ 1 - 1
Platform/UTMData.swift

@@ -357,7 +357,7 @@ class UTMData: ObservableObject {
         guard let path = config.existingPath else {
             throw NSLocalizedString("No log found!", comment: "UTMData")
         }
-        let srcLogPath = path.appendingPathComponent(UTMQemuConfiguration.debugLogName())
+        let srcLogPath = path.appendingPathComponent(UTMQemuConfiguration.debugLogName)
         return .debugLog(srcLogPath)
     }