Skip to content

Commit

Permalink
Fix QGIS server for PyQgsServerAccessControl
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Oct 7, 2016
1 parent db1b52a commit 8648bd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/qgsserverprojectparser.cpp
Expand Up @@ -240,7 +240,10 @@ QgsMapLayer* QgsServerProjectParser::createLayerFromElement( const QDomElement&
{
addValueRelationLayersForLayer( dynamic_cast<QgsVectorLayer *>( layer ) );
// Reload joins and expression fields
QgsVectorLayer* vlayer = dynamic_cast<QgsVectorLayer *>( layer );

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Oct 8, 2016

Member

If you do that one line earlier you can also pass the vlayer to addValueRelationLayersForLayer and if you use qobject_cast it will be marginally faster. Just some very, very minor improvements ;)

This comment has been minimized.

Copy link
@rldhont

rldhont Oct 10, 2016

Author Contributor

Thanks for this, but we probably found a memory leak due to readXmlLayer. I'll probably revert and redo the wor to reload joins.

QString subsetString = vlayer->subsetString();
layer->readLayerXML( const_cast<QDomElement&>( elem ) );
vlayer->setSubsetString( subsetString );
}
return layer;
}
Expand Down

0 comments on commit 8648bd1

Please sign in to comment.