File tree Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Expand file tree Collapse file tree 3 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ ELSE(NOT APPLE)
116
116
FRAMEWORK_VERSION "${CPACK_PACKAGE_VERSION_MAJOR} .${CPACK_PACKAGE_VERSION_MINOR} "
117
117
MACOSX_FRAMEWORK_INFO_PLIST "${CMAKE_SOURCE_DIR} /mac/framework.info.plist.in"
118
118
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${COMPLETE_VERSION}
119
- MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis2_native
119
+ MACOSX_FRAMEWORK_IDENTIFIER org.qgis.qgis3_native
120
120
BUILD_WITH_INSTALL_RPATH TRUE
121
121
PUBLIC_HEADER "${QGIS_NATIVE_HDRS} "
122
122
LINK_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} "
Original file line number Diff line number Diff line change 20
20
21
21
#include " qgsnative.h"
22
22
23
+ class QString ;
24
+
25
+
23
26
class NATIVE_EXPORT QgsMacNative : public QgsNative
24
27
{
25
28
public:
Original file line number Diff line number Diff line change 18
18
#include " qgsmacnative.h"
19
19
20
20
#include < Cocoa/Cocoa.h>
21
+ #include < QString>
21
22
22
23
QgsMacNative::~QgsMacNative ()
23
24
{
24
25
}
25
26
26
- const char * QgsMacNative::currentAppLocalizedName ()
27
+ const char * QgsMacNative::currentAppLocalizedName ()
27
28
{
28
29
return [[[NSRunningApplication currentApplication ] localizedName ] UTF8String ];
29
30
}
30
31
31
32
void QgsMacNative::currentAppActivateIgnoringOtherApps ()
32
33
{
33
- // valid for Mac OS X >= 10.6
34
34
[[NSRunningApplication currentApplication ] activateWithOptions:
35
- ( NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps)];
35
+ ( NSApplicationActivateAllWindows | NSApplicationActivateIgnoringOtherApps )];
36
36
}
37
37
38
- void openFileExplorerAndSelectFile ( const QString &path )
38
+ void QgsMacNative:: openFileExplorerAndSelectFile ( const QString &path )
39
39
{
40
- NSString * pathStr = [[NSString alloc ] initWithUTF8String: path.toUtf8 ().data ()];
41
- NSArray *fileURLs = [NSArray arrayWithObjects: pathStr, /* ... */ nil ];
40
+ NSString * pathStr = [[NSString alloc ] initWithUTF8String: path.toUtf8 ().data ()];
41
+ NSArray *fileURLs = [NSArray arrayWithObjects: [ NSURL fileURLWithPath: pathStr], nil ];
42
42
[[NSWorkspace sharedWorkspace ] activateFileViewerSelectingURLs: fileURLs];
43
43
}
You can’t perform that action at this time.
0 commit comments