From e75c955a68dfc9f665b809ce9372bffed78c8ef7 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Sat, 30 Oct 2021 00:47:44 +0200 Subject: [PATCH] mac_startup: Remove unused functions --- src/core/mac_startup.h | 5 ----- src/core/mac_startup.mm | 49 ----------------------------------------- 2 files changed, 54 deletions(-) diff --git a/src/core/mac_startup.h b/src/core/mac_startup.h index 331899f7..0536625f 100644 --- a/src/core/mac_startup.h +++ b/src/core/mac_startup.h @@ -31,11 +31,6 @@ void SetShortcutHandler(GlobalShortcutsBackendMacOS *handler); void SetApplicationHandler(PlatformInterface *handler); void CheckForUpdates(); -QString GetBundlePath(); -QString GetResourcesPath(); -QString GetApplicationSupportPath(); -QString GetMusicDirectory(); - void EnableFullScreen(const QWidget &main_window); } // namespace mac diff --git a/src/core/mac_startup.mm b/src/core/mac_startup.mm index d1022ad8..951cb8c7 100644 --- a/src/core/mac_startup.mm +++ b/src/core/mac_startup.mm @@ -309,55 +309,6 @@ void CheckForUpdates() { #endif } -QString GetBundlePath() { - - ScopedCFTypeRef app_url(CFBundleCopyBundleURL(CFBundleGetMainBundle())); - ScopedCFTypeRef 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) {