Revision | 5755e6f0c5b4647d89477a15ce9b8898b5869c62 (tree) |
---|---|
Zeit | 2018-04-18 22:33:19 |
Autor | masakih <masakih@user...> |
Commiter | masakih |
swift4.3に更新
@@ -169,11 +169,11 @@ | ||
169 | 169 | TargetAttributes = { |
170 | 170 | F4EF18AE1B4D36E60021BF8D = { |
171 | 171 | CreatedOnToolsVersion = 6.4; |
172 | - LastSwiftMigration = 0810; | |
172 | + LastSwiftMigration = 0930; | |
173 | 173 | }; |
174 | 174 | F4EF18BE1B4D36E60021BF8D = { |
175 | 175 | CreatedOnToolsVersion = 6.4; |
176 | - LastSwiftMigration = 0810; | |
176 | + LastSwiftMigration = 0930; | |
177 | 177 | TestTargetID = F4EF18AE1B4D36E60021BF8D; |
178 | 178 | }; |
179 | 179 | }; |
@@ -389,7 +389,8 @@ | ||
389 | 389 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; |
390 | 390 | PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; |
391 | 391 | PRODUCT_NAME = "$(TARGET_NAME)"; |
392 | - SWIFT_VERSION = 3.0; | |
392 | + SWIFT_SWIFT3_OBJC_INFERENCE = On; | |
393 | + SWIFT_VERSION = 4.0; | |
393 | 394 | }; |
394 | 395 | name = Debug; |
395 | 396 | }; |
@@ -402,7 +403,8 @@ | ||
402 | 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; |
403 | 404 | PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; |
404 | 405 | PRODUCT_NAME = "$(TARGET_NAME)"; |
405 | - SWIFT_VERSION = 3.0; | |
406 | + SWIFT_SWIFT3_OBJC_INFERENCE = On; | |
407 | + SWIFT_VERSION = 4.0; | |
406 | 408 | }; |
407 | 409 | name = Release; |
408 | 410 | }; |
@@ -423,7 +425,8 @@ | ||
423 | 425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; |
424 | 426 | PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; |
425 | 427 | PRODUCT_NAME = "$(TARGET_NAME)"; |
426 | - SWIFT_VERSION = 3.0; | |
428 | + SWIFT_SWIFT3_OBJC_INFERENCE = On; | |
429 | + SWIFT_VERSION = 4.0; | |
427 | 430 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KanColleBrowserForOSX.app/Contents/MacOS/KanColleBrowserForOSX"; |
428 | 431 | }; |
429 | 432 | name = Debug; |
@@ -441,7 +444,8 @@ | ||
441 | 444 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; |
442 | 445 | PRODUCT_BUNDLE_IDENTIFIER = "com.masakih.$(PRODUCT_NAME:rfc1034identifier)"; |
443 | 446 | PRODUCT_NAME = "$(TARGET_NAME)"; |
444 | - SWIFT_VERSION = 3.0; | |
447 | + SWIFT_SWIFT3_OBJC_INFERENCE = On; | |
448 | + SWIFT_VERSION = 4.0; | |
445 | 449 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KanColleBrowserForOSX.app/Contents/MacOS/KanColleBrowserForOSX"; |
446 | 450 | }; |
447 | 451 | name = Release; |
@@ -20,7 +20,7 @@ class KCBFOMainWindowController: NSWindowController { | ||
20 | 20 | |
21 | 21 | class func makeInstance() -> KCBFOMainWindowController { |
22 | 22 | |
23 | - return KCBFOMainWindowController(windowNibName: "KCBFOMainWindowController") | |
23 | + return KCBFOMainWindowController(windowNibName: NSNib.Name(rawValue: "KCBFOMainWindowController")) | |
24 | 24 | } |
25 | 25 | |
26 | 26 |
@@ -73,6 +73,7 @@ class KCBFOMainWindowController: NSWindowController { | ||
73 | 73 | |
74 | 74 | return |
75 | 75 | } |
76 | + | |
76 | 77 | // ゲームページでない場合はゲームページを表示する |
77 | 78 | if let url = webView?.url, url.absoluteString != gamePageURL { |
78 | 79 |
@@ -109,7 +110,7 @@ class KCBFOMainWindowController: NSWindowController { | ||
109 | 110 | |
110 | 111 | func webView(_ sender: WebView!, contextMenuItemsForElement element: [AnyHashable: Any]!, defaultMenuItems: [AnyObject]!) -> [Any]! { |
111 | 112 | |
112 | - return defaultMenuItems.flatMap() { | |
113 | + return defaultMenuItems.compactMap { | |
113 | 114 | |
114 | 115 | if ignoreTags.contains($0.tag) { |
115 | 116 |