diff options
author | rowanbeentje <rowan@beent.je> | 2013-05-21 22:53:10 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2013-05-21 22:53:10 +0000 |
commit | 2737ac00c38513d976fda08104a5014221b0c99c (patch) | |
tree | 38829f7d5d9982b9648259cae0a269ef1640dd18 /Source/SPCustomQuery.m | |
parent | 9432986de1d25527b133715ab12a8dffc2c5f6b6 (diff) | |
download | sequelpro-2737ac00c38513d976fda08104a5014221b0c99c.tar.gz sequelpro-2737ac00c38513d976fda08104a5014221b0c99c.tar.bz2 sequelpro-2737ac00c38513d976fda08104a5014221b0c99c.zip |
- Fix all the Xcode 4.6.2 build warnings, and tweak warning settings to enable some more
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r-- | Source/SPCustomQuery.m | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index d2788cd9..686e700b 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1663,11 +1663,10 @@ // Update font size on the table #ifndef SP_CODA NSFont *tableFont = [NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPGlobalResultTableFont]]; - [customQueryView setRowHeight:2.0f+NSSizeToCGSize([[NSString stringWithString:@"{ǞṶḹÜ∑zgyf"] sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height]; #else NSFont *tableFont = [NSFont systemFontOfSize:[NSFont smallSystemFontSize]]; - [customQueryView setRowHeight:2.0f+NSSizeToCGSize([@"{ǞṶḹÜ∑zgyf" sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height]; #endif + [customQueryView setRowHeight:2.0f+NSSizeToCGSize([@"{ǞṶḹÜ∑zgyf" sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height]; // If there are no table columns to add, return if (!cqColumnDefinition || ![cqColumnDefinition count]) return; @@ -3167,7 +3166,7 @@ // Handle "see [...]" and "in [...]"-style 5.x links. //look-behind won't work here because of the \s+ - [desc replaceOccurrencesOfRegex:@"(See|see|In|in|and)\\s+\\[(?:HELP\\s+)?([^\\]]*?)\\]" withString:[NSString stringWithFormat:@"$1 $2",[SPCustomQuery linkToHelpTopic:@"$2"]]]; + [desc replaceOccurrencesOfRegex:@"(See|see|In|in|and)\\s+\\[(?:HELP\\s+)?([^\\]]*?)\\]" withString:[NSString stringWithFormat:@"$1 %@",[SPCustomQuery linkToHelpTopic:@"$2"]]]; [theHelp appendFormat:@"<pre class='description'>%@</pre>", desc]; } @@ -3184,7 +3183,7 @@ if(![searchString isEqualToString:SP_HELP_TOC_SEARCH_STRING]) [theHelp appendFormat:@"<br><i>%@</i><br>", [NSString stringWithFormat:NSLocalizedString(@"Help topics for “%@”", @"MySQL Help Viewer : Results list : Page title"), searchString]]; else - [theHelp appendFormat:@"<br><b>%@:</b><br>", NSLocalizedString(@"MySQL Help – Categories", @"mysql help categories"), searchString]; + [theHelp appendFormat:@"<br><b>%@:</b><br>", NSLocalizedString(@"MySQL Help – Categories", @"mysql help categories")]; // iterate through all found rows and print them as HTML ul/li list [theHelp appendString:@"<ul>"]; @@ -3535,7 +3534,7 @@ else if ([keyPath isEqualToString:SPGlobalResultTableFont]) { NSFont *tableFont = [NSUnarchiver unarchiveObjectWithData:[change objectForKey:NSKeyValueChangeNewKey]]; #ifndef SP_CODA - [customQueryView setRowHeight:2.0f+NSSizeToCGSize([[NSString stringWithString:@"{ǞṶḹÜ∑zgyf"] sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height]; + [customQueryView setRowHeight:2.0f+NSSizeToCGSize([@"{ǞṶḹÜ∑zgyf" sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height]; #else [customQueryView setRowHeight:2.0f+NSSizeToCGSize([@"{ǞṶḹÜ∑zgyf" sizeWithAttributes:[NSDictionary dictionaryWithObject:tableFont forKey:NSFontAttributeName]]).height]; #endif @@ -3723,11 +3722,7 @@ { if ((self = [super init])) { -#ifndef SP_CODA - usedQuery = [[NSString stringWithString:@""] retain]; -#else usedQuery = [@"" retain]; -#endif lastExecutedQuery = nil; fieldIDQueryString = nil; sortField = nil; @@ -3923,11 +3918,7 @@ if([control isKindOfClass:[SPCopyTable class]]) { // Check firstly if SPCopyTable can handle command -#ifndef SP_CODA - if([customQueryView control:control textView:aTextView doCommandBySelector:(SEL)command]) -#else if([customQueryView control:control textView:aTextView doCommandBySelector:command]) -#endif return YES; // Trap the escape key |