mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Abort request when PackageList gets deleted
This is a consequence of lazy loading and the re-loading we do when the Marketplace window gets closed. This solves a crash with reproduction steps: 1. Open the Marketplace. 2. Quickly close the Marketplace. 3. Quickly re-open the Marketplace. 4. The API responds to the request made by the first opening of the Marketplace. This crashed because when the Marketplace first opened, it made a request to the API with the HttpRequestManager. This request takes a while to respond to. If you close and re-open the Marketplace, the PackageList gets destroyed and a new one gets made. The HttpRequestManager eventually gets a response and wants to call the callback of the first PackageList, but that one got destroyed in the Qt engine so it'll throw an error saying that the object doesn't exist any more. Contributes to issue CURA-8557.
This commit is contained in:
parent
4b86f7bb29
commit
3e64b7cb66
2 changed files with 30 additions and 15 deletions
|
@ -14,6 +14,7 @@ ScrollView
|
|||
property alias model: pluginColumn.model
|
||||
|
||||
Component.onCompleted: model.request()
|
||||
Component.onDestruction: model.abortRequest()
|
||||
|
||||
ListView
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue