aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.m10
-rw-r--r--Source/SPCopyTable.m1
-rw-r--r--Source/SPExporter.m1
-rw-r--r--Source/SPProcessListController.m4
-rw-r--r--Source/SPQueryController.m2
-rw-r--r--Source/SPTableStructureDelegate.m4
-rw-r--r--Source/SPTableTextFieldCell.m2
-rw-r--r--Source/SPTableTriggers.m16
8 files changed, 22 insertions, 18 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 286960bc..66627132 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -36,6 +36,8 @@
#import "SPTableTextFieldCell.h"
#import "SPGeneralPreferencePane.h"
#import "SPDatabaseViewController.h"
+#import "SPPreferenceController.h"
+#import "SPFavoritesPreferencePane.h"
@interface SPConnectionController (PrivateAPI)
@@ -144,9 +146,9 @@
[favoritesTable setDraggingSourceOperationMask:NSDragOperationMove forLocal:YES];
// Sort the favourites to match prefs and select the appropriate row - if a valid sort option is selected
- if (currentSortItem > -1) [self _sortFavorites];
+ if ((NSInteger)currentSortItem > -1) [self _sortFavorites];
- NSInteger tableRow = [prefs integerForKey:[prefs boolForKey:SPSelectLastFavoriteUsed] ? SPLastFavoriteIndex : SPDefaultFavorite];
+ NSUInteger tableRow = [prefs integerForKey:[prefs boolForKey:SPSelectLastFavoriteUsed] ? SPLastFavoriteIndex : SPDefaultFavorite];
if (tableRow < [favorites count]) {
previousType = [[[favorites objectAtIndex:tableRow] objectForKey:SPFavoriteTypeKey] integerValue];
@@ -844,7 +846,7 @@
// Perform sorting
[self _sortFavorites];
- if (previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
+ if ((NSInteger)previousSortItem > -1) [[[sender menu] itemAtIndex:previousSortItem] setState:NSOffState];
[[[sender menu] itemAtIndex:currentSortItem] setState:NSOnState];
}
@@ -861,7 +863,7 @@
// Perform re-sorting
[self _sortFavorites];
- [sender setState:reverseFavoritesSort];
+ [(NSMenuItem *)sender setState:reverseFavoritesSort];
}
/**
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index b69f23a1..877f5d15 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -38,6 +38,7 @@
#import "SPGeometryDataView.h"
#import "SPBundleEditorController.h"
#import "SPAppController.h"
+#import "SPTablesList.h"
NSInteger MENU_EDIT_COPY = 2001;
NSInteger MENU_EDIT_COPY_WITH_COLUMN = 2002;
diff --git a/Source/SPExporter.m b/Source/SPExporter.m
index 3be120b0..27cabf87 100644
--- a/Source/SPExporter.m
+++ b/Source/SPExporter.m
@@ -25,6 +25,7 @@
#import "SPExporter.h"
#import "SPExportFile.h"
+#import "SPFileHandle.h"
@implementation SPExporter
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m
index 3d64e260..8062fd93 100644
--- a/Source/SPProcessListController.m
+++ b/Source/SPProcessListController.m
@@ -468,7 +468,7 @@ static const NSString *SPTableViewIDColumnIdentifier = @"Id";
*/
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
{
- id object = (row < [processesFiltered count]) ? [[processesFiltered objectAtIndex:row] valueForKey:[tableColumn identifier]] : @"";
+ id object = ((NSUInteger)row < [processesFiltered count]) ? [[processesFiltered objectAtIndex:row] valueForKey:[tableColumn identifier]] : @"";
return (![object isNSNull]) ? object : [prefs stringForKey:SPNullValue];
}
@@ -624,7 +624,7 @@ static const NSString *SPTableViewIDColumnIdentifier = @"Id";
- (void)_updateSelectedAutoRefreshIntervalInterface
{
BOOL found = NO;
- NSUInteger interval = [prefs integerForKey:SPProcessListAutoRrefreshInterval];
+ NSInteger interval = [prefs integerForKey:SPProcessListAutoRrefreshInterval];
NSArray *items = [[autoRefreshIntervalMenuItem submenu] itemArray];
diff --git a/Source/SPQueryController.m b/Source/SPQueryController.m
index ad9653ce..721c27e9 100644
--- a/Source/SPQueryController.m
+++ b/Source/SPQueryController.m
@@ -665,7 +665,7 @@ static SPQueryController *sharedQueryController = nil;
- (void)addHistory:(NSString *)history forFileURL:(NSURL *)fileURL
{
- NSUInteger maxHistoryItems = [[prefs objectForKey:SPCustomQueryMaxHistoryItems] integerValue];
+ NSInteger maxHistoryItems = [[prefs objectForKey:SPCustomQueryMaxHistoryItems] integerValue];
// Save each history item due to its document source
if([historyContainer objectForKey:[fileURL absoluteString]]) {
diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m
index 3a46b763..98cfc440 100644
--- a/Source/SPTableStructureDelegate.m
+++ b/Source/SPTableStructureDelegate.m
@@ -43,7 +43,7 @@
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
{
// Return a placeholder if the table is reloading
- if (rowIndex >= [tableFields count]) return @"...";
+ if ((NSUInteger)rowIndex >= [tableFields count]) return @"...";
if([[tableColumn identifier] isEqualToString:@"collation"]) {
NSInteger idx = 0;
@@ -98,7 +98,7 @@
currentlyEditingRow = rowIndex;
}
- NSMutableArray *currentRow = [tableFields objectAtIndex:rowIndex];
+ NSMutableDictionary *currentRow = [tableFields objectAtIndex:rowIndex];
// Reset collation if encoding was changed
if([[aTableColumn identifier] isEqualToString:@"encoding"]) {
diff --git a/Source/SPTableTextFieldCell.m b/Source/SPTableTextFieldCell.m
index bcfa0138..799cb4c0 100644
--- a/Source/SPTableTextFieldCell.m
+++ b/Source/SPTableTextFieldCell.m
@@ -35,7 +35,7 @@
// Construct and get the sub text attributed string
NSAttributedString *string = [self attributedStringValue];
- NSInteger i;
+ NSUInteger i;
CGFloat maxWidth = cellFrame.size.width;
CGFloat stringWidth = [string size].width;
diff --git a/Source/SPTableTriggers.m b/Source/SPTableTriggers.m
index f5c15db0..bc5fc4f6 100644
--- a/Source/SPTableTriggers.m
+++ b/Source/SPTableTriggers.m
@@ -231,12 +231,12 @@ static const NSString *SPTriggerSQLMode = @"TriggerSQLMode";
if (isEdit) {
[triggerStatementTextView setString:editTriggerStatement];
- NSString *query = [NSString stringWithFormat:createTriggerStatementTemplate,
- [editTriggerName backtickQuotedString],
- editTriggerActionTime,
- editTriggerEvent,
- [editTriggerTableName backtickQuotedString],
- editTriggerStatement];
+ query = [NSString stringWithFormat:createTriggerStatementTemplate,
+ [editTriggerName backtickQuotedString],
+ editTriggerActionTime,
+ editTriggerEvent,
+ [editTriggerTableName backtickQuotedString],
+ editTriggerStatement];
// If this attempt to re-create the trigger failed, then we're screwed as we've just lost the user's
// data, but they had a backup and everything's cool, right? Should we be displaying an error here
@@ -339,12 +339,12 @@ static const NSString *SPTriggerSQLMode = @"TriggerSQLMode";
/**
* Double-click action on table cells - for the time being, return NO to disable editing.
*/
-- (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
+- (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn *)tableColumn row:(NSUInteger)rowIndex
{
if ([tableDocumentInstance isWorking]) return NO;
// Start Edit panel
- if (([triggerData count] > rowIndex) && ([triggerData objectAtIndex:rowIndex] != NSNotFound)) {
+ if (([triggerData count] > rowIndex) && [triggerData objectAtIndex:rowIndex]) {
[self _editTriggerAtIndex:rowIndex];
}