aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsqlprodev <sqlprodev@northofthree.com>2011-03-01 19:38:23 +0000
committersqlprodev <sqlprodev@northofthree.com>2011-03-01 19:38:23 +0000
commit761a00170b4a511e4dd615a208da1ee93a6b1a1e (patch)
tree57531ed23925153b42f76e3b510a895108ae22ce
parent4ffd7b043ca505e52b7f1c5a463e02534997c197 (diff)
downloadsequelpro-761a00170b4a511e4dd615a208da1ee93a6b1a1e.tar.gz
sequelpro-761a00170b4a511e4dd615a208da1ee93a6b1a1e.tar.bz2
sequelpro-761a00170b4a511e4dd615a208da1ee93a6b1a1e.zip
fixed compiler warnings
-rw-r--r--Source/DMLocalizedNib.m1
-rw-r--r--Source/DMLocalizedNibBundle.m4
-rw-r--r--Source/GeneratePreviewForURL.m3
-rw-r--r--Source/NoodleLineNumberView.m10
-rw-r--r--Source/SPAppleScriptSupport.m2
-rw-r--r--Source/SPBundleHTMLOutputController.m1
-rw-r--r--Source/SPContentFilterManager.m1
-rw-r--r--Source/SPCopyTable.m6
-rw-r--r--Source/SPCustomQuery.m2
-rw-r--r--Source/SPDataImport.m1
-rw-r--r--Source/SPDataStorage.m2
-rw-r--r--Source/SPDatabaseDocument.h4
-rw-r--r--Source/SPDatabaseDocument.m3
-rw-r--r--Source/SPDatabaseRename.m1
-rw-r--r--Source/SPEditorPreferencePane.m16
-rw-r--r--Source/SPExportInitializer.m2
-rw-r--r--Source/SPExporter.m1
-rw-r--r--Source/SPFieldMapperController.m19
-rw-r--r--Source/SPGeometryDataView.m4
-rw-r--r--Source/SPGrowlController.m1
-rw-r--r--Source/SPIndexesController.m4
-rw-r--r--Source/SPNavigatorController.m1
-rw-r--r--Source/SPNotLoaded.m2
-rw-r--r--Source/SPPreferenceController.m2
-rw-r--r--Source/SPSQLExporter.m2
-rw-r--r--Source/SPServerVariablesController.m3
-rw-r--r--Source/SPTableContent.m9
-rw-r--r--Source/SPTableStructure.m2
-rw-r--r--Source/SPTableView.m1
-rw-r--r--Source/SPTextViewAdditions.m3
-rw-r--r--Source/SPTooltip.m7
-rw-r--r--Source/SPUserManager.m4
-rw-r--r--Source/SPWindowController.m4
33 files changed, 74 insertions, 54 deletions
diff --git a/Source/DMLocalizedNib.m b/Source/DMLocalizedNib.m
index 93c37bd5..c675e110 100644
--- a/Source/DMLocalizedNib.m
+++ b/Source/DMLocalizedNib.m
@@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
#import <objc/runtime.h>
-
@interface NSNib (DMLocalizedNib)
- (id)deliciousInitWithNibNamed:(NSString *)nibName bundle:(NSBundle *)bundle;
- (id)deliciousInitWithContentsOfURL:(NSURL *)nibFileURL;
diff --git a/Source/DMLocalizedNibBundle.m b/Source/DMLocalizedNibBundle.m
index f4922be6..c5d32daa 100644
--- a/Source/DMLocalizedNibBundle.m
+++ b/Source/DMLocalizedNibBundle.m
@@ -177,13 +177,13 @@ static NSMutableArray *deliciousBindingKeys = nil;
}
} else if ([view isKindOfClass:[NSTableView class]]) {
- for (NSTableColumn *column in [view tableColumns]) {
+ for (NSTableColumn *column in [(NSTableView*)view tableColumns]) {
[self _localizeStringValueOfObject:[column headerCell] table:table];
}
} else if ([view isKindOfClass:[NSTextField class]]) {
NSDictionary *vb;
- if (vb = [view infoForBinding:@"value"]) {
+ if ((vb = [view infoForBinding:@"value"])) {
NSMutableDictionary *lvb = [NSMutableDictionary dictionaryWithDictionary:[vb objectForKey:NSOptionsKey]];
for (NSString *bindingKey in deliciousBindingKeys) {
if ([lvb objectForKey:bindingKey] == [NSNull null]) continue;
diff --git a/Source/GeneratePreviewForURL.m b/Source/GeneratePreviewForURL.m
index 349837ff..3bc5de43 100644
--- a/Source/GeneratePreviewForURL.m
+++ b/Source/GeneratePreviewForURL.m
@@ -372,7 +372,6 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
truncatedString = [[NSString alloc] initWithString:@"\n ✂ ..."];
}
- NSRange textRange = NSMakeRange(0, [sqlText length]);
NSString *tokenColor;
size_t token;
NSRange tokenRange;
@@ -385,7 +384,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
// now loop through all the tokens
NSUInteger poolCount = 0;
NSAutoreleasePool *loopPool = [[NSAutoreleasePool alloc] init];
- while (token=yylex()){
+ while ((token=yylex())){
skipFontTag = NO;
switch (token) {
case SPT_SINGLE_QUOTED_TEXT:
diff --git a/Source/NoodleLineNumberView.m b/Source/NoodleLineNumberView.m
index 1d44c939..15296c8e 100644
--- a/Source/NoodleLineNumberView.m
+++ b/Source/NoodleLineNumberView.m
@@ -175,8 +175,8 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range);
if ((aView != nil) && [aView isKindOfClass:[NSTextView class]])
{
- layoutManager = [aView layoutManager];
- container = [aView textContainer];
+ layoutManager = [(NSTextView*)aView layoutManager];
+ container = [(NSTextView*)aView textContainer];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(textDidChange:) name:NSTextStorageDidProcessEditingNotification object:[(NSTextView *)aView textStorage]];
[self invalidateLineIndices];
@@ -204,7 +204,7 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range);
- (NSUInteger)lineNumberForLocation:(CGFloat)location
{
- NSUInteger line, count, rectCount, i;
+ NSUInteger line, count, rectCount;
NSRectArray rects;
NSRect visibleRect;
NSRange nullRange;
@@ -252,7 +252,7 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range);
- (NSUInteger)lineNumberForCharacterIndex:(NSUInteger)index
{
NSUInteger left, right, mid, lineStart;
- NSMutableArray *lines;
+ NSArray *lines;
lines = [self lineIndices];
@@ -302,7 +302,7 @@ typedef NSRange (*RangeOfLineIMP)(id object, SEL selector, NSRange range);
NSString *labelText;
NSUInteger rectCount, index, line, count;
NSRectArray rects;
- CGFloat ypos, yinset;
+ CGFloat yinset;
NSSize stringSize;
NSArray *lines;
diff --git a/Source/SPAppleScriptSupport.m b/Source/SPAppleScriptSupport.m
index 49206e0b..44d99352 100644
--- a/Source/SPAppleScriptSupport.m
+++ b/Source/SPAppleScriptSupport.m
@@ -26,6 +26,8 @@
#import "SPAppleScriptSupport.h"
#import "SPWindowController.h"
#import "SPAppController.h"
+#import "SPPrintController.h"
+#import "SPDatabaseDocument.h"
@implementation SPAppController (SPAppleScriptSupport)
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index 370d3eec..6e5ffedd 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -114,7 +114,6 @@
- (void)keyDown:(NSEvent *)theEvent
{
long allFlags = (NSShiftKeyMask|NSControlKeyMask|NSAlternateKeyMask|NSCommandKeyMask);
- NSString *characters = [theEvent characters];
NSString *charactersIgnMod = [theEvent charactersIgnoringModifiers];
long curFlags = ([theEvent modifierFlags] & allFlags);
diff --git a/Source/SPContentFilterManager.m b/Source/SPContentFilterManager.m
index cf71b741..d08bb241 100644
--- a/Source/SPContentFilterManager.m
+++ b/Source/SPContentFilterManager.m
@@ -29,6 +29,7 @@
#import "SPQueryController.h"
#import "SPTableContent.h"
#import "SPConnectionController.h"
+#import <BWToolkitFramework/BWToolkitFramework.h>
#define SP_MULTIPLE_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[multiple selection]", @"[multiple selection]")
#define SP_NO_SELECTION_PLACEHOLDER_STRING NSLocalizedString(@"[no selection]", @"[no selection]")
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index 589cf2b3..d87da60f 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -35,6 +35,8 @@
#import "SPAlertSheets.h"
#import "SPBundleHTMLOutputController.h"
#import "SPGeometryDataView.h"
+#import "SPBundleEditorController.h"
+#import "SPAppController.h"
NSInteger MENU_EDIT_COPY = 2001;
NSInteger MENU_EDIT_COPY_WITH_COLUMN = 2002;
@@ -157,7 +159,6 @@ NSInteger kBlobAsImageFile = 4;
// Loop through the rows, adding their descriptive contents
NSUInteger rowIndex = [selectedRows firstIndex];
NSString *nullString = [prefs objectForKey:SPNullValue];
- NSStringEncoding connectionEncoding = [mySQLConnection encoding];
Class mcpGeometryData = [MCPGeometryData class];
NSUInteger rowCounter = 0;
@@ -296,7 +297,6 @@ NSInteger kBlobAsImageFile = 4;
// Loop through the rows, adding their descriptive contents
NSUInteger rowIndex = [selectedRows firstIndex];
NSString *nullString = [prefs objectForKey:SPNullValue];
- NSStringEncoding connectionEncoding = [mySQLConnection encoding];
Class mcpGeometryData = [MCPGeometryData class];
NSUInteger rowCounter = 0;
@@ -699,7 +699,7 @@ NSInteger kBlobAsImageFile = 4;
NSUInteger allColumnWidths = 0;
// Determine the available size
- NSScrollView *parentScrollView = [[self superview] superview];
+ NSScrollView *parentScrollView = (NSScrollView*)[[self superview] superview];
CGFloat visibleTableWidth = [parentScrollView bounds].size.width - [NSScroller scrollerWidth] - [columnDefinitions count] * 3.5;
for (NSDictionary *columnDefinition in columnDefinitions) {
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index c43df1cd..26625e8b 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -3723,8 +3723,6 @@
shouldBeginEditing = NO;
}
- NSString *fieldType;
-
BOOL isBlob = NO;
// Check if current field is a blob
diff --git a/Source/SPDataImport.m b/Source/SPDataImport.m
index f60fb0f4..0667ac07 100644
--- a/Source/SPDataImport.m
+++ b/Source/SPDataImport.m
@@ -39,6 +39,7 @@
#import "SPFileHandle.h"
#import "SPEncodingPopupAccessory.h"
+#import <MCPKit/MCPKit.h>
#import <UniversalDetector/UniversalDetector.h>
#define SP_FILE_READ_ERROR_STRING NSLocalizedString(@"File read error", @"File read error title (Import Dialog)")
diff --git a/Source/SPDataStorage.m b/Source/SPDataStorage.m
index f03fbd7a..26bcc79e 100644
--- a/Source/SPDataStorage.m
+++ b/Source/SPDataStorage.m
@@ -379,7 +379,7 @@ static inline void SPDataStorageEnsureCapacityForAdditionalRowCount(SPDataStorag
#pragma mark -
- (id) init {
- if (self = [super init]) {
+ if ((self = [super init])) {
numColumns = 0;
columnPointerByteSize = 0;
numRows = 0;
diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h
index 3459b9b8..8123bec3 100644
--- a/Source/SPDatabaseDocument.h
+++ b/Source/SPDatabaseDocument.h
@@ -35,7 +35,7 @@
SPWindowController,
SPServerSupport;
-@protocol SPConnectionControllerDelegateProtocol;
+#import "SPConnectionControllerDelegateProtocol.h"
/**
* The SPDatabaseDocument class controls the primary database view window.
@@ -321,6 +321,8 @@
- (NSString *)connectionID;
- (NSString *)tabTitleForTooltip;
- (BOOL)isSaveInBundle;
+- (NSURL *)fileURL;
+- (NSString *)displayName;
// Notification center methods
- (void)willPerformQuery:(NSNotification *)notification;
diff --git a/Source/SPDatabaseDocument.m b/Source/SPDatabaseDocument.m
index 49f50860..93db6810 100644
--- a/Source/SPDatabaseDocument.m
+++ b/Source/SPDatabaseDocument.m
@@ -57,6 +57,8 @@
#import "SPServerSupport.h"
#import "SPTooltip.h"
#import "SPDatabaseViewController.h"
+#import "SPBundleHTMLOutputController.h"
+#import "SPConnectionDelegate.h"
@interface SPDatabaseDocument (PrivateAPI)
@@ -4741,7 +4743,6 @@
NSString *statusFileName = [NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultStatusPathHeader, docProcessID];
NSFileManager *fm = [NSFileManager defaultManager];
NSString *status = @"0";
- BOOL isDir;
BOOL userTerminated = NO;
BOOL doSyntaxHighlighting = NO;
BOOL doSyntaxHighlightingViaCSS = NO;
diff --git a/Source/SPDatabaseRename.m b/Source/SPDatabaseRename.m
index dc5a8967..94555ca6 100644
--- a/Source/SPDatabaseRename.m
+++ b/Source/SPDatabaseRename.m
@@ -25,6 +25,7 @@
#import "SPDBActionCommons.h"
#import "SPDatabaseRename.h"
#import "SPTableCopy.h"
+#import "SPDatabaseInfo.h"
@implementation SPDatabaseRename
diff --git a/Source/SPEditorPreferencePane.m b/Source/SPEditorPreferencePane.m
index 561817db..05c1d791 100644
--- a/Source/SPEditorPreferencePane.m
+++ b/Source/SPEditorPreferencePane.m
@@ -30,14 +30,14 @@
#import "SPCategoryAdditions.h"
// Constants
-static const NSString *SPImportColorScheme = @"ImportColorScheme";
-static const NSString *SPExportColorScheme = @"ExportColorScheme";
-static const NSString *SPSaveColorScheme = @"SaveColorScheme";
-static const NSString *SPDefaultColorSchemeName = @"Default";
-static const NSString *SPDefaultColorSchemeNameLC = @"default";
-static const NSString *SPCustomColorSchemeName = @"User-defined";
-static const NSString *SPCustomColorSchemeNameLC = @"user-defined";
-static const NSString *SPDefaultExportColourSchemeName = @"MyTheme";
+static NSString *SPImportColorScheme = @"ImportColorScheme";
+static NSString *SPExportColorScheme = @"ExportColorScheme";
+static NSString *SPSaveColorScheme = @"SaveColorScheme";
+static NSString *SPDefaultColorSchemeName = @"Default";
+static NSString *SPDefaultColorSchemeNameLC = @"default";
+static NSString *SPCustomColorSchemeName = @"User-defined";
+static NSString *SPCustomColorSchemeNameLC = @"user-defined";
+static NSString *SPDefaultExportColourSchemeName = @"MyTheme";
@interface SPEditorPreferencePane (PrivateAPI)
diff --git a/Source/SPExportInitializer.m b/Source/SPExportInitializer.m
index 3bd90991..ed60846f 100644
--- a/Source/SPExportInitializer.m
+++ b/Source/SPExportInitializer.m
@@ -40,6 +40,8 @@
#import "SPDotExporter.h"
#import "SPConnectionControllerDelegateProtocol.h"
#import "SPExportFile.h"
+#import "SPExportFileUtilities.h"
+#import "SPExportFilenameUtilities.h"
@implementation SPExportController (SPExportInitializer)
diff --git a/Source/SPExporter.m b/Source/SPExporter.m
index e0e862fa..3be120b0 100644
--- a/Source/SPExporter.m
+++ b/Source/SPExporter.m
@@ -24,6 +24,7 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPExporter.h"
+#import "SPExportFile.h"
@implementation SPExporter
diff --git a/Source/SPFieldMapperController.m b/Source/SPFieldMapperController.m
index b77ca98e..7079cc13 100644
--- a/Source/SPFieldMapperController.m
+++ b/Source/SPFieldMapperController.m
@@ -30,17 +30,18 @@
#import "SPTableView.h"
#import "SPCategoryAdditions.h"
#import "RegexKitLite.h"
+#import "SPDatabaseData.h"
#define SP_NUMBER_OF_RECORDS_STRING NSLocalizedString(@"%ld of %@%lu records", @"Label showing the index of the selected CSV row")
// Constants
-static const NSString *SPTableViewImportValueColumnID = @"import_value";
-static const NSString *SPTableViewTypeColumnID = @"type";
-static const NSString *SPTableViewTargetFieldColumnID = @"target_field";
-static const NSString *SPTableViewOperatorColumnID = @"operator";
-static const NSString *SPTableViewValueIndexColumnID = @"value_index";
-static const NSString *SPTableViewGlobalValueColumnID = @"global_value";
-static const NSString *SPTableViewSqlColumnID = @"sql";
+static NSString *SPTableViewImportValueColumnID = @"import_value";
+static NSString *SPTableViewTypeColumnID = @"type";
+static NSString *SPTableViewTargetFieldColumnID = @"target_field";
+static NSString *SPTableViewOperatorColumnID = @"operator";
+static NSString *SPTableViewValueIndexColumnID = @"value_index";
+static NSString *SPTableViewGlobalValueColumnID = @"global_value";
+static NSString *SPTableViewSqlColumnID = @"sql";
@implementation SPFieldMapperController
@@ -55,7 +56,7 @@ static const NSString *SPTableViewSqlColumnID = @"sql";
*/
- (id)initWithDelegate:(id)managerDelegate
{
- if (self = [super initWithWindowNibName:@"DataMigrationDialog"]) {
+ if ((self = [super initWithWindowNibName:@"DataMigrationDialog"])) {
fieldMappingCurrentRow = 0;
if(managerDelegate == nil) {
@@ -1388,8 +1389,6 @@ static const NSString *SPTableViewSqlColumnID = @"sql";
NSInteger i,j;
NSMutableArray *distMatrix = [NSMutableArray array];
for(i=0; i < [tableHeaderNames count]; i++) {
- CGFloat minDist = 1e6;
- NSInteger minIndex = 0;
CGFloat dist = 1e6;
for(j=0; j < [fileHeaderNames count]; j++) {
id fileHeaderName = NSArrayObjectAtIndex(fileHeaderNames,j);
diff --git a/Source/SPGeometryDataView.m b/Source/SPGeometryDataView.m
index 10cf5b4a..d68bb57b 100644
--- a/Source/SPGeometryDataView.m
+++ b/Source/SPGeometryDataView.m
@@ -79,9 +79,8 @@
x_min*=zoom_factor;
y_min*=zoom_factor;
- if ( self = [super initWithFrame:NSMakeRect(0,0,width+margin_offset*2,height+margin_offset*2)] )
+ if ( (self = [super initWithFrame:NSMakeRect(0,0,width+margin_offset*2,height+margin_offset*2)]) )
{
- ;
}
lineColor = [NSColor blackColor];
@@ -263,7 +262,6 @@
{
if(!type || ![type length] || !coordinates || ![coordinates count]) return nil;
- NSSize mySize = self.bounds.size;
NSRect myBounds = [self bounds];
return [self dataWithPDFInsideRect:myBounds];
diff --git a/Source/SPGrowlController.m b/Source/SPGrowlController.m
index 71f93053..4b256de0 100644
--- a/Source/SPGrowlController.m
+++ b/Source/SPGrowlController.m
@@ -24,6 +24,7 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPGrowlController.h"
+#import "SPDatabaseDocument.h"
#include <mach/mach_time.h>
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m
index 49ac8594..f1cce967 100644
--- a/Source/SPIndexesController.m
+++ b/Source/SPIndexesController.m
@@ -26,6 +26,10 @@
#import "SPIndexesController.h"
#import "SPAlertSheets.h"
#import "SPServerSupport.h"
+#import "SPTableContent.h"
+#import "SPTableData.h"
+#import <MCPKit/MCPKit.h>
+#import "SPDatabaseDocument.h"
// Constants
static const NSString *SPNewIndexIndexName = @"IndexName";
diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m
index aeb5af8c..a5d9f0b1 100644
--- a/Source/SPNavigatorController.m
+++ b/Source/SPNavigatorController.m
@@ -30,6 +30,7 @@
#import "SPTablesList.h"
#import "SPLogger.h"
#import "SPTooltip.h"
+#import "SPAppController.h"
#import <objc/runtime.h>
diff --git a/Source/SPNotLoaded.m b/Source/SPNotLoaded.m
index 9ce0fec2..4e2925a7 100644
--- a/Source/SPNotLoaded.m
+++ b/Source/SPNotLoaded.m
@@ -52,7 +52,7 @@ static SPNotLoaded *notLoaded = nil;
Class notLoadedClass = [self class];
@synchronized(notLoadedClass) {
if (notLoaded == nil) {
- if (self = [super init]) {
+ if ((self = [super init])) {
notLoaded = self;
}
}
diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m
index 8a9eb530..affcea80 100644
--- a/Source/SPPreferenceController.m
+++ b/Source/SPPreferenceController.m
@@ -25,6 +25,8 @@
#import "SPPreferenceController.h"
#import "SPPreferencesUpgrade.h"
+#import "SPTablesPreferencePane.h"
+#import "SPEditorPreferencePane.h"
@interface SPPreferenceController (PrivateAPI)
diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m
index d999cc2b..f6760468 100644
--- a/Source/SPSQLExporter.m
+++ b/Source/SPSQLExporter.m
@@ -95,7 +95,7 @@
SPTableType tableType = SPTableTypeTable;
id createTableSyntax = nil;
- NSUInteger i, j, k, t, s, rowCount, queryLength, lastProgressValue;
+ NSUInteger j, k, t, s, rowCount, queryLength, lastProgressValue;
BOOL sqlOutputIncludeStructure;
BOOL sqlOutputIncludeContent;
diff --git a/Source/SPServerVariablesController.m b/Source/SPServerVariablesController.m
index e0796454..dedda57b 100644
--- a/Source/SPServerVariablesController.m
+++ b/Source/SPServerVariablesController.m
@@ -25,6 +25,7 @@
#import "SPServerVariablesController.h"
#import "SPDatabaseDocument.h"
+#import "SPAppController.h"
@interface SPServerVariablesController (PrivateAPI)
@@ -166,7 +167,7 @@
{
if (returnCode == NSOKButton) {
if ([variablesFiltered count] > 0) {
- NSMutableString *variablesString = [NSMutableString stringWithFormat:@"# MySQL server variables for %@\n\n", [[[NSApp delegate] frontDocument] host]];
+ NSMutableString *variablesString = [NSMutableString stringWithFormat:@"# MySQL server variables for %@\n\n", [[(SPAppController*)[NSApp delegate] frontDocument] host]];
for (NSDictionary *variable in variablesFiltered)
{
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 8ff7efc4..33d13ca4 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -45,6 +45,13 @@
#import "SPAlertSheets.h"
#import "SPHistoryController.h"
#import "SPGeometryDataView.h"
+#import "SPTextView.h"
+#import "SPDatabaseViewController.h"
+#import "SPAppController.h"
+
+@interface SPTableContent (Private)
+- (BOOL)cancelRowEditing;
+@end
@implementation SPTableContent
@@ -826,7 +833,7 @@
// Loop through the result rows as they become available
tableRowsCount = 0;
- while (tempRow = [theResult fetchNextRowAsArray]) {
+ while ((tempRow = [theResult fetchNextRowAsArray])) {
pthread_mutex_lock(&tableValuesLock);
if (tableRowsCount < previousTableRowsCount) {
diff --git a/Source/SPTableStructure.m b/Source/SPTableStructure.m
index 006c2f98..ebcb2bc6 100644
--- a/Source/SPTableStructure.m
+++ b/Source/SPTableStructure.m
@@ -251,7 +251,6 @@
// Set up the encoding PopUpButtonCell
NSArray *encodings = [databaseDataInstance getDatabaseCharacterSetEncodings];
if ([encodings count]) {
- NSString *selectedTitle = @"";
[encodingPopupCell removeAllItems];
[encodingPopupCell addItemWithTitle:@""];
@@ -873,7 +872,6 @@
if (alertSheetOpened) return NO;
- NSInteger code;
NSMutableString *queryString;
BOOL fieldDefIncludesLen = NO;
diff --git a/Source/SPTableView.m b/Source/SPTableView.m
index fd9c09d0..d574420d 100644
--- a/Source/SPTableView.m
+++ b/Source/SPTableView.m
@@ -25,6 +25,7 @@
#import "SPTableView.h"
#import "SPQueryFavoriteManager.h"
#import "SPDatabaseDocument.h"
+#import "SPWindowController.h"
@implementation SPTableView
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 9cefa758..e3f8b714 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -26,6 +26,7 @@
#import "SPTooltip.h"
#import "SPBundleHTMLOutputController.h"
#import "SPCustomQuery.h"
+#import "SPAppController.h"
@implementation NSTextView (SPTextViewAdditions)
@@ -635,7 +636,7 @@
NSString *output = [cmd runBashCommandWithEnvironment:env
atCurrentDirectoryPath:nil
- callerInstance:[[NSApp delegate] frontDocument]
+ callerInstance:[(SPAppController*)[NSApp delegate] frontDocument]
contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
([cmdData objectForKey:SPBundleFileNameKey])?:@"-", @"name",
NSLocalizedString(@"Input Field", @"input field menu item label"), @"scope",
diff --git a/Source/SPTooltip.m b/Source/SPTooltip.m
index b0344d52..5a0a2a2e 100644
--- a/Source/SPTooltip.m
+++ b/Source/SPTooltip.m
@@ -229,10 +229,9 @@ static CGFloat slow_in_out (CGFloat t)
- (id)init;
{
- if(self = [self initWithContentRect:NSMakeRect(1,1,1,1)
- styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO])
+ if((self = [self initWithContentRect:NSMakeRect(1,1,1,1)
+ styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]))
{
- ;
}
return self;
}
@@ -393,7 +392,7 @@ static CGFloat slow_in_out (CGFloat t)
[keyWindow setAcceptsMouseMovedEvents:YES];
NSEvent* event = nil;
NSInteger eventType;
- while(event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES])
+ while((event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantFuture] inMode:NSDefaultRunLoopMode dequeue:YES]))
{
eventType = [event type];
if(eventType == NSKeyDown || eventType == NSLeftMouseDown || eventType == NSRightMouseDown || eventType == NSOtherMouseDown || eventType == NSScrollWheel)
diff --git a/Source/SPUserManager.m b/Source/SPUserManager.m
index 9118d8a9..5a673389 100644
--- a/Source/SPUserManager.m
+++ b/Source/SPUserManager.m
@@ -173,7 +173,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
}
if (result && [result numOfRows]) {
- while (privRow = [result fetchRowAsArray])
+ while ((privRow = [result fetchRowAsArray]))
{
privKey = [NSMutableString stringWithString:[[privRow objectAtIndex:0] lowercaseString]];
@@ -192,7 +192,7 @@ static const NSString *SPTableViewNameColumnID = @"NameColumn";
[result setReturnDataAsStrings:YES];
- while (privRow = [result fetchRowAsArray])
+ while ((privRow = [result fetchRowAsArray]))
{
privKey = [NSMutableString stringWithString:[privRow objectAtIndex:0]];
diff --git a/Source/SPWindowController.m b/Source/SPWindowController.m
index b22248fe..7fdb76e6 100644
--- a/Source/SPWindowController.m
+++ b/Source/SPWindowController.m
@@ -25,6 +25,8 @@
#import "SPWindowController.h"
#import "SPDatabaseDocument.h"
#import "PSMTabDragAssistant.h"
+#import "SPDatabaseViewController.h"
+#import "SPAppController.h"
#import <PSMTabBar/PSMTabBarControl.h>
#import <PSMTabBar/PSMTabStyle.h>
@@ -160,7 +162,7 @@
{
// Return if the selected tab shouldn't be closed
- if (![selectedTableDocument parentTabShouldClose]) return NO;
+ if (![selectedTableDocument parentTabShouldClose]) return;
// If there are multiple tabs, close the front tab.
if ([tabView numberOfTabViewItems] > 1) {