diff options
Diffstat (limited to 'Source/SPQueryController.m')
-rw-r--r-- | Source/SPQueryController.m | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m index d34655e7..b6a64636 100644 --- a/Source/SPQueryController.m +++ b/Source/SPQueryController.m @@ -777,7 +777,8 @@ static SPQueryController *sharedQueryController = nil; - (void)dealloc { messagesVisibleSet = nil; - + [NSObject cancelPreviousPerformRequestsWithTarget:self]; + [dateFormatter release], dateFormatter = nil; [messagesFullSet release], messagesFullSet = nil; @@ -941,8 +942,15 @@ static SPQueryController *sharedQueryController = nil; */ - (void)_addMessageToConsole:(NSString *)message connection:(NSString *)connection isError:(BOOL)error { - SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:[[[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByReplacingOccurrencesOfString:@"\n" withString:@" "] stringByAppendingString:@";"] date:[NSDate date] connection:connection]; - + NSString *messageTemp = [[message stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] stringByReplacingOccurrencesOfString:@"\n" withString:@" "]; + + // Only append a semi-colon (;) if the supplied message is not an error + if (!error) { + messageTemp = [messageTemp stringByAppendingString:@";"]; + } + + SPConsoleMessage *consoleMessage = [SPConsoleMessage consoleMessageWithMessage:messageTemp date:[NSDate date] connection:connection]; + [consoleMessage setIsError:error]; [messagesFullSet addObject:consoleMessage]; |