Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

resolved proxy objects no longer need to be cast to QSObject

  • Loading branch information...
commit ed918f636ad61f60c89d0102e420ef0f445be995 1 parent 320b1e8
@skurfer authored
View
2  Quicksilver/Code-QuickStepCore/QSAction.m
@@ -311,7 +311,7 @@ - (QSObject *)performOnDirectObject:(QSObject *)dObject indirectObject:(QSObject
provider = [QSReg getClassInstance:class];
}
if ([dObject isProxyObject]) {
- dObject = (QSObject *)[dObject resolvedObject];
+ dObject = [dObject resolvedObject];
}
if ([[dict objectForKey:kActionSplitPluralArguments] boolValue] && [dObject count] > 1) {
NSArray *objects = [dObject splitObjects];
View
4 Quicksilver/Code-QuickStepCore/QSCommand.m
@@ -470,12 +470,12 @@ - (void)executeFromMenuWithIndirect:(id)sender {
}
- (void)executeWithIndirect:(id)indirectObject {
- [self setIndirectObject:(QSObject *)[indirectObject resolvedObject]];
+ [self setIndirectObject:[indirectObject resolvedObject]];
[self executeFromMenu:nil];
}
- (NSArray *)validIndirects {
- QSObject *directObject = [[self dObject] isProxyObject] ? (QSObject *)[[self dObject] resolvedObject] : [self dObject];
+ QSObject *directObject = [[self dObject] isProxyObject] ? [[self dObject] resolvedObject] : [self dObject];
NSArray *indirects = [[[self aObject] provider] validIndirectObjectsForAction:[[self aObject] identifier] directObject:directObject];
if ([indirects count] >1 && [[indirects objectAtIndex:1] isKindOfClass:[NSArray class]]) indirects = [indirects objectAtIndex:1];
if ([indirects count] == 1 && [[indirects objectAtIndex:0] containsType:QSTextProxyType]) {
View
2  Quicksilver/Code-QuickStepCore/QSExecutor.m
@@ -393,7 +393,7 @@ - (NSArray *)validActionsForDirectObject:(QSObject *)dObject indirectObject:(QSO
- (NSArray *)validIndirectObjectsForAction:(NSString *)action directObject:(QSObject *)dObject {
QSActionProvider *actionObject = [[actionIdentifiers objectForKey:action] objectForKey:kActionClass];
// NSLog(@"actionobject %@", actionObject);
- QSObject *directObject = [dObject isProxyObject] ? (QSObject *)[dObject resolvedObject] : dObject;
+ QSObject *directObject = [dObject isProxyObject] ? [dObject resolvedObject] : dObject;
return [actionObject validIndirectObjectsForAction:action directObject:directObject];
}
View
4 Quicksilver/Code-QuickStepCore/QSObject.m
@@ -223,7 +223,7 @@ + (id)objectByMergingObjects:(NSArray *)objects withObject:(QSObject *)object {
}
- (NSArray *)splitObjects {
- QSObject *object = [self isProxyObject] ? (QSObject *)[self resolvedObject] : self;
+ QSObject *object = [self isProxyObject] ? [self resolvedObject] : self;
if ([object count] == 1) {
return [NSArray arrayWithObject:object];
}
@@ -933,7 +933,7 @@ - (BOOL)loadIcon {
if (namedIcon) {
NSImage *image = nil;
if ([namedIcon isEqualToString:@"ProxyIcon"]) {
- QSObject *resolved = (QSObject *)[self resolvedObject];
+ QSObject *resolved = [self resolvedObject];
[resolved loadIcon];
image = [resolved icon];
}
View
2  Quicksilver/Code-QuickStepCore/QSObject_Pasteboard.m
@@ -187,7 +187,7 @@ - (BOOL)putOnPasteboard:(NSPasteboard *)pboard declareTypes:(NSArray *)types inc
// get the different pboard types from the object's data dictionary -- they're all stored here
types = [[[[self dataDictionary] allKeys] mutableCopy] autorelease];
if ([types containsObject:QSProxyType])
- [(NSMutableArray *)types addObjectsFromArray:[[(QSObject *)[self resolvedObject] dataDictionary] allKeys]];
+ [(NSMutableArray *)types addObjectsFromArray:[[[self resolvedObject] dataDictionary] allKeys]];
}
else {
NSMutableSet *typeSet = [NSMutableSet setWithArray:types];
View
2  Quicksilver/Code-QuickStepCore/QSProxyObject.m
@@ -115,7 +115,7 @@ - (BOOL)bypassValidation {
- (QSObject *)resolvedObject {return [self proxyObject];}
- (NSString *)stringValue {
- return [(QSObject*)[self resolvedObject] stringValue];
+ return [[self resolvedObject] stringValue];
}
- (BOOL)respondsToSelector:(SEL)aSelector {
View
2  Quicksilver/Code-QuickStepInterface/QSInterfaceController.m
@@ -349,7 +349,7 @@ - (void)updateIndirectObjects {
id actionProvider = [aObj provider];
NSArray *indirects = nil;
if (actionProvider && [actionProvider respondsToSelector:@selector(validIndirectObjectsForAction:directObject:)]) {
- QSObject *directObject = [[dSelector objectValue] isProxyObject] ? (QSObject *)[[dSelector objectValue] resolvedObject] : [dSelector objectValue];
+ QSObject *directObject = [[dSelector objectValue] isProxyObject] ? [[dSelector objectValue] resolvedObject] : [dSelector objectValue];
indirects = [actionProvider validIndirectObjectsForAction:[aObj identifier] directObject:directObject];
}
// If the validIndirectObjectsForAction... method hasn't been implemented, attempt to get valid indirects from the action's 'indirectTypes'
View
8 Quicksilver/PlugIns-Main/QSCorePlugIn/Code/QSObjectActions.m
@@ -117,20 +117,20 @@ - (NSWindow *)showMenu:(NSMenu *)menu forObject:(QSObject *)object {
}
- (QSObject *)showChildMenu:(QSObject *)dObject {
- [self showMenu:[(QSObject*)[dObject resolvedObject] childrenMenu] forObject:dObject];
+ [self showMenu:[[dObject resolvedObject] childrenMenu] forObject:dObject];
return nil;
}
- (QSObject *)showMenu:(QSObject *)dObject {
- [self showMenu:[(QSObject*)[dObject resolvedObject] fullMenu] forObject:dObject];
+ [self showMenu:[[dObject resolvedObject] fullMenu] forObject:dObject];
return nil;
}
- (QSObject *)showActionMenu:(QSObject *)dObject {
- [self showMenu:[(QSObject*)[dObject resolvedObject] actionsMenu] forObject:dObject];
+ [self showMenu:[[dObject resolvedObject] actionsMenu] forObject:dObject];
return nil;
}
- (QSObject *)saveObject:(QSObject *)dObject toDirectory:(QSObject *)iObject {
- dObject = (QSObject *)[dObject resolvedObject];
+ dObject = [dObject resolvedObject];
id handler = [dObject handler];
NSData *data = nil;
NSString *filename = nil;
Please sign in to comment.
Something went wrong with that request. Please try again.