Skip to content

Commit

Permalink
BSD patches
Browse files Browse the repository at this point in the history
(cherry picked from commit 34a0650)
  • Loading branch information
lbartoletti authored and nyalldawson committed Mar 7, 2019
1 parent 4b639bf commit bb7762c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/main.cpp
Expand Up @@ -1033,15 +1033,15 @@ int main( int argc, char *argv[] )
QCoreApplication::addLibraryPath( QApplication::applicationDirPath()
+ QDir::separator() + "qtplugins" );
#endif
#ifdef Q_OS_MAC
#if defined(Q_OS_UNIX)
// Resulting libraryPaths has critical QGIS plugin paths first, then any Qt plugin paths, then
// any dev-defined paths (in app's qt.conf) and/or user-defined paths (QT_PLUGIN_PATH env var).
//
// NOTE: Minimizes, though does not fully protect against, crashes due to dev/user-defined libs
// built against a different Qt/QGIS, while still allowing custom C++ plugins to load.
QStringList libPaths( QCoreApplication::libraryPaths() );

QgsDebugMsgLevel( QStringLiteral( "Initial macOS QCoreApplication::libraryPaths: %1" )
QgsDebugMsgLevel( QStringLiteral( "Initial macOS/UNIX QCoreApplication::libraryPaths: %1" )
.arg( libPaths.join( " " ) ), 4 );

// Strip all critical paths that should always be prepended
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -10256,7 +10256,7 @@ class QgsPythonRunnerImpl : public QgsPythonRunner
void QgisApp::loadPythonSupport()
{
QString pythonlibName( QStringLiteral( "qgispython" ) );
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
#if defined(Q_OS_UNIX)
pythonlibName.prepend( QgsApplication::libraryPath() );
#endif
#ifdef __MINGW32__
Expand Down
2 changes: 1 addition & 1 deletion src/server/qgsserverplugins.cpp
Expand Up @@ -41,7 +41,7 @@ QStringList &QgsServerPlugins::serverPlugins()
bool QgsServerPlugins::initPlugins( QgsServerInterface *interface )
{
QString pythonlibName( QStringLiteral( "qgispython" ) );
#if defined(Q_OS_MAC) || defined(Q_OS_LINUX)
#if defined(Q_OS_UNIX)
pythonlibName.prepend( QgsApplication::libraryPath() );
#endif
#ifdef __MINGW32__
Expand Down

0 comments on commit bb7762c

Please sign in to comment.