Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix server virtual layers load
(cherry picked from commit bd5e408)
- Loading branch information
Showing
with
4 additions
and
1 deletion.
-
+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 ); |
|
|
|
|
@@ -114,7 +118,6 @@ const QgsProject *QgsConfigCache::project( const QString &path, QgsServerSetting |
|
|
} |
|
|
} |
|
|
return mProjectCache[ path ]; |
|
|
|
|
|
} |
|
|
|
|
|
QDomDocument *QgsConfigCache::xmlDocument( const QString &filePath ) |
|
|