[FIX] VizRankDialog: Stop computation when parent widget is deleted#2118
[FIX] VizRankDialog: Stop computation when parent widget is deleted#2118astaric merged 1 commit intobiolab:masterfrom
Conversation
|
@janezd what about widgets emitting the signals and vizrank subscribing to them? Is there a special reason why vizrank did not use that in the first place? |
|
It would work almost exactly the same, except that we'd have to define a signal, emit it and then write a method that receives it ... and finally sets exactly the same flag that is now set directly by the widget. The problem here is not the communication but synchronization, that is, what happens if the widget is torn down before vizrank reacts, so vizrank tries to communicate with a widget that Qt already killed, and so forth. Signals wouldn't solve this. |
astaric
left a comment
There was a problem hiding this comment.
The change crashes orange on my computer. The problem is in vizrank.deleteLater(), which deletes the widget before the computation continues, so the last step of computation (selecting the first row an removing progress percentage from caption) fails. If I remove the offending line, everything seems to work.
Codecov Report
@@ Coverage Diff @@
## master #2118 +/- ##
==========================================
- Coverage 71.49% 70.52% -0.97%
==========================================
Files 318 318
Lines 54423 54424 +1
==========================================
- Hits 38908 38381 -527
- Misses 15515 16043 +528Continue to review full report at Codecov.
|
Issue
Description of changes
Includes