Skip to content
Permalink
Browse files

Merge pull request #5979 from m-kuhn/lrelease-silent

[server] Fix unused variable
  • Loading branch information
m-kuhn committed Jan 9, 2018
2 parents 90fc756 + 8b60b4c commit b355886edca5a7db0ed0fdaf091184c8487882eb
@@ -35,9 +35,7 @@ class SERVER_EXPORT QgsOWSServerFilterRestorer
{
public:

QgsOWSServerFilterRestorer( const QgsAccessControl *accessControl )
: mAccessControl( accessControl )
{}
QgsOWSServerFilterRestorer() = default;

//! Destructor. When object is destroyed all original layer filters will be restored.
~QgsOWSServerFilterRestorer()
@@ -72,7 +70,6 @@ class SERVER_EXPORT QgsOWSServerFilterRestorer
static void applyAccessControlLayerFilters( const QgsAccessControl *accessControl, QgsMapLayer *mapLayer );

private:
const QgsAccessControl *mAccessControl = nullptr;
QHash<QgsMapLayer *, QString> mOriginalLayerFilters;

};
@@ -181,7 +181,7 @@ namespace QgsWfs

//scoped pointer to restore all original layer filters (subsetStrings) when pointer goes out of scope
//there's LOTS of potential exit paths here, so we avoid having to restore the filters manually
std::unique_ptr< QgsOWSServerFilterRestorer > filterRestorer( new QgsOWSServerFilterRestorer( accessControl ) );
std::unique_ptr< QgsOWSServerFilterRestorer > filterRestorer( new QgsOWSServerFilterRestorer() );

// features counters
long sentFeatures = 0;
@@ -239,7 +239,7 @@ namespace QgsWfs

//scoped pointer to restore all original layer filters (subsetStrings) when pointer goes out of scope
//there's LOTS of potential exit paths here, so we avoid having to restore the filters manually
std::unique_ptr< QgsOWSServerFilterRestorer > filterRestorer( new QgsOWSServerFilterRestorer( accessControl ) );
std::unique_ptr< QgsOWSServerFilterRestorer > filterRestorer( new QgsOWSServerFilterRestorer() );

// get layers
QStringList wfsLayerIds = QgsServerProjectUtils::wfsLayerIds( *project );
@@ -226,7 +226,7 @@ namespace QgsWfs

//scoped pointer to restore all original layer filters (subsetStrings) when pointer goes out of scope
//there's LOTS of potential exit paths here, so we avoid having to restore the filters manually
std::unique_ptr< QgsOWSServerFilterRestorer > filterRestorer( new QgsOWSServerFilterRestorer( accessControl ) );
std::unique_ptr< QgsOWSServerFilterRestorer > filterRestorer( new QgsOWSServerFilterRestorer() );

// get layers
QStringList wfsLayerIds = QgsServerProjectUtils::wfsLayerIds( *project );
@@ -123,7 +123,9 @@ namespace QgsWms
const QgsProject *project,
const QgsServerRequest::Parameters &parameters )
: mParameters( parameters )
#ifdef HAVE_SERVER_PYTHON_PLUGINS
, mAccessControl( serverIface->accessControls() )
#endif
, mSettings( *serverIface->serverSettings() )
, mProject( project )
{
@@ -286,8 +286,10 @@ namespace QgsWms

const QgsServerRequest::Parameters &mParameters;

#ifdef HAVE_SERVER_PYTHON_PLUGINS
//! The access control helper
QgsAccessControl *mAccessControl = nullptr;
#endif
QgsFeatureFilter mFeatureFilter;

const QgsServerSettings &mSettings;

0 comments on commit b355886

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