Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] VizRankDialog: Stop computation when parent widget is deleted #2118

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

VesnaT
Copy link
Contributor

@VesnaT VesnaT commented Mar 17, 2017

Issue
Description of changes
Includes
  • Code changes
  • Tests
  • Documentation

@astaric
Copy link
Member

astaric commented Mar 17, 2017

@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?

@janezd
Copy link
Contributor

janezd commented Mar 17, 2017

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.

Copy link
Member

@astaric astaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-io
Copy link

codecov-io commented Mar 24, 2017

Codecov Report

Merging #2118 into master will decrease coverage by 0.96%.
The diff coverage is 60%.

@@            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     +528

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32a022b...cd3b71a. Read the comment docs.

@astaric astaric changed the title VizRankDialog: Destroy vizrank when parent widget is deleted VizRankDialog: Stop computation when parent widget is deleted Mar 30, 2017
@astaric astaric changed the title VizRankDialog: Stop computation when parent widget is deleted [FIX] VizRankDialog: Stop computation when parent widget is deleted Mar 30, 2017
@astaric astaric merged commit 407db85 into biolab:master Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants