Feature request #6736

Add a writtenProject signal at the end of the project file writing

Added by Giovanni Allegri over 4 years ago. Updated almost 3 years ago.

Status:Open Start Date:11/20/2012
Priority:Normal Due date:
Assigned to:- % Done:


Category:Projection Support
Target version:Future Release - Lower Priority
Platform: Resolution:
Platform version: Pull Request or Patch supplied:No
Status info: Tag:


I've had multiple times the need to post-process a project file, after it has been saved.
In this moment we can only intercept when the writing begins, but not when it finishes.

Could we emit a new signal at the end of the write() method of QgsProject?


Updated by J├╝rgen Fischer almost 3 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

Updated by Giovanni Allegri almost 3 years ago

The aim of this would be giving other parts of code the opportunity to alter the xml content before being saved to file (e. g. a plugin).
My doubt is on the connection type. If not set, AutoConnection is used, but it won't guarantee to execute the slot code before saving the file. It depends if the signal and the slot run on the same thread or not.
In case of a single threaded python plugin code do the QgsProject::write will execute on the same thread of a python slot? I.e., will the slot be executed synchronously?

Also available in: Atom