Compare commits

...

5 Commits
master ... 1.X

7 changed files with 22 additions and 17 deletions

View File

@ -204,7 +204,7 @@
[self updateDeleteTimer];
dispatch_resume(deleteTimer);
if (deleteTimer != NULL) dispatch_resume(deleteTimer);
}
}
}

View File

@ -1017,14 +1017,14 @@
- (NSString *)description
{
return [@{@"filePath": self.filePath,
@"fileName": self.fileName,
@"fileAttributes": self.fileAttributes,
@"creationDate": self.creationDate,
@"modificationDate": self.modificationDate,
@"fileSize": @(self.fileSize),
@"age": @(self.age),
@"isArchived": @(self.isArchived)} description];
return [@{@"filePath": self.filePath ?: @"",
@"fileName": self.fileName ?: @"",
@"fileAttributes": self.fileAttributes ?: @"",
@"creationDate": self.creationDate ?: @"",
@"modificationDate": self.modificationDate ?: @"",
@"fileSize": @(self.fileSize),
@"age": @(self.age),
@"isArchived": @(self.isArchived)} description];
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -673,11 +673,14 @@ static DDTTYLogger *sharedInstance;
// iOS
BOOL done = NO;
if ([color respondsToSelector:@selector(getRed:green:blue:alpha:)])
{
[color getRed:rPtr green:gPtr blue:bPtr alpha:NULL];
done = [color getRed:rPtr green:gPtr blue:bPtr alpha:NULL];
}
else
if (!done)
{
// The method getRed:green:blue:alpha: was only available starting iOS 5.
// So in iOS 4 and earlier, we have to jump through hoops.
@ -685,7 +688,7 @@ static DDTTYLogger *sharedInstance;
CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB();
unsigned char pixel[4];
CGContextRef context = CGBitmapContextCreate(&pixel, 1, 1, 8, 4, rgbColorSpace, kCGImageAlphaNoneSkipLast);
CGContextRef context = CGBitmapContextCreate(&pixel, 1, 1, 8, 4, rgbColorSpace, (CGBitmapInfo)kCGImageAlphaNoneSkipLast);
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, CGRectMake(0, 0, 1, 1));
@ -702,7 +705,9 @@ static DDTTYLogger *sharedInstance;
// Mac OS X
[color getRed:rPtr green:gPtr blue:bPtr alpha:NULL];
NSColor *safeColor = [color colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
[safeColor getRed:rPtr green:gPtr blue:bPtr alpha:NULL];
#endif
}

View File

@ -316,7 +316,7 @@
// We use SQLITE_OPEN_NOMUTEX to use the multi-thread threading mode,
// as we will be serializing access to the connection externally.
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX;
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_PRIVATECACHE;
int status = sqlite3_open_v2([databasePath UTF8String], &db, flags, NULL);
if (status != SQLITE_OK)

View File

@ -84,7 +84,7 @@
// We use SQLITE_OPEN_NOMUTEX to use the multi-thread threading mode,
// as we will be serializing access to the connection externally.
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX;
int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_PRIVATECACHE;
int status = sqlite3_open_v2([database.databasePath UTF8String], &db, flags, NULL);
if (status != SQLITE_OK)

View File

@ -167,7 +167,7 @@
[timestamps enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop){
if ([obj isKindOfClass:[NSDate date]])
if ([obj isKindOfClass:[NSDate class]])
{
YapDatabaseString _key; MakeYapDatabaseString(&_key, (NSString *)key);

View File

@ -534,7 +534,7 @@
**/
- (NSMutableDictionary *)changeset
{
if ([objectChanges count] > 0 || [metadataChanges count] > 0 || allKeysRemoved)
if ([objectChanges count] > 0 || [metadataChanges count] > 0 || [removedKeys count] > 0 || allKeysRemoved)
{
NSMutableDictionary *changeset = [NSMutableDictionary dictionaryWithCapacity:5];