Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10550

Adding a missing import in a QML file results into asserts and inconsistent model state

XMLWordPrintable

    • macOS, Windows

      Build QDS in Debug mode
      Adding a missing import will cause a respective QML type known to the model and go into an inconsistent state as some of the properties are now parsed as bindings that were not before. 

      Example:

      import QtQuick
      
      Rectangle {
          id: myRect
          property color testcustom: "#acacac"
          width: 675
          height: 636
      
          Button {
              id: button
              width: 120
              height: 40
              text: "Test"
              anchors.centerIn: parent
          }
      }
      

      Consider the code above. The type Button is unknown to model as "import QtQuick.Controls" is missing.
      Now add the import i.e. components > + > "QtQuick.Controls"

      QDS should crash because of assertions at ModelValidator::shouldBeBindingProperty(...)

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

            thohartm Thomas Hartmann
            vikas Vikas Pachdha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes