Bug report #19336

QgsTask does not emit signals from finished()

Added by Alexander Bruy over 5 years ago. Updated over 5 years ago.

Category:Python bindings / sipify
Affected QGIS version:3.3(master) Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27164


QgsTask documentation says that when task is added to the QgsTaskManager ownership also transfered to it. But seems this is true only for underlying C++ part which stays alive, Python part is destroyed when it will out of scope, e.g. when function ends. As result it is not possible to emit signals from finished().

Test plugin attached. Install and activate this plugin, run task from the menu "Plugins → Test → Test". Task starts, but when it is finished there is no messages in the log about completion or failure.

Is this bug or maybe my code is wrong?

tasktest.zip - Test plugin (1.3 KB) Alexander Bruy, 2018-07-04 12:51 PM


#1 Updated by Alexander Bruy over 5 years ago

Probably somehow related issue #19267

#2 Updated by Alexander Bruy over 5 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF