aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/macoshelper.h1
-rw-r--r--src/qt/macoshelper.mm8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/qt/macoshelper.h b/src/qt/macoshelper.h
index bddf70c6..a6caa79b 100644
--- a/src/qt/macoshelper.h
+++ b/src/qt/macoshelper.h
@@ -35,6 +35,7 @@ class MacOSHelper
public:
static bool isCapsLock();
+ static bool openFolderAndSelectItem(const QUrl &path);
};
#endif //MACOSHELPER_H
diff --git a/src/qt/macoshelper.mm b/src/qt/macoshelper.mm
index 0b29f25f..a7fb061d 100644
--- a/src/qt/macoshelper.mm
+++ b/src/qt/macoshelper.mm
@@ -47,3 +47,11 @@ bool MacOSHelper::isCapsLock()
return (flags & NSAlphaShiftKeyMask);
#endif
}
+
+bool MacOSHelper::openFolderAndSelectItem(const QUrl &path)
+{
+ NSURL *nspath = path.toNSURL();
+ NSArray *fileURLs = [NSArray arrayWithObjects:nspath, nil];
+ [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs];
+ return true;
+}