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

qmllint: incorrectly warns when using a function in a javascript library

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.7, 6.8.0 FF
    • 6.6.1
    • QML: Tooling
    • None
    • All
    • d2d71f77a (dev)

    Description

      The attached project complains with

      Warning: /Users/user/untitled/Main.qml:12:26: Member "setColorAlpha" not found on type "undefined" [missing-property]
              color: Functions.setColorAlpha(Qt.color("orange"), 0.15)
                               ^^^^^^^^^^^^^

      when running all_qmllint

       

      the JS library is imported with

      import "SharedFunctions.js" as Functions

       

      and added into the qml module

      qt_add_qml_module(appuntitled
          URI untitled
          VERSION 1.0
          QML_FILES Main.qml SharedFunctions.js
      )

       

      So it is my understanding this should work fine.

      Attachments

        1. untitled.zip
          2 kB
          Albert Astals Cid

        Issue Links

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

          Activity

            People

              sami.shalayel Sami Shalayel
              albert.astals.cid.avid Albert Astals Cid
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes