Print an error message, on project load error

This commit is contained in:
Stéphane Brunner 2018-09-21 08:53:54 +02:00
parent 85ff90f5b2
commit 5f33137c83

View File

@ -47,6 +47,12 @@ const QgsProject *QgsConfigCache::project( const QString &path )
mProjectCache.insert( path, prj.release() );
mFileSystemWatcher.addPath( path );
}
else
{
QgsMessageLog::logMessage(
this->tr( "Error when loading project file '%1': %2 " ).arg( path, prj->error() ),
QStringLiteral( "Server" ), Qgis::Critical );
}
}
QgsProject::setInstance( mProjectCache[ path ] );
return mProjectCache[ path ];