Permalink
Browse files

Fix couple of build warnings (#3218)

* Fix couple of build warnings

* revert scripts

* fix comment

* fix localize
  • Loading branch information...
Kaspik committed Nov 2, 2018
1 parent 0d5d072 commit 81986f5d62425af6e3a99bd3235c453032d6a460
@@ -2399,7 +2399,7 @@ - (void)failConnectionWithTitle:(NSString *)theTitle errorMessage:(NSString *)th
// Inform the delegate that the connection attempt failed
if (delegate && [delegate respondsToSelector:@selector(connectionControllerConnectAttemptFailed:)]) {
[[(NSObject *)delegate onMainThread] connectionControllerConnectAttemptFailed:self];
[[(id)delegate onMainThread] connectionControllerConnectAttemptFailed:self];
}
// Only display the connection error message if there is a window visible
@@ -486,7 +486,7 @@ - (void)colorChanged:(id)sender
/**
* Sets the font panel's valid modes.
*/
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel
{
return (NSFontPanelSizeModeMask | NSFontPanelCollectionModeMask);
}
@@ -652,7 +652,9 @@ - (BOOL)control:(NSControl *)control textShouldBeginEditing:(NSText *)aFieldEdit
- (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)command
{
// Check firstly if SPCopyTable can handle command
if ([control control:control textView:textView doCommandBySelector:command]) return YES;
if ([control respondsToSelector:@selector(control:textView:doCommandBySelector:)]) {
if ([(id)control control:control textView:textView doCommandBySelector:command]) return YES;
}
// Trap the escape key
if ([[control window] methodForSelector:command] == [[control window] methodForSelector:@selector(cancelOperation:)]) {
@@ -936,6 +936,8 @@ - (id)outlineView:(id)outlineView objectValueForTableColumn:(NSTableColumn *)tab
case SPTableTypeFunc:
[[tableColumn dataCell] setImage:functionIcon];
break;
default:
break;
}
} else {
[[tableColumn dataCell] setImage:databaseIcon];
@@ -376,13 +376,13 @@ - (NSInteger)ruleEditor:(NSRuleEditor *)editor numberOfChildrenForCriterion:(nul
// the child of an argument can only be the conjunction label if more arguments follow
else if(type == RuleNodeTypeArgument) {
ArgNode *node = (ArgNode *)criterion;
NSInteger numOfArgs = [[[node filter] objectForKey:@"NumberOfArguments"] integerValue];
NSUInteger numOfArgs = [[[node filter] objectForKey:@"NumberOfArguments"] unsignedIntegerValue];
return (numOfArgs > [node argIndex]+1) ? 1 : 0;
}
// the child of a conjunction is the next argument, if we have one
else if(type == RuleNodeTypeConnector) {
ConnectorNode *node = (ConnectorNode *)criterion;
NSInteger numOfArgs = [[[node filter] objectForKey:@"NumberOfArguments"] integerValue];
NSUInteger numOfArgs = [[[node filter] objectForKey:@"NumberOfArguments"] unsignedIntegerValue];
return (numOfArgs > [node labelIndex]+1) ? 1 : 0;
}
}
@@ -424,7 +424,7 @@ - (id)ruleEditor:(NSRuleEditor *)editor child:(NSInteger)index forCriterion:(nul
else if(type == RuleNodeTypeArgument) {
NSDictionary *filter = [(ArgNode *)criterion filter];
NSUInteger argIndex = [(ArgNode *)criterion argIndex];
if([[filter objectForKey:@"NumberOfArguments"] integerValue] > argIndex +1) {
if([[filter objectForKey:@"NumberOfArguments"] unsignedIntegerValue] > argIndex +1) {
ConnectorNode *node = [[ConnectorNode alloc] init];
[node setFilter:filter];
[node setLabelIndex:argIndex]; // label 0 follows argument 0
@@ -434,7 +434,7 @@ - (id)ruleEditor:(NSRuleEditor *)editor child:(NSInteger)index forCriterion:(nul
// the child of a conjunction is the next argument, if we have one
else if(type == RuleNodeTypeConnector) {
ConnectorNode *node = (ConnectorNode *)criterion;
NSInteger numOfArgs = [[[node filter] objectForKey:@"NumberOfArguments"] integerValue];
NSUInteger numOfArgs = [[[node filter] objectForKey:@"NumberOfArguments"] unsignedIntegerValue];
if(numOfArgs > [node labelIndex]+1) {
ArgNode *arg = [[ArgNode alloc] init];
[arg setFilter:[node filter]];
@@ -1141,7 +1141,7 @@ - (NSMutableDictionary *)_restoreSerializedFilter:(NSDictionary *)serialized
}
//now we have to create the argument node(s)
NSInteger numOfArgs = [[[op filter] objectForKey:@"NumberOfArguments"] integerValue];
NSUInteger numOfArgs = [[[op filter] objectForKey:@"NumberOfArguments"] unsignedIntegerValue];
//fail if the current op requires more arguments than we have stored values for
NSArray *values = [serialized objectForKey:SerFilterExprValues];
if(numOfArgs > [values count]) {
@@ -535,6 +535,8 @@ - (NSArray *)suggestionsForSQLCompletionWith:(NSString *)currentWord dictMode:(B
[possibleCompletions addObject:[NSDictionary dictionaryWithObjectsAndKeys:[[table componentsSeparatedByString:SPUniqueSchemaDelimiter] lastObject], @"display", @"func-small", @"image", tablepath, @"path", @"", @"isRef", nil]];
breakFlag = YES;
break;
default:
break;
}
if(!breakFlag) {
NSArray *sortedFields = [allFields sortedArrayUsingDescriptors:@[desc]];
@@ -3421,7 +3423,7 @@ - (void)textStorageDidProcessEditing:(NSNotification *)notification
/**
* Set font panel's valid modes
*/
- (NSUInteger)validModesForFontPanel:(NSFontPanel *)fontPanel
- (NSFontPanelModeMask)validModesForFontPanel:(NSFontPanel *)fontPanel
{
return (NSFontPanelSizeModeMask|NSFontPanelCollectionModeMask);
}

0 comments on commit 81986f5

Please sign in to comment.