diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPAppController.h | 3 | ||||
-rw-r--r-- | Source/SPAppController.m | 26 |
2 files changed, 29 insertions, 0 deletions
diff --git a/Source/SPAppController.h b/Source/SPAppController.h index 68ba179a..5b5c5554 100644 --- a/Source/SPAppController.h +++ b/Source/SPAppController.h @@ -55,6 +55,9 @@ // Getters - (SPPreferenceController *)preferenceController; +// Feedback controller delegate methods +- (NSMutableDictionary*) anonymizePreferencesForFeedbackReport:(NSMutableDictionary *)preferences; + // Others - (NSString *)contentOfFile:(NSString *)aPath; diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 6ba6175d..9feea4e9 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -82,6 +82,10 @@ */ - (void)applicationDidFinishLaunching:(NSNotification *)notification { + // Set ourselves as the crash reporter delegate + [[FRFeedbackReporter sharedReporter] setDelegate:self]; + + // Report any crashes [[FRFeedbackReporter sharedReporter] reportIfCrash]; } @@ -411,6 +415,28 @@ } #pragma mark - +#pragma mark Feedback reporter delegate methods + +/** + * Anonymises the preferences dictionary before feedback submission + */ +- (NSMutableDictionary*) anonymizePreferencesForFeedbackReport:(NSMutableDictionary *)preferences +{ + [preferences removeObjectsForKeys:[NSArray arrayWithObjects:@"ContentFilters", + @"favorites", + @"lastSqlFileName", + @"NSNavLastRootDirectory", + @"openPath", + @"queryFavorites", + @"queryHistory", + @"tableColumnWidths", + @"savePath", + nil]]; + + return preferences; +} + +#pragma mark - #pragma mark Other methods /** |