forked from Public/monero-gui
WizardModeSelection: optional 'Portable mode' feature support
This commit is contained in:
@@ -36,6 +36,7 @@ class MacOSHelper
|
||||
public:
|
||||
static bool isCapsLock();
|
||||
static bool openFolderAndSelectItem(const QUrl &path);
|
||||
static QString bundlePath();
|
||||
};
|
||||
|
||||
#endif //MACOSHELPER_H
|
||||
|
||||
@@ -55,3 +55,18 @@ bool MacOSHelper::openFolderAndSelectItem(const QUrl &path)
|
||||
[[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs];
|
||||
return true;
|
||||
}
|
||||
|
||||
QString MacOSHelper::bundlePath()
|
||||
{
|
||||
NSBundle *main = [NSBundle mainBundle];
|
||||
if (!main)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
NSString *bundlePathString = [main bundlePath];
|
||||
if (!bundlePathString)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return QString::fromCFString(reinterpret_cast<const CFStringRef>(bundlePathString));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user