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

[qmltc] cannot resolve alias into component

    XMLWordPrintable

Details

    • 259ff52e64 (qt/qtdeclarative/dev) 259ff52e64 (qt/tqtc-qtdeclarative/dev) 15d2388512 (qt/qtdeclarative/6.4) 15d2388512 (qt/tqtc-qtdeclarative/6.4) 15d2388512 (qt/qtdeclarative/6.4.1)

    Description

      MainComponent.qml:

      import QtQuick
      import BugCore 1.0
      
      Item {
          property alias myName: firstComponent.text
      
          SubComponent{
              id: firstComponent
          }
      }
      

      SubComponent

      import QtQuick
      
      Item {
          property alias text: comp.text
      
          Text {
              id: comp
          }
      }
      

      gives me:

      [1/17 35.2/sec] Compiling qt/MainComponent.qml with qmltc
      FAILED: .qmltc/BugCore/maincomponent.h .qmltc/BugCore/maincomponent.cpp /home/tim/build/build-qt-bug-gcc_12-Debug/.qmltc/BugCore/maincomponent.h /home/tim/build/build-qt-bug-gcc_12-Debug/.qmltc/BugCore/maincomponent.cpp 
      cd /home/tim/build/build-qt-bug-gcc_12-Debug && /usr/bin/cmake -E make_directory /home/tim/build/build-qt-bug-gcc_12-Debug/.qmltc/BugCore && /home/tim/bin/qt-6.4.0/bin/qmltc --bare --header /home/tim/build/build-qt-bug-gcc_12-Debug/.qmltc/BugCore/maincomponent.h --impl /home/tim/build/build-qt-bug-gcc_12-Debug/.qmltc/BugCore/maincomponent.cpp -i /home/tim/build/build-qt-bug-gcc_12-Debug/Qml/BugCore/qmldir -I /home/tim/bin/qt-6.4.0/qml --resource /home/tim/build/build-qt-bug-gcc_12-Debug/.rcc/qmake_BugCore.qrc --resource /home/tim/build/build-qt-bug-gcc_12-Debug/Qml/BugCore/BugCore_qml_module_dir_map.qrc --resource /home/tim/build/build-qt-bug-gcc_12-Debug/.rcc/BugCore_raw_qml_0.qrc --resource /home/tim/build/build-qt-bug-gcc_12-Debug/Qml/BugCore/.qmltc/BugCore/BugCore_qmltc_file_map.qrc /home/tim/dev/qt-bug/qt-bug/qt/MainComponent.qml
      Error: /home/tim/dev/qt-bug/qt-bug/qt/MainComponent.qml:4:1: Cannot resolve alias "myName"
      Item {
      ^^^^
      

      see attached reproducer

      Attachments

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

        Activity

          People

            sami.shalayel Sami Shalayel
            timblechmann tim blechmann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes