Skip to content
Permalink
Browse files

Merge pull request #39819 from elpaso/bugfix-server-config-cache-virt…

…ual-layers

Fix server virtual layers load
  • Loading branch information
elpaso committed Nov 7, 2020
2 parents 0b5c734 + bd5e408 commit 95fc5153fb8c2440a77b1a191e44ca378e2a7e5c
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/server/qgsconfigcache.cpp
@@ -43,8 +43,12 @@ const QgsProject *QgsConfigCache::project( const QString &path, QgsServerSetting
{
if ( ! mProjectCache[ path ] )
{

std::unique_ptr<QgsProject> prj( new QgsProject() );

// This is required by virtual layers that call QgsProject::instance() inside the constructor :(
QgsProject::setInstance( prj.get() );

QgsStoreBadLayerInfo *badLayerHandler = new QgsStoreBadLayerInfo();
prj->setBadLayerHandler( badLayerHandler );

@@ -113,7 +117,6 @@ const QgsProject *QgsConfigCache::project( const QString &path, QgsServerSetting
}
}
return mProjectCache[ path ];

}

QDomDocument *QgsConfigCache::xmlDocument( const QString &filePath )

0 comments on commit 95fc515

Please sign in to comment.
You can’t perform that action at this time.