Skip to content

Commit

Permalink
fix tests (followup 9c5d397)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 24, 2018
1 parent 6ecb08c commit e2caf22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/qgsapplication.cpp
Expand Up @@ -645,13 +645,18 @@ QString QgsApplication::resolvePkgPath()
{
qWarning( "Application path not initialized" );
}
}

if ( !appPath.isNull() || getenv( "QGIS_PREFIX_PATH" ) )
{
QString prefix = getenv( "QGIS_PREFIX_PATH" ) ? getenv( "QGIS_PREFIX_PATH" ) : appPath;

// check if QGIS is run from build directory (not the install directory)
QFile f;
// "/../../.." is for Mac bundled app in build directory
Q_FOREACH ( const QString &path, QStringList() << "" << "/.." << "/bin" << "/../../.." )
{
f.setFileName( appPath + path + "/qgisbuildpath.txt" );
f.setFileName( prefix + path + "/qgisbuildpath.txt" );
if ( f.exists() )
break;
}
Expand Down

0 comments on commit e2caf22

Please sign in to comment.