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

Js file in Qml module does not respect import namespace

    XMLWordPrintable

Details

    Description

      while importing module like

      import MyModule 1.0 as Lol
      

      Qml components are available only by Lol namespace. But javascript files are available with namespace prefix and without it.

      Thus bug shows up when I defined my custom Math.js file, and tried to import it within namespace.
      Then any reference to global Math functions results with

      TypeError: Property 'any_Math_function' of object [object Object] is not a function
      

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            travnick Mikołaj
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes