mac_startup: Remove unused functions

This commit is contained in:
Jonas Kvinge
2021-10-30 00:47:44 +02:00
parent 6df356327d
commit e75c955a68
2 changed files with 0 additions and 54 deletions

View File

@@ -309,55 +309,6 @@ void CheckForUpdates() {
#endif
}
QString GetBundlePath() {
ScopedCFTypeRef<CFURLRef> app_url(CFBundleCopyBundleURL(CFBundleGetMainBundle()));
ScopedCFTypeRef<CFStringRef> mac_path(CFURLCopyFileSystemPath(app_url.get(), kCFURLPOSIXPathStyle));
const char *path = CFStringGetCStringPtr(mac_path.get(), CFStringGetSystemEncoding());
QString bundle_path = QString::fromUtf8(path);
return bundle_path;
}
QString GetResourcesPath() {
QString bundle_path = GetBundlePath();
return bundle_path + "/Contents/Resources";
}
QString GetApplicationSupportPath() {
ScopedNSAutoreleasePool pool;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
QString ret;
if ([paths count] > 0) {
NSString *user_path = [paths objectAtIndex:0];
ret = QString::fromUtf8([user_path UTF8String]);
}
else {
ret = "~/Library/Application Support";
}
return ret;
}
QString GetMusicDirectory() {
ScopedNSAutoreleasePool pool;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSMusicDirectory, NSUserDomainMask, YES);
QString ret;
if ([paths count] > 0) {
NSString *user_path = [paths objectAtIndex:0];
ret = QString::fromUtf8([user_path UTF8String]);
}
else {
ret = "~/Music";
}
return ret;
}
static int MapFunctionKey(int keycode) {
switch (keycode) {