Bug report #10198
mapserver does not update when project file changes
|Affected QGIS version:||master||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:||fixed/implemented|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||18647|
The cache should be updated thanks to QFileSystemWatcher in QgsConfigCache, but processEvents() is never called in the main loop.
Once processEvents() is added, there is a crash when updating the project and submitting another wms GetPrint request because QgsMapLayerRegistry is not cleaned up between calls.
Adding QgsMapLayerRegistry::instance()->removeAllMapLayers() in the loop solves that.
I'll submit a PR today.