Skip to content

Commit 5967988

Browse files
committed
registry: remove old hasSaveState property
1 parent c5b188f commit 5967988

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

Platform/VMData.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ extension VMData {
396396
var stateLabel: String {
397397
switch state {
398398
case .stopped:
399-
if registryEntry?.hasSaveState == true {
399+
if registryEntry?.isSuspended == true {
400400
return NSLocalizedString("Suspended", comment: "VMData");
401401
} else {
402402
return NSLocalizedString("Stopped", comment: "VMData");

Platform/iOS/UTMDataExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension UTMData {
3434
guard let wrapped = vm.wrapped else {
3535
return
3636
}
37-
if wrapped.registryEntry.hasSaveState {
37+
if wrapped.registryEntry.isSuspended {
3838
wrapped.requestVmDeleteState()
3939
}
4040
}

Platform/macOS/Display/VMDisplayWindowController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ extension VMDisplayWindowController: NSWindowDelegate {
287287
guard !isSecondary else {
288288
return true
289289
}
290-
guard !(vm.state == .stopped || (vm.state == .paused && vm.registryEntry.hasSaveState)) else {
290+
guard !(vm.state == .stopped || (vm.state == .paused && vm.registryEntry.isSuspended)) else {
291291
return true
292292
}
293293
guard !isNoQuitConfirmation else {

Services/UTMRegistryEntry.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -354,20 +354,6 @@ extension UTMRegistryEntry {
354354
#endif
355355
}
356356

357-
// MARK: - Objective C bridging
358-
// FIXME: these are NOT synchronized to the actor
359-
@objc extension UTMRegistryEntry {
360-
var hasSaveState: Bool {
361-
get {
362-
_isSuspended
363-
}
364-
365-
set {
366-
_isSuspended = newValue
367-
}
368-
}
369-
}
370-
371357
extension UTMRegistryEntry {
372358
struct File: Codable, Identifiable {
373359
var url: URL

0 commit comments

Comments
 (0)