From f8b21c5cc3bafbc58f30c8db9c0ef935e3cc9408 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 29 Dec 2018 12:31:39 -0800 Subject: [PATCH] Add Debug menu for testing crash report window. --- NetNewsWire/AppDelegate.swift | 9 +++++++++ NetNewsWire/Base.lproj/Main.storyboard | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/NetNewsWire/AppDelegate.swift b/NetNewsWire/AppDelegate.swift index 2def798a2..a273391a1 100644 --- a/NetNewsWire/AppDelegate.swift +++ b/NetNewsWire/AppDelegate.swift @@ -51,6 +51,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, private var keyboardShortcutsWindowController: WebViewWindowController? private var inspectorWindowController: InspectorWindowController? private var logWindowController: LogWindowController? + private var crashReportWindowController: CrashReportWindowController? // For testing only private let log = Log() private let themeLoader = VSThemeLoader() @@ -468,6 +469,14 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserInterfaceValidations, #endif } + @IBAction func debugTestCrashReporterWindow(_ sender: Any?) { + #if DEBUG + crashReportWindowController = CrashReportWindowController(crashLogText: "This is a test crash log.") + crashReportWindowController!.testing = true + crashReportWindowController!.showWindow(self) + #endif + } + @IBAction func gotoToday(_ sender: Any?) { createAndShowMainWindow() diff --git a/NetNewsWire/Base.lproj/Main.storyboard b/NetNewsWire/Base.lproj/Main.storyboard index 42ffb2271..a11a3f019 100644 --- a/NetNewsWire/Base.lproj/Main.storyboard +++ b/NetNewsWire/Base.lproj/Main.storyboard @@ -449,6 +449,12 @@ + + + + + +