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

Obsolete linter/compiler errors on Number.EPSILON

    XMLWordPrintable

Details

    • 59d6cf324 (dev), 030f68acb (6.5)

    Description

      Using a constant from the JS standard api, like so:

      Text {
          text: Number.EPSILON
      }
      

      works perfectly fine, but there is an incorrect warning and error from the qml linter / compiler:

      Warning: main.qml:10:22: Type is a method. You cannot access "EPSILON" from here.
              text: Number.EPSILON
                           ^^^^^^^
      Error: main.qml:10:22: Could not compile binding for text: Cannot generate efficient code for lookup in QJSValue
              text: Number.EPSILON
                           ^^^^^^^
      

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            moerkb Markus Bader
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes