Always create a main network access manager

Or threaded networking - like XYZ layers - will crash in standalone apps.
This commit is contained in:
Matthias Kuhn 2016-11-04 09:13:38 +01:00
parent 0dd094ca9d
commit ea43ce0e00

View File

@ -882,6 +882,9 @@ void QgsApplication::initQgis()
// create map layer registry if doesn't exist
QgsMapLayerRegistry::instance();
// Make sure we have a NAM created on the main thread.
QgsNetworkAccessManager::instance();
// initialize authentication manager and connect to database
QgsAuthManager::instance()->init( pluginPath() );
}