Skip to content

Commit

Permalink
For Mac OS X, if the QtCore framework is bundled with the application…
Browse files Browse the repository at this point in the history
…, clear the default library search path and look for Qt plugins only within the application bundle. This prevents loading the wrong plugins if Qt is already installed and someone is using the self-contained qgis bundle.

git-svn-id: http://svn.osgeo.org/qgis/trunk@5529 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jun 17, 2006
1 parent 4eab096 commit 1067fee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/gui/main.cpp
Expand Up @@ -361,6 +361,14 @@ int main(int argc, char *argv[])
// it must be handled before some other event handler runs and dismisses it as unknown.
// If run at startup, the handler will set either or both of myProjectFileName and myFileList.
AEInstallEventHandler(kCoreEventClass, kAEOpenDocuments, openDocumentsAEHandler, 0, false);

// If the QtCore framework is bundled with the application, clear the library search path
// and look for Qt plugins only within the application bundle.
QString bundledQtCore(QCoreApplication::applicationDirPath().append("/lib/QtCore.framework"));
if (QFile::exists(bundledQtCore))
{
QCoreApplication::setLibraryPaths(QStringList(QCoreApplication::applicationDirPath()));
}
#endif

// Check to see if qgis was started from the source directory.
Expand Down

0 comments on commit 1067fee

Please sign in to comment.