Skip to content
Permalink
Browse files

Fix QGIS server for PyQgsServerAccessControl

  • Loading branch information
rldhont committed Oct 7, 2016
1 parent db1b52a commit 8648bd12f39e17e3e656101e5b12a13b170e59c5
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/server/qgsserverprojectparser.cpp
@@ -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;
}

0 comments on commit 8648bd1

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