Fix several warnings.

This commit is contained in:
Brent Simmons
2025-04-25 08:55:50 -07:00
parent 93e76f617b
commit c43776ae36
7 changed files with 9 additions and 8 deletions

View File

@@ -10,7 +10,7 @@ import AppKit
//let keypadEnter: unichar = 3
@objc public protocol KeyboardDelegate: class {
@objc public protocol KeyboardDelegate: AnyObject {
// Return true if handled.
func keydown(_: NSEvent, in view: NSView) -> Bool

View File

@@ -15,7 +15,7 @@ import Foundation
/// When its canceled, it should do its best to stop
/// doing whatever its doing. However, it should not
/// leave data in an inconsistent state.
public protocol MainThreadOperation: class {
public protocol MainThreadOperation: AnyObject {
// These three properties are set by MainThreadOperationQueue. Dont set them.
var isCanceled: Bool { get set } // Check this at appropriate times in case the operation has been canceled.

View File

@@ -8,7 +8,7 @@
import Foundation
public protocol MainThreadOperationDelegate: class {
public protocol MainThreadOperationDelegate: AnyObject {
func operationDidComplete(_ operation: MainThreadOperation)
func cancelOperation(_ operation: MainThreadOperation)
func make(_ childOperation: MainThreadOperation, dependOn parentOperation: MainThreadOperation)

View File

@@ -8,7 +8,7 @@
import Foundation
public protocol UndoableCommand: class {
public protocol UndoableCommand: AnyObject {
var undoActionName: String { get }
var redoActionName: String { get }
@@ -39,7 +39,7 @@ extension UndoableCommand {
// Useful for view controllers.
public protocol UndoableCommandRunner: class {
public protocol UndoableCommandRunner: AnyObject {
var undoableCommands: [UndoableCommand] { get set }
var undoManager: UndoManager? { get }