Skip to content

Commit 865fd0c

Browse files
Dave AbrahamsDave Abrahams
authored andcommitted
Moving [Custom]PlaygroundQuickLook[able]=>PlaygroundSupport
All the quicklook stuff belongs there.
1 parent 888d1f1 commit 865fd0c

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

PlaygroundLogger/PlaygroundLogger/Common.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protocol Serializable {
2121
}
2222

2323
typealias ChildrenRange = CountableRange<UInt64>
24-
typealias QuickLookObject = Swift.PlaygroundQuickLook
24+
typealias QuickLookObject = Swift._PlaygroundQuickLook
2525

2626
// given a disparate array of ranges, return a possibly smaller such array such that
2727
// no two ranges overlap and ranges are sorted by their startIndex

PlaygroundLogger/PlaygroundLogger/LoggerMirror.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class LoggerMirror {
2020
private var superclassMirror: (Bool, LoggerMirror?)
2121
private var typeNameData: String?
2222
private var displayTypeNameData: String?
23-
private var quickLookData: PlaygroundQuickLook?? = nil
23+
private var quickLookData: _PlaygroundQuickLook?? = nil
2424

2525
private static let Swift_Stdlib_Regex = Regex(pattern: "(?<!\\.)\\b(Swift\\.)")
2626

@@ -127,13 +127,13 @@ final class LoggerMirror {
127127
else { return .`struct` }
128128
}
129129

130-
var quickLookObject: PlaygroundQuickLook? {
130+
var quickLookObject: _PlaygroundQuickLook? {
131131
if let prefetched = quickLookData {
132132
return prefetched
133133
}
134134
guard let obj = object else { return nil }
135135
quickLookData = nil
136-
let cpql = PlaygroundQuickLook(reflecting: obj)
136+
let cpql = _PlaygroundQuickLook(reflecting: obj)
137137
switch cpql {
138138
case .text( _):
139139
if (obj as? CustomPlaygroundQuickLookable) != nil {

PlaygroundLogger/PlaygroundLogger/TestCases.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -608,9 +608,9 @@ class EnumSummaryTestCase_NotGeneric : TestCase {
608608
// NSColor.blueColor().set()
609609
// NSBezierPath(rect: rect).fill()
610610
// }
611-
// func customPlaygroundQuickLook() -> PlaygroundQuickLook {
611+
// func customPlaygroundQuickLook() -> _PlaygroundQuickLook {
612612
// let hv = HelperView(frame: CGRect(x: 0, y: 0, width: 50, height: 50))
613-
// return PlaygroundQuickLook.View(hv)
613+
// return _PlaygroundQuickLook.View(hv)
614614
// }
615615
// }
616616
//
@@ -648,18 +648,18 @@ class PrintHookTestCase : TestCase {
648648
}
649649
}
650650

651-
class PlaygroundQuickLookCalledOnceTestCase : TestCase {
651+
class _PlaygroundQuickLookCalledOnceTestCase : TestCase {
652652
required init?() {}
653653
var name: String { return "PlaygroundQuickLookCalledOnce" }
654654
var explanation: String { return "Check that the logger only calls customPlaygroundQuickLook() one time per log operation" }
655655
var behavior: TestBehavior { return .ExpectedSuccess }
656656
func doTest() {
657657
class MyObject : CustomPlaygroundQuickLookable {
658658
var numCalls = 0
659-
var customPlaygroundQuickLook: PlaygroundQuickLook {
659+
var customPlaygroundQuickLook: _PlaygroundQuickLook {
660660
get {
661661
numCalls = numCalls + 1
662-
return PlaygroundQuickLook(reflecting: "Hello world")
662+
return _PlaygroundQuickLook(reflecting: "Hello world")
663663
}
664664
}
665665
}

0 commit comments

Comments
 (0)