Fixed: capp_lint for the entire project is not launch from a thread

This commit is contained in:
Alexandre Wilhelm
2014-04-18 11:18:53 -07:00
parent c28cd8a270
commit 7f35ff5fe5
+7 -1
View File
@@ -1731,13 +1731,16 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
- (IBAction)checkProjectWithCappLint:(id)aSender
{
[self clearErrors:self];
[self checkCappLintForPath:self.projectPath];
[self performSelectorInBackground:@selector(checkCappLintForPath:) withObject:self.projectPath];
}
- (void)checkCappLintForPath:(NSString*)aPath
{
DDLogVerbose(@"Checking path %@ with capp_lint", aPath);
self.isProcessing = YES;
[[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidStartNotification object:self];
NSArray *arguments = [NSArray arrayWithObject:aPath];
NSDictionary *taskResult = [self runTaskWithLaunchPath:self.executablePaths[@"capp_lint"]
@@ -1786,6 +1789,9 @@ void fsevents_callback(ConstFSEventStreamRef streamRef,
}
[self showErrors];
self.isProcessing = NO;
[[NSNotificationCenter defaultCenter] postNotificationName:XCCBatchDidEndNotification object:self];
}
@end