mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Added ifdef's for OSX compilation (per J.Collord)
git-svn-id: http://svn.osgeo.org/qgis/trunk@1565 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
5366915385
commit
a6a2f975d6
@ -21,6 +21,11 @@
|
||||
#ifndef WIN32
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MACX
|
||||
#import <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#include <qaction.h>
|
||||
#include <qapplication.h>
|
||||
#include <qbitmap.h>
|
||||
@ -363,8 +368,24 @@ QgisApp::QgisApp(QWidget * parent, const char *name, WFlags fl):QgisAppBase(pare
|
||||
#else
|
||||
mAppDir = PREFIX;
|
||||
#endif
|
||||
|
||||
// Get pointer to the provider registry singleton
|
||||
#ifdef Q_OS_MACX
|
||||
// we do different things for OSX - set both application dir and plugin lib
|
||||
// location here:
|
||||
CFURLRef pprefixRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||
CFStringRef mmacPath = CFURLCopyFileSystemPath(pprefixRef, kCFURLPOSIXPathStyle);
|
||||
// store application dir
|
||||
mAppDir = CFStringGetCStringPtr(macPath, CFStringGetSystemEncoding());
|
||||
mAppDir = mAppDir + "/Contents/Resources";
|
||||
// store location of plugins
|
||||
plib = CFStringGetCStringPtr(mmacPath, CFStringGetSystemEncoding());
|
||||
plib = plib + "/Contents/Resources/lib";
|
||||
#else
|
||||
// win32 and posix plugin path:
|
||||
QString plib = PLUGINPATH;
|
||||
#endif
|
||||
|
||||
mProviderRegistry = QgsProviderRegistry::instance(plib);
|
||||
|
||||
#ifdef QGISDEBUG
|
||||
|
Loading…
x
Reference in New Issue
Block a user