File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class NATIVE_EXPORT QgsMacNative : public QgsNative
27
27
28
28
virtual const char *currentAppLocalizedName ();
29
29
void currentAppActivateIgnoringOtherApps () override ;
30
+ void openFileExplorerAndSelectFile ( const QString &path ) override ;
30
31
};
31
32
32
33
#endif // QGSMACNATIVE_H
Original file line number Diff line number Diff line change 34
34
[[NSRunningApplication currentApplication ] activateWithOptions:
35
35
(NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
36
36
}
37
+
38
+ void openFileExplorerAndSelectFile ( const QString &path )
39
+ {
40
+ NSString * pathStr = [[NSString alloc ] initWithUTF8String: path.toUtf8 ().data ()];
41
+ NSArray *fileURLs = [NSArray arrayWithObjects: pathStr, /* ... */ nil ];
42
+ [[NSWorkspace sharedWorkspace ] activateFileViewerSelectingURLs: fileURLs];
43
+ }
You can’t perform that action at this time.
0 commit comments