aboutsummaryrefslogtreecommitdiffstats
path: root/Source/GeneratePreviewForURL.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-10-10 03:49:58 +0200
committerMax <post@wickenrode.com>2015-10-10 03:49:58 +0200
commit01ef3ad33d260119ee61b949414f038be2c8d00e (patch)
treed4ea4eff90c6ae334adb17ba5573213f029f86d1 /Source/GeneratePreviewForURL.m
parent2cb875fb99e0c017b545b8e8427eb565e15cca1e (diff)
downloadsequelpro-01ef3ad33d260119ee61b949414f038be2c8d00e.tar.gz
sequelpro-01ef3ad33d260119ee61b949414f038be2c8d00e.tar.bz2
sequelpro-01ef3ad33d260119ee61b949414f038be2c8d00e.zip
Change two magic strings into constants
Diffstat (limited to 'Source/GeneratePreviewForURL.m')
-rw-r--r--Source/GeneratePreviewForURL.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/GeneratePreviewForURL.m b/Source/GeneratePreviewForURL.m
index ef20b852..2209f746 100644
--- a/Source/GeneratePreviewForURL.m
+++ b/Source/GeneratePreviewForURL.m
@@ -84,7 +84,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
}
// Dispatch different spf formats
- if([[spf objectForKey:@"format"] isEqualToString:@"connection"]) {
+ if([[spf objectForKey:SPFFormatKey] isEqualToString:@"connection"]) {
template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginConnectionTemplate" ofType:@"html"]
encoding:NSUTF8StringEncoding error:&templateReadError];
@@ -140,7 +140,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
[dateFormatter release];
}
- else if([[spf objectForKey:@"format"] isEqualToString:@"content filters"]) {
+ else if([[spf objectForKey:SPFFormatKey] isEqualToString:@"content filters"]) {
template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginContentFiltersTemplate" ofType:@"html"]
encoding:NSUTF8StringEncoding error:&templateReadError];
@@ -156,7 +156,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
];
}
- else if([[spf objectForKey:@"format"] isEqualToString:@"query favorites"]) {
+ else if([[spf objectForKey:SPFFormatKey] isEqualToString:@"query favorites"]) {
template = [NSString stringWithContentsOfFile:[[NSBundle bundleWithIdentifier:@"com.sequelpro.SequelPro.qlgenerator"] pathForResource:@"SPQLPluginQueryFavoritesTemplate" ofType:@"html"]
encoding:NSUTF8StringEncoding error:&templateReadError];