Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85938

Loader status unexpected

    XMLWordPrintable

Details

    • All
    • 3aa4cd682f52b70803cc3f72d732bde9987677dd (qt/qtdeclarative/dev) 3d195d33ece3f8fd7cd7d8e6163fe038fc7fc036 (qt/qtdeclarative/dev) d535b85a84ee89530a80b606701910a90681bdce (qt/qtdeclarative/5.15)

    Description

      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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            moerkb Markus Bader
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes