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

[qmltc] Compilation errors when building a QML component with aliased attached property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.8.1, 6.8, 6.9.0 FF
    • 6.7.3, 6.8.0
    • QML: Compiler
    • None
    • All
    • de1101c3a (dev), 87a3058e7 (6.8)

    Description

      There are C++ compilation errors when building a QML component with aliased attached property.

      Sample code:

      import QtQuick
      import QtQuick.Templates as T
      
      T.Popup {
          T.Overlay.modal: Rectangle {
              color: 'grey'
          }
      }
      

      QML type compiler generates code

      ...
          QQuickOverlayAttached * m_T.Overlay = nullptr;
      ...
      

      Which naturally produces compilation errors:

      .qmltc\test\mypopup.h(123): error C3551: if a trailing return type is used then the leading return type shall be the single type-specifier 'auto' (not 'overloaded function type')
      .qmltc\test\mypopup.h(123): error C3484: syntax error: expected '->' before the return type
      .qmltc\test\mypopup.h(123): error C3613: missing return type after '->' ('int' assumed)
      .qmltc\test\mypopup.h(123): error C3646: 'Overlay': unknown override specifier
      

      See standalone example test.zip

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              studiosus Vladimir Belyavsky
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes