Skip to content

Commit e2caf22

Browse files
committed
fix tests (followup 9c5d397)
1 parent 6ecb08c commit e2caf22

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/core/qgsapplication.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,13 +645,18 @@ QString QgsApplication::resolvePkgPath()
645645
{
646646
qWarning( "Application path not initialized" );
647647
}
648+
}
649+
650+
if ( !appPath.isNull() || getenv( "QGIS_PREFIX_PATH" ) )
651+
{
652+
QString prefix = getenv( "QGIS_PREFIX_PATH" ) ? getenv( "QGIS_PREFIX_PATH" ) : appPath;
648653

649654
// check if QGIS is run from build directory (not the install directory)
650655
QFile f;
651656
// "/../../.." is for Mac bundled app in build directory
652657
Q_FOREACH ( const QString &path, QStringList() << "" << "/.." << "/bin" << "/../../.." )
653658
{
654-
f.setFileName( appPath + path + "/qgisbuildpath.txt" );
659+
f.setFileName( prefix + path + "/qgisbuildpath.txt" );
655660
if ( f.exists() )
656661
break;
657662
}

0 commit comments

Comments
 (0)