Feature request #6736

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

Added by Giovanni Allegri almost 12 years ago. Updated over 7 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:Projection Support
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:15900

Description

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?

History

#1 Updated by Jürgen Fischer over 10 years ago

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

#2 Updated by Giovanni Allegri over 10 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?

#3 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF