Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-20013

Qt Creator Design mode not displaying appropriate error message(s) on alias property error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • Qt Creator 4.6.0-beta1
    • Quick / QML Support
    • None
    • Qt 5.10.1 Commercial

      Qt Creator 4.5.1

      Mac OS 10.13.3

      Setting "Use QML emulation layer that is built with the selected Qt" is selected.

      If I have a component Example.ui.qml file that references a bad alias like follows:

       

      Item { 
          property alias test: badTest 
          Rectangle { 
              id: test 
              anchors.fill: parent 
          } 
      }
      

      The Designer text editor doesn't indicate an error for badTest. If you open the code-behind file Example.qml, the design view shows a blank placeholder Item and the Navigator shows a caution icon next to the root element with this tooltip message:

      Component with path [...] could not be created. Change the setting "Use QML emulation layer that is built with the selected Qt" might solve the issue.

       

      Ideally, the following would happen:

      • The text editor when used on Example.ui.qml would show the alias value as an error
      • The designer when used on Example.qml would properly report an error about the alias

      Here's debug output from the puppet emulation layer process in the first case:

      Editor Puppet: "<Unknown File>:1: ReferenceError: badTest is not defined"

      Here's debug output from the puppet emulation layer process in the second case:

       

      Editor Puppet: "QQmlComponent: Component is not ready"
      Editor Puppet: "\"/Users/dhess/Desktop/Qt Designer Crash/Crash/ExampleUI.ui.qml\""
      Editor Puppet: "file:///Users/dhess/Desktop/Qt Designer Crash/Crash/ExampleUI.ui.qml:4:26: Invalid alias reference. Unable to find id \"badTest\" "
      Editor Puppet: "         property alias test: badTest "
      Editor Puppet: "                              ^" 
       

      The example project referenced is attached to this issue.

       

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

            thohartm Thomas Hartmann
            dhess David Hess
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes