diff options
Diffstat (limited to 'indra/newview/llappdelegate-objc.mm')
-rw-r--r-- | indra/newview/llappdelegate-objc.mm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index aebae4c434..8e1ad169c9 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -25,6 +25,9 @@ */ #import "llappdelegate-objc.h" +#if defined(LL_BUGSPLAT) +@import BugsplatMac; +#endif #include "llwindowmacosx-objc.h" #include <Carbon/Carbon.h> // Used for Text Input Services ("Safe" API - it's supported) @@ -64,6 +67,13 @@ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil]; // [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; + +#if defined(LL_BUGSPLAT) + // https://www.bugsplat.com/docs/platforms/os-x#initialization +// [BugsplatStartupManager sharedManager].autoSubmitCrashReport = YES; +// [BugsplatStartupManager sharedManager].askUserDetails = NO; + [[BugsplatStartupManager sharedManager] start]; +#endif } - (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { @@ -179,4 +189,21 @@ return true; } +#if 0 // defined(LL_BUGSPLAT) + +@implementation BugsplatStartupManagerDelegate + +- (BugsplatAttachment *)attachmentForBugsplatStartupManager:(BugsplatStartupManager *)bugsplatStartupManager { + NSURL *fileURL = [[NSBundle mainBundle] URLForResource:@"example" withExtension:@"json"]; + NSData *data = [NSData dataWithContentsOfURL:fileURL]; + + BugsplatAttachment *attachment = + [[BugsplatAttachment alloc] initWithFilename:@"example.json" + attachmentData:data + contentType:@"application/json"]; + return attachment; +} + +#endif // LL_BUGSPLAT + @end |