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

QQmlComponent is unusable after initial property errors

    XMLWordPrintable

Details

    • 79f9e22ef7 (qt/qtdeclarative/dev) 79f9e22ef7 (qt/tqtc-qtdeclarative/dev)

    Description

      If invalid properties are passed to QQmlComponent::createWithInitialProperties or QQmlComponent::setInitialProperties, QQmlComponent goes into the error state and is impossible to use again. See the attached testcase.

      Those properties are set for a single instance, so I wouldn't expect them to break the component.

      A workaround is to reach into QQmlComponentPrivate and clear the errors after that happens:

      QQmlComponentPrivate::get(component)->state.errors.clear();
      

      Attachments

        For Gerrit Dashboard: QTBUG-101439
        # Subject Branch Project Status CR V

        Activity

          People

            agolubev Andrei Golubev
            special John Brooks
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes