Skip to content

Fix crash on viewspace close

Waqar Ahmed requested to merge work/vs-fix into master

When we close a viewspace, we delete all the widgets implicitly (they are part of QStackWidget which controls their lifetime). Moving around widgets doesn't make much sense so instead, just skip them and let them be killed.

Added a related test case.

As a drive-by, I discovered that there was still a check in place which would prompt you and make sure you wanted to close the viewspace if the viewspace has widgets. This is kind of wrong as we don't need to do this. We should call the widget's shouldClose method and the widget should prompt the user if necessary.


Second commit:

The assert should check "source" viewspace, not activeViewspace. Source might not be active anymore.

#110 (closed)

Merge request reports