|
59 | 59 | // Default values are for C++, SIP bindings will override their
|
60 | 60 | // options in in init()
|
61 | 61 |
|
62 |
| -QString QgsServer::sConfigFilePath = QString(); |
| 62 | +QString* QgsServer::sConfigFilePath = nullptr; |
63 | 63 | QgsCapabilitiesCache* QgsServer::sCapabilitiesCache = nullptr;
|
64 | 64 | QgsMapRenderer* QgsServer::sMapRenderer = nullptr;
|
65 | 65 | #ifdef HAVE_SERVER_PYTHON_PLUGINS
|
@@ -403,10 +403,9 @@ bool QgsServer::init( int & argc, char ** argv )
|
403 | 403 | defaultConfigFilePath = adminSLDFileInfo.absoluteFilePath();
|
404 | 404 | }
|
405 | 405 | }
|
406 |
| - if ( !defaultConfigFilePath.isEmpty() ) |
407 |
| - { |
408 |
| - sConfigFilePath = defaultConfigFilePath; |
409 |
| - } |
| 406 | + // Store the config file path |
| 407 | + sConfigFilePath = new QString( defaultConfigFilePath ); |
| 408 | + |
410 | 409 |
|
411 | 410 | //create cache for capabilities XML
|
412 | 411 | sCapabilitiesCache = new QgsCapabilitiesCache();
|
@@ -514,7 +513,7 @@ QPair<QByteArray, QByteArray> QgsServer::handleRequest( const QString& queryStri
|
514 | 513 | printRequestParameters( parameterMap, logLevel );
|
515 | 514 | QMap<QString, QString>::const_iterator paramIt;
|
516 | 515 | //Config file path
|
517 |
| - QString configFilePath = configPath( sConfigFilePath, parameterMap ); |
| 516 | + QString configFilePath = configPath( *sConfigFilePath, parameterMap ); |
518 | 517 | #ifdef HAVE_SERVER_PYTHON_PLUGINS
|
519 | 518 | sServerInterface->setConfigFilePath( configFilePath );
|
520 | 519 | #endif
|
|
0 commit comments