aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-04 00:38:30 +0000
committerrowanbeentje <rowan@beent.je>2011-03-04 00:38:30 +0000
commit994756398decf77738afb3c599d4cb9238c77cee (patch)
tree6fef724448931d438e553d98096a8f20cbf6751b /Source
parent6f983024a66ddb594eac5e4e808a8c3c51f6b6ff (diff)
downloadsequelpro-994756398decf77738afb3c599d4cb9238c77cee.tar.gz
sequelpro-994756398decf77738afb3c599d4cb9238c77cee.tar.bz2
sequelpro-994756398decf77738afb3c599d4cb9238c77cee.zip
- Fix more compiler warnings
Diffstat (limited to 'Source')
-rw-r--r--Source/DMLocalizedNibBundle.m2
-rw-r--r--Source/GeneratePreviewForURL.m9
-rw-r--r--Source/GenerateThumbnailForURL.m9
-rw-r--r--Source/SPActivityTextFieldCell.m18
-rw-r--r--Source/SPAppController.m2
-rw-r--r--Source/SPBundleCommandTextView.h4
-rw-r--r--Source/SPBundleCommandTextView.m27
-rw-r--r--Source/SPChooseMenuItemDialog.m10
-rw-r--r--Source/SPColorWellCell.m4
-rw-r--r--Source/SPConnectionControllerDelegate.m4
-rw-r--r--Source/SPConstants.m2
-rw-r--r--Source/SPCustomQuery.h5
-rw-r--r--Source/SPCustomQuery.m18
-rw-r--r--Source/SPDatabaseCopy.m3
-rw-r--r--Source/SPDatabaseDocument.m4
-rw-r--r--Source/SPDatabaseRename.m3
-rw-r--r--Source/SPDatabaseViewController.m2
-rw-r--r--Source/SPFavoritesController.m4
-rw-r--r--Source/SPFieldEditorController.h6
-rw-r--r--Source/SPFileManagerAdditions.m2
-rw-r--r--Source/SPFontPreviewTextField.m2
-rw-r--r--Source/SPMainThreadTrampoline.m4
-rw-r--r--Source/SPMenuAdditions.m2
-rw-r--r--Source/SPStringAdditions.m6
-rw-r--r--Source/SPTableContent.h4
-rw-r--r--Source/SPTableInfo.m2
-rw-r--r--Source/SPTablesList.h5
-rw-r--r--Source/SPTablesList.m3
-rw-r--r--Source/SPWindow.m2
29 files changed, 95 insertions, 73 deletions
diff --git a/Source/DMLocalizedNibBundle.m b/Source/DMLocalizedNibBundle.m
index c5d32daa..b9cbec28 100644
--- a/Source/DMLocalizedNibBundle.m
+++ b/Source/DMLocalizedNibBundle.m
@@ -255,4 +255,4 @@ DM_DEFINE_LOCALIZE_BLAH_OF_OBJECT(placeholderString, PlaceholderString)
DM_DEFINE_LOCALIZE_BLAH_OF_OBJECT(toolTip, ToolTip)
DM_DEFINE_LOCALIZE_BLAH_OF_OBJECT(label, Label)
-@end \ No newline at end of file
+@end
diff --git a/Source/GeneratePreviewForURL.m b/Source/GeneratePreviewForURL.m
index 91bd65e6..6c779859 100644
--- a/Source/GeneratePreviewForURL.m
+++ b/Source/GeneratePreviewForURL.m
@@ -30,6 +30,11 @@
#import "SPDataAdditions.h"
#import "SPEditorTokens.h"
+OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize);
+OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options);
+void CancelPreviewGeneration(void* thisInterface, QLPreviewRequestRef preview);
+
+
/* -----------------------------------------------------------------------------
Generate a preview for file
@@ -338,7 +343,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
{
NSNumber *filesize = [fileAttributes objectForKey:NSFileSize];
- NSUInteger kMaxSQLFileSize = (0.7 * 1024 * 1024);
+ NSUInteger kMaxSQLFileSize = (0.7f * 1024 * 1024);
// compose the html and perform syntax highlighting
@@ -489,7 +494,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
props = [[NSMutableDictionary alloc] initWithCapacity:6];
imgProps = [[NSMutableDictionary alloc] initWithCapacity:2];
- [props setObject:[NSNumber numberWithInt:previewHeight] forKey:(NSString *)kQLPreviewPropertyHeightKey];
+ [props setObject:[NSNumber numberWithInteger:previewHeight] forKey:(NSString *)kQLPreviewPropertyHeightKey];
[props setObject:[NSNumber numberWithInt:600] forKey:(NSString *)kQLPreviewPropertyWidthKey];
if(image) {
diff --git a/Source/GenerateThumbnailForURL.m b/Source/GenerateThumbnailForURL.m
index dbc1f42c..8251cb5e 100644
--- a/Source/GenerateThumbnailForURL.m
+++ b/Source/GenerateThumbnailForURL.m
@@ -26,6 +26,9 @@
#include <CoreServices/CoreServices.h>
#include <QuickLook/QuickLook.h>
+void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbnail);
+OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maximumSize);
+
/* -----------------------------------------------------------------------------
Generate a thumbnail for file
@@ -38,7 +41,7 @@ void CancelThumbnailGeneration(void* thisInterface, QLThumbnailRequestRef thumbn
// implement only if supported
}
-OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maxSize)
+OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thumbnail, CFURLRef url, CFStringRef contentTypeUTI, CFDictionaryRef options, CGSize maximumSize)
{
return noErr;
@@ -54,7 +57,7 @@ OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thum
// return noErr;
// }
//
- // NSSize canvasSize = NSMakeSize((NSInteger)(maxSize.height/1.3f), maxSize.height);
+ // NSSize canvasSize = NSMakeSize((NSInteger)(maximumSize.height/1.3f), maximumSize.height);
//
// // Thumbnail will be drawn with maximum resolution for desired thumbnail request
// // Here we create a graphics context to draw the Quick Look Thumbnail in.
@@ -85,4 +88,4 @@ OSStatus GenerateThumbnailForURL(void *thisInterface, QLThumbnailRequestRef thum
// [pool release];
// return noErr;
-} \ No newline at end of file
+}
diff --git a/Source/SPActivityTextFieldCell.m b/Source/SPActivityTextFieldCell.m
index 6e4e142d..10194466 100644
--- a/Source/SPActivityTextFieldCell.m
+++ b/Source/SPActivityTextFieldCell.m
@@ -26,7 +26,7 @@
#import "SPActivityTextFieldCell.h"
#import "SPTableInfo.h"
-#define FAVORITE_NAME_FONT_SIZE 12.0
+#define FAVORITE_NAME_FONT_SIZE 12.0f
@interface SPActivityTextFieldCell (PrivateAPI)
@@ -121,21 +121,21 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
NSAttributedString *mainString = [self attributedStringForFavoriteName];
NSAttributedString *subString = [self constructSubStringAttributedString];
- NSRect subFrame = NSMakeRect(0.0, 0.0, [subString size].width, [subString size].height);
+ NSRect subFrame = NSMakeRect(0.0f, 0.0f, [subString size].width, [subString size].height);
// Total height of both strings with a 2 pixel separation space
- CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0;
+ CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0f;
- cellFrame.origin.y += (cellFrame.size.height - totalHeight) / 2.0;
- cellFrame.origin.x += 10.0; // Indent main string from image
+ cellFrame.origin.y += (cellFrame.size.height - totalHeight) / 2.0f;
+ cellFrame.origin.x += 10.0f; // Indent main string from image
// Position the sub text's frame rect
- subFrame.origin.y = [mainString size].height + cellFrame.origin.y + 1.0;
+ subFrame.origin.y = [mainString size].height + cellFrame.origin.y + 1.0f;
subFrame.origin.x = cellFrame.origin.x;
cellFrame.size.height = totalHeight;
- NSInteger i;
+ NSUInteger i;
CGFloat maxWidth = cellFrame.size.width - 30;
CGFloat mainStringWidth = [mainString size].width;
CGFloat subStringWidth = [subString size].width;
@@ -289,10 +289,10 @@ static inline NSRect SPTextLinkRectFromCellRect(NSRect inRect)
// 15 := indention 10 from image to string plus 5 px padding
CGFloat theWidth = MAX([mainString size].width, [subString size].width) + (([self image] != nil) ? [[self image] size].width : 0) + 15;
- CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0;
+ CGFloat totalHeight = [mainString size].height + [subString size].height + 1.0f;
cellSize.width = theWidth;
- cellSize.height = totalHeight + 13.0;
+ cellSize.height = totalHeight + 13.0f;
return cellSize;
}
diff --git a/Source/SPAppController.m b/Source/SPAppController.m
index 2f77b533..b0daf035 100644
--- a/Source/SPAppController.m
+++ b/Source/SPAppController.m
@@ -695,7 +695,7 @@ YY_BUFFER_STATE yy_scan_string (const char *);
NSString *statusFileName = [NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultStatusPathHeader, anUUID];
NSError *inError = nil;
- NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:inError];
+ NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:&inError];
NSString *result = @"";
NSString *status = @"0";
diff --git a/Source/SPBundleCommandTextView.h b/Source/SPBundleCommandTextView.h
index 119121da..4b16a3fc 100644
--- a/Source/SPBundleCommandTextView.h
+++ b/Source/SPBundleCommandTextView.h
@@ -45,4 +45,8 @@
- (void)commentOut;
- (BOOL)wrapSelectionWithPrefix:(unichar)prefix;
+- (void)dragAlertSheetDidEnd:(NSAlert *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo;
+
+- (void)boundsDidChangeNotification:(NSNotification *)notification;
+
@end
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m
index d9aae0f7..59bebadc 100644
--- a/Source/SPBundleCommandTextView.m
+++ b/Source/SPBundleCommandTextView.m
@@ -35,6 +35,7 @@
[prefs removeObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth];
[prefs release];
[lineNumberView release];
+ [super dealloc];
}
- (void)awakeFromNib
@@ -373,7 +374,7 @@
paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
[paragraphStyle setTabStops:myArrayOfTabs];
// Soft wrapped lines are indented slightly
- [paragraphStyle setHeadIndent:4.0];
+ [paragraphStyle setHeadIndent:4.0f];
NSMutableDictionary *textAttributes = [[[NSMutableDictionary alloc] initWithCapacity:1] autorelease];
[textAttributes setObject:paragraphStyle forKey:NSParagraphStyleAttributeName];
@@ -668,14 +669,14 @@
{
NSUInteger glyphIndex;
NSLayoutManager *layoutManager = [self layoutManager];
- CGFloat fraction;
+ CGFloat partialFraction;
NSRange range;
range = [layoutManager glyphRangeForTextContainer:[self textContainer]];
glyphIndex = [layoutManager glyphIndexForPoint:aPoint
inTextContainer:[self textContainer]
- fractionOfDistanceThroughGlyph:&fraction];
- if( fraction > 0.5 ) glyphIndex++;
+ fractionOfDistanceThroughGlyph:&partialFraction];
+ if( partialFraction > 0.5 ) glyphIndex++;
if( glyphIndex == NSMaxRange(range) )
return [[self textStorage] length];
@@ -697,20 +698,20 @@
// Make usage of the UNIX command "file" to get an info
// about file type and encoding.
- NSTask *task=[[NSTask alloc] init];
- NSPipe *pipe=[[NSPipe alloc] init];
+ NSTask *aTask=[[NSTask alloc] init];
+ NSPipe *aPipe=[[NSPipe alloc] init];
NSFileHandle *handle;
NSString *result;
- [task setLaunchPath:@"/usr/bin/file"];
- [task setArguments:[NSArray arrayWithObjects:aPath, @"-Ib", nil]];
- [task setStandardOutput:pipe];
- handle=[pipe fileHandleForReading];
- [task launch];
+ [aTask setLaunchPath:@"/usr/bin/file"];
+ [aTask setArguments:[NSArray arrayWithObjects:aPath, @"-Ib", nil]];
+ [aTask setStandardOutput:aPipe];
+ handle=[aPipe fileHandleForReading];
+ [aTask launch];
result=[[NSString alloc] initWithData:[handle readDataToEndOfFile]
encoding:NSASCIIStringEncoding];
- [pipe release];
- [task release];
+ [aPipe release];
+ [aTask release];
// UTF16/32 files are detected as application/octet-stream resp. audio/mpeg
if( [result hasPrefix:@"text/plain"]
diff --git a/Source/SPChooseMenuItemDialog.m b/Source/SPChooseMenuItemDialog.m
index 8be639e3..d57abe94 100644
--- a/Source/SPChooseMenuItemDialog.m
+++ b/Source/SPChooseMenuItemDialog.m
@@ -37,7 +37,7 @@
}
- (id)init;
{
- if(self = [super initWithFrame:NSMakeRect(1,1,2,2)])
+ if((self = [super initWithFrame:NSMakeRect(1,1,2,2)]))
{
;
}
@@ -65,8 +65,8 @@
- (id)init;
{
- if(self = [super initWithContentRect:NSMakeRect(1,1,2,2)
- styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO])
+ if((self = [super initWithContentRect:NSMakeRect(1,1,2,2)
+ styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]))
{
waitForChoice = YES;
selectedItemIndex = -1;
@@ -86,7 +86,7 @@
[self setLevel:NSNormalWindowLevel];
[self setHidesOnDeactivate:YES];
[self setHasShadow:YES];
- [self setAlphaValue:0.0];
+ [self setAlphaValue:0.0f];
dummyTextView = [[SPChooseMenuItemDialogTextView alloc] init];
[dummyTextView setDelegate:self];
@@ -138,7 +138,7 @@
context:[NSGraphicsContext currentContext]
eventNumber:0
clickCount:1
- pressure:0.0];
+ pressure:0.0f];
[[NSApplication sharedApplication] sendEvent:theEvent];
diff --git a/Source/SPColorWellCell.m b/Source/SPColorWellCell.m
index ce47ef83..ca466e98 100644
--- a/Source/SPColorWellCell.m
+++ b/Source/SPColorWellCell.m
@@ -29,7 +29,7 @@
- (void) drawWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
{
// Set initial inset from cellFrame
- NSRect rect = NSInsetRect (cellFrame, 0.5, 0.5);
+ NSRect rect = NSInsetRect (cellFrame, 0.5f, 0.5f);
// General inset for colored rect shown inside rect
CGFloat insetFactor = 2.0f;
@@ -38,7 +38,7 @@
[[NSColor darkGrayColor] set];
[NSBezierPath strokeRect: rect];
[[NSColor grayColor] set];
- [NSBezierPath fillRect: NSInsetRect (rect, 1.0, 1.0)];
+ [NSBezierPath fillRect: NSInsetRect (rect, 1.0f, 1.0f)];
// The following rectangle and triangle are needed for displaying color with alpha values
// Draw black rectangle
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 9a7dedbf..ab4b4c27 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -135,11 +135,11 @@
return [[node nodeChildren] count];
}
-- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item
+- (id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)anIndex ofItem:(id)item
{
SPFavoriteNode *node = (item == nil ? favoritesRoot : (SPFavoriteNode *)item);
- return NSArrayObjectAtIndex([node nodeChildren], index);
+ return NSArrayObjectAtIndex([node nodeChildren], anIndex);
}
- (BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item
diff --git a/Source/SPConstants.m b/Source/SPConstants.m
index 7334c796..87600d87 100644
--- a/Source/SPConstants.m
+++ b/Source/SPConstants.m
@@ -26,7 +26,7 @@
#import "SPConstants.h"
// Long running notification time for Growl messages
-const CGFloat SPLongRunningNotificationTime = 3.0;
+const CGFloat SPLongRunningNotificationTime = 3.0f;
// Narrow down completion max rows
const NSUInteger SPNarrowDownCompletionMaxRows = 15;
diff --git a/Source/SPCustomQuery.h b/Source/SPCustomQuery.h
index 317db0c9..26d0a60c 100644
--- a/Source/SPCustomQuery.h
+++ b/Source/SPCustomQuery.h
@@ -63,7 +63,7 @@
IBOutlet NSWindow *queryFavoritesSheet;
IBOutlet NSButton *saveQueryFavoriteButton;
IBOutlet NSTextField *queryFavoriteNameTextField;
- IBOutlet id saveQueryFavoriteGlobal;
+ IBOutlet NSButton *saveQueryFavoriteGlobal;
IBOutlet id queryHistoryButton;
IBOutlet NSMenuItem *queryHistorySearchMenuItem;
@@ -239,6 +239,9 @@
- (void) startDocumentTaskForTab:(NSNotification *)aNotification;
- (void) endDocumentTaskForTab:(NSNotification *)aNotification;
+// Tableview interaction
+- (void)tableSortCallback;
+
// Other
- (void)setConnection:(MCPConnection *)theConnection;
- (void)doPerformQueryService:(NSString *)query;
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 3ee7dc4f..7005e690 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -633,7 +633,7 @@
}
// Record any affected rows
- if ( [mySQLConnection affectedRows] != -1 )
+ if ( [mySQLConnection affectedRows] >= 0 )
totalAffectedRows += [mySQLConnection affectedRows];
else if ( [streamingResult numOfRows] )
totalAffectedRows += [streamingResult numOfRows];
@@ -937,8 +937,8 @@
NSCharacterSet *whitespaceAndNewlineSet = [NSCharacterSet whitespaceAndNewlineCharacterSet];
NSCharacterSet *whitespaceSet = [NSCharacterSet whitespaceCharacterSet];
- // If the supplied position is negative or beyond the end of the string, return nil.
- if (position < 0 || position > [[textView string] length])
+ // If the supplied position is beyond the end of the string, return nil.
+ if (position > [[textView string] length])
return NSMakeRange(NSNotFound, 0);
// Split the current text into ranges of queries
@@ -1054,8 +1054,8 @@
SPSQLParser *customQueryParser;
NSArray *queries;
- // If the supplied position is negative or beyond the end of the string, return nil.
- if (position < 0 || position > [[textView string] length])
+ // If the supplied position beyond the end of the string, return nil.
+ if (position > [[textView string] length])
return NSMakeRange(NSNotFound,0);
// Split the current text into ranges of queries
@@ -1314,7 +1314,7 @@
*/
- (void) initQueryLoadTimer
{
- if (queryLoadTimer) [self clearTableLoadTimer];
+ if (queryLoadTimer) [self clearQueryLoadTimer];
queryLoadInterfaceUpdateInterval = 1;
queryLoadLastRowCount = 0;
queryLoadTimerTicksSinceLastUpdate = 0;
@@ -1750,7 +1750,7 @@
[database backtickQuotedString], [tableForColumn backtickQuotedString]]];
[theResult setReturnDataAsStrings:YES];
if ([theResult numOfRows]) [theResult dataSeek:0];
- NSInteger i;
+ NSUInteger i;
for ( i = 0 ; i < [theResult numOfRows] ; i++ ) {
theRow = [theResult fetchRowAsDictionary];
if ( [[theRow objectForKey:@"Key"] isEqualToString:@"PRI"] ) {
@@ -2056,7 +2056,7 @@
// Remove all quoted strings as a temp string to match the correct clauses
NSRange matchedRange;
- NSInteger i;
+ NSUInteger i;
NSMutableString *tmpString = [NSMutableString stringWithString:queryString];
NSMutableString *qq = [NSMutableString string];
matchedRange = [tmpString rangeOfRegex:@"\"(?:[^\"\\\\]*+|\\\\.)*\""];
@@ -2333,7 +2333,7 @@
isFieldEditable = ([[editStatus objectAtIndex:0] integerValue] == 1) ? YES : NO;
NSString *fieldType = nil;
- NSUInteger *fieldLength = 0;
+ NSUInteger fieldLength = 0;
NSString *fieldEncoding = nil;
BOOL allowNULL = YES;
diff --git a/Source/SPDatabaseCopy.m b/Source/SPDatabaseCopy.m
index 40192156..66b6ba1b 100644
--- a/Source/SPDatabaseCopy.m
+++ b/Source/SPDatabaseCopy.m
@@ -99,6 +99,7 @@
- (void)dealloc
{
[dbInfo release], dbInfo = nil;
+ [super dealloc];
}
-@end \ No newline at end of file
+@end
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index c2974353..4b7ea526 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -4727,7 +4727,7 @@
BOOL isDir;
if([fm fileExistsAtPath:queryFileName isDirectory:&isDir] && !isDir) {
NSError *inError = nil;
- NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:inError];
+ NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:&inError];
[fm removeItemAtPath:queryFileName error:nil];
if(inError == nil && query && [query length]) {
[tableContentInstance filterTable:query];
@@ -4895,7 +4895,7 @@
if([fm fileExistsAtPath:queryFileName isDirectory:&isDir] && !isDir) {
NSError *inError = nil;
- NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:inError];
+ NSString *query = [NSString stringWithContentsOfFile:queryFileName encoding:NSUTF8StringEncoding error:&inError];
[fm removeItemAtPath:queryFileName error:nil];
[fm removeItemAtPath:resultFileName error:nil];
diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m
index 94555ca6..b7aa3f73 100644
--- a/Source/SPDatabaseRename.m
+++ b/Source/SPDatabaseRename.m
@@ -112,6 +112,7 @@
- (void)dealloc
{
[dbInfo release], dbInfo = nil;
+ [super dealloc];
}
-@end \ No newline at end of file
+@end
diff --git a/Source/SPDatabaseViewController.m b/Source/SPDatabaseViewController.m
index f0c5acb7..88928897 100644
--- a/Source/SPDatabaseViewController.m
+++ b/Source/SPDatabaseViewController.m
@@ -529,4 +529,4 @@
[loadPool drain];
}
-@end \ No newline at end of file
+@end
diff --git a/Source/SPFavoritesController.m b/Source/SPFavoritesController.m
index 285cbd90..2c48823d 100644
--- a/Source/SPFavoritesController.m
+++ b/Source/SPFavoritesController.m
@@ -182,9 +182,9 @@ static SPFavoritesController *sharedFavoritesController = nil;
favorites = [[NSDictionary alloc] initWithContentsOfFile:favoritesFile];
}
else {
- NSDictionary *newFavorites = [NSMutableDictionary dictionaryWithObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Favorites", @"favorites label"), SPFavoritesGroupNameKey, [NSArray array], SPFavoriteChildrenKey, nil] forKey:SPFavoritesRootKey];
+ NSMutableDictionary *newFavorites = [NSMutableDictionary dictionaryWithObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:NSLocalizedString(@"Favorites", @"favorites label"), SPFavoritesGroupNameKey, [NSArray array], SPFavoriteChildrenKey, nil] forKey:SPFavoritesRootKey];
- NSError *error = nil;
+ error = nil;
NSString *errorString = nil;
NSData *plistData = [NSPropertyListSerialization dataFromPropertyList:newFavorites
diff --git a/Source/SPFieldEditorController.h b/Source/SPFieldEditorController.h
index 568ba629..b7e499cf 100644
--- a/Source/SPFieldEditorController.h
+++ b/Source/SPFieldEditorController.h
@@ -183,9 +183,9 @@
- (IBAction)setToNull:(id)sender;
- (void)updateBitSheet;
-- (id)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding
- isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)theWindow
- withSender:(id)sender contextInfo:(NSDictionary*)theContextInfo;
+- (void)editWithObject:(id)data fieldName:(NSString*)fieldName usingEncoding:(NSStringEncoding)anEncoding
+ isObjectBlob:(BOOL)isFieldBlob isEditable:(BOOL)isEditable withWindow:(NSWindow *)theWindow
+ sender:(id)sender contextInfo:(NSDictionary*)theContextInfo;
- (void)setTextMaxLength:(NSUInteger)length;
- (void)setFieldType:(NSString*)aType;
diff --git a/Source/SPFileManagerAdditions.m b/Source/SPFileManagerAdditions.m
index 2ea9fb71..22becf92 100644
--- a/Source/SPFileManagerAdditions.m
+++ b/Source/SPFileManagerAdditions.m
@@ -120,7 +120,7 @@ NSString* const DirectoryLocationDomain = @"DirectoryLocationDomain";
if(create) {
// Create the path if it doesn't exist
- NSError *error = nil;
+ error = nil;
BOOL success = [self createDirectoryAtPath:resolvedPath withIntermediateDirectories:YES attributes:nil error:&error];
if (!success) {
if (errorOut) {
diff --git a/Source/SPFontPreviewTextField.m b/Source/SPFontPreviewTextField.m
index 1c4e4b02..90e9f93f 100644
--- a/Source/SPFontPreviewTextField.m
+++ b/Source/SPFontPreviewTextField.m
@@ -35,7 +35,7 @@
_actualFont = [font retain];
- [super setFont:[[NSFontManager sharedFontManager] convertFont:font toSize:11.]];
+ [super setFont:[[NSFontManager sharedFontManager] convertFont:font toSize:11.0f]];
NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString:[_actualFont displayName]];
NSMutableParagraphStyle *paraStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
diff --git a/Source/SPMainThreadTrampoline.m b/Source/SPMainThreadTrampoline.m
index 5f25e174..1277c760 100644
--- a/Source/SPMainThreadTrampoline.m
+++ b/Source/SPMainThreadTrampoline.m
@@ -58,7 +58,7 @@
*/
- (id) initWithObject:(id)theObject
{
- if (self = [super init]) {
+ if ((self = [super init])) {
trampolineObject = theObject;
}
return self;
@@ -149,4 +149,4 @@
return self;
}
-@end \ No newline at end of file
+@end
diff --git a/Source/SPMenuAdditions.m b/Source/SPMenuAdditions.m
index 45bde232..d653f71a 100644
--- a/Source/SPMenuAdditions.m
+++ b/Source/SPMenuAdditions.m
@@ -31,7 +31,7 @@
- (void)compatibleRemoveAllItems
{
if ([self respondsToSelector:@selector(removeAllItems)]) {
- [self removeAllItems];
+ [(id)self removeAllItems];
} else {
while ([self numberOfItems]) [self removeItemAtIndex:0];
}
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m
index 517875f7..a762fe61 100644
--- a/Source/SPStringAdditions.m
+++ b/Source/SPStringAdditions.m
@@ -55,7 +55,7 @@
*/
+ (NSString *)stringForByteSize:(long long)byteSize
{
- CGFloat size = byteSize;
+ double size = byteSize;
NSNumberFormatter *numberFormatter = [[[NSNumberFormatter alloc] init] autorelease];
@@ -64,7 +64,7 @@
if (size < 1023) {
[numberFormatter setFormat:@"#,##0 B"];
- return [numberFormatter stringFromNumber:[NSNumber numberWithInteger:size]];
+ return [numberFormatter stringFromNumber:[NSNumber numberWithDouble:size]];
}
size = (size / 1024);
@@ -422,7 +422,7 @@
return distance;
}
- return 0.0;
+ return 0.0f;
}
/**
diff --git a/Source/SPTableContent.h b/Source/SPTableContent.h
index 0b33146b..4510d9be 100644
--- a/Source/SPTableContent.h
+++ b/Source/SPTableContent.h
@@ -70,9 +70,9 @@
IBOutlet NSButton *filterTableFilterButton;
IBOutlet NSButton *filterTableClearButton;
IBOutlet SPTextView *filterTableWhereClause;
- IBOutlet id filterTableNegateCheckbox;
+ IBOutlet NSButton *filterTableNegateCheckbox;
IBOutlet NSMenuItem *filterTableDistinctMenuItem;
- IBOutlet id filterTableLiveSearchCheckbox;
+ IBOutlet NSButton *filterTableLiveSearchCheckbox;
IBOutlet NSMenuItem *filterTableGearLookAllFields;
IBOutlet NSPanel *filterTableSetDefaultOperatorSheet;
IBOutlet NSComboBox* filterTableSetDefaultOperatorValue;
diff --git a/Source/SPTableInfo.m b/Source/SPTableInfo.m
index af5d4474..6c7c216d 100644
--- a/Source/SPTableInfo.m
+++ b/Source/SPTableInfo.m
@@ -319,7 +319,7 @@
[aTableColumn setDataCell:c];
return NSLocalizedString(@"ACTIVITIES", @"header for activities pane");
}
- else if(!_activitiesWillBeUpdated && rowIndex > 0 && rowIndex < [activities count]) {
+ else if(!_activitiesWillBeUpdated && rowIndex > 0 && rowIndex < (NSInteger)[activities count]) {
NSDictionary *dict = NSArrayObjectAtIndex(activities,rowIndex);
SPActivityTextFieldCell *c = [[[SPActivityTextFieldCell alloc] init] autorelease];
[c setActivityName:[[dict objectForKey:@"contextInfo"] objectForKey:@"name"]];
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h
index 7729ed1d..e82903b2 100644
--- a/Source/SPTablesList.h
+++ b/Source/SPTablesList.h
@@ -55,7 +55,7 @@
IBOutlet id copyTableButton;
IBOutlet id copyTableNameField;
IBOutlet id copyTableMessageField;
- IBOutlet id copyTableContentSwitch;
+ IBOutlet NSButton *copyTableContentSwitch;
IBOutlet id tableSheet;
IBOutlet id tableNameField;
IBOutlet id tableEncodingButton;
@@ -119,6 +119,9 @@
- (IBAction)openTableInNewTab:(id)sender;
- (IBAction)togglePaneCollapse:(id)sender;
+// Alert sheet callbacks
+- (void)sheetDidEnd:(id)sheet returnCode:(NSInteger)returnCode contextInfo:(NSString *)contextInfo;
+
// Additional methods
- (void)setConnection:(MCPConnection *)theConnection;
- (void)doPerformQueryService:(NSString *)query;
diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m
index 73a219dc..cc840e30 100644
--- a/Source/SPTablesList.m
+++ b/Source/SPTablesList.m
@@ -25,6 +25,7 @@
#import "SPTablesList.h"
#import "SPDatabaseDocument.h"
+#import "SPDatabaseViewController.h"
#import "SPTableStructure.h"
#import "SPTableContent.h"
#import "SPTableData.h"
@@ -62,7 +63,7 @@
{
MCPResult *theResult;
NSArray *resultRow;
- NSInteger i;
+ NSUInteger i;
NSString *previousSelectedTable = nil;
NSString *previousFilterString = nil;
BOOL previousTableListIsSelectable = tableListIsSelectable;
diff --git a/Source/SPWindow.m b/Source/SPWindow.m
index f7dab66e..22a096c3 100644
--- a/Source/SPWindow.m
+++ b/Source/SPWindow.m
@@ -62,7 +62,7 @@
context:[NSGraphicsContext currentContext]
eventNumber:0
clickCount:1
- pressure:0.0];
+ pressure:0.0f];
[NSMenu popUpContextMenu:[firstResponder menuForEvent:theEvent] withEvent:anEvent forView:firstResponder];