Skip to content
Permalink
Browse files
For Mac OS X, if the QtCore framework is bundled with the application…
…, 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/qgis@5529 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
telwertowski committed Jun 17, 2006
1 parent f0314f3 commit 87d2fea3636caab31966882bb8bc27137143ab89
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/gui/main.cpp
@@ -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.

0 comments on commit 87d2fea

Please sign in to comment.