aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCustomQuery.m
diff options
context:
space:
mode:
authorsqlprodev <sqlprodev@northofthree.com>2012-03-27 21:02:15 +0000
committersqlprodev <sqlprodev@northofthree.com>2012-03-27 21:02:15 +0000
commit0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919 (patch)
tree338bb0a6805d74566ae074c5db7ae6e443e9ed30 /Source/SPCustomQuery.m
parent611dc52b10ecace3bc95df5645701fd23f165d37 (diff)
downloadsequelpro-0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919.tar.gz
sequelpro-0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919.tar.bz2
sequelpro-0576c2fcca6ddfa04c9a7c6a3d76f3e51cf88919.zip
tweaks to compile on Xcode 4 / 10.6 SDK for SP_REFACTOR
Diffstat (limited to 'Source/SPCustomQuery.m')
-rw-r--r--Source/SPCustomQuery.m13
1 files changed, 11 insertions, 2 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m
index 8b9d9a74..b7f105eb 100644
--- a/Source/SPCustomQuery.m
+++ b/Source/SPCustomQuery.m
@@ -25,9 +25,11 @@
#import "SPCustomQuery.h"
#import "SPSQLParser.h"
-#import "SPMySQL.h"
#ifndef SP_REFACTOR /* headers */
+#import "SPMySQL.h"
#import "SPGrowlController.h"
+#else
+#import <SPMySQL/SPMySQL.h>
#endif
#import "SPDataCellFormatter.h"
#import "SPDatabaseDocument.h"
@@ -861,7 +863,9 @@
];
}
}
+#ifndef SP_REFACTOR
[[affectedRowsText onMainThread] setStringValue:statusString];
+#endif
// Restore automatic query retries
[mySQLConnection setRetryQueriesOnConnectionFailure:YES];
@@ -1292,9 +1296,11 @@
// If errors occur, display them
if ( [mySQLConnection lastQueryWasCancelled] || ([errorsString length] && !queryIsTableSorter)) {
+#ifndef SP_REFACTOR
// set the error text
[errorText setString:[errorsString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]];
[[errorTextScrollView verticalScroller] setFloatValue:1.0f];
+#endif
// try to select the line x of the first error if error message with ID 1064 contains "at line x"
// by capturing the last number of the error string
@@ -1368,6 +1374,9 @@
[queryInfoButton setState:NSOffState];
[self toggleQueryInfoPaneCollapse:queryInfoButton];
}
+#else
+ if ( [errorsString length] > 0 )
+ NSRunAlertPanel(LOCAL(@"Query Error"), @"%@", LOCAL(@"OK"), nil, nil, errorsString);
#endif
}
@@ -1530,11 +1539,11 @@
[autouppercaseKeywordsMenuItem setState:(YES?NSOnState:NSOffState)];
#endif
+#ifndef SP_REFACTOR
if ( [[SPQueryController sharedQueryController] historyForFileURL:[tableDocumentInstance fileURL]] )
[self performSelectorOnMainThread:@selector(historyItemsHaveBeenUpdated:) withObject:self waitUntilDone:YES];
// Populate query favorites
-#ifndef SP_REFACTOR
[self queryFavoritesHaveBeenUpdated:nil];
#endif