Priority: P3: Somewhat important
Affects Version/s: 5.15.0
Fix Version/s: None
Component/s: Quick: Core Declarative QML
Commits:3aa4cd682f52b70803cc3f72d732bde9987677dd (qt/qtdeclarative/dev) 3d195d33ece3f8fd7cd7d8e6163fe038fc7fc036 (qt/qtdeclarative/dev) d535b85a84ee89530a80b606701910a90681bdce (qt/qtdeclarative/5.15)
I have found the status property of the Loader component contradicts the expectation while unloading in two cases. Please find the attached minimal example to reproduce the behavior.
Precondition: Some component has been loaded in the Loader by setting its source property to an url (e.g. setSource('qrc:/OtherComponent.qml')).
When setting the source to an empty string (setSource('')), the status stays on its previous value, whatever that may be. I would expect it to be Loader.Null, because no component is currently loaded, or Loader.Error, because the source "empty string" cannot be found. The item is unloaded btw, but the status does not change.
In a second case, the loader's source is set to undefined (setSource()). According to the documentation, this shall unload the component - and it does. But the status is set to Loader.Error. I would expect it to be Loader.Null as it has been properly unloaded.
|For Gerrit Dashboard: QTBUG-85938|
|310383,4||QQuickLoader: make sure the status property change properly||dev||qt/qtdeclarative||Status: MERGED||+2||0|
|310384,4||QQuickLoader: make sure the status property change properly||dev||qt/qtdeclarative||Status: MERGED||+2||0|
|310979,2||QQuickLoader: make sure the status property change properly||5.15||qt/qtdeclarative||Status: MERGED||+2||0|
|310981,3||QQuickLoader: make sure the status property change properly||5.15||qt/qtdeclarative||Status: MERGED||+2||0|