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

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

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes