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

[REG 5.9 -> 5.11] qtquickcompiler breaks JS .import statements

    XMLWordPrintable

Details

    • 0a2aaee61cfc2888bc71f54ac5b165d248cbf5e8

    Description

      Hello,

      When trying to upgrade from Qt 5.9 to Qt 5.11, with qtquickcompiler enabled, I faced a strange situation where the following code does not work properly:

      .pragma library
      .import "TimerFactory.js" as Timers
      
      // ...
      
                  Timers.setTimeout(function() {
                      resolve(arguments)
                  }, value.__delay);
      

      It gives the error "ReferenceError: Timers is not defined".

      I don't have this error when I disable qtquickcompiler. I still have it when I change the import to have a full path with "qrc:///" for example.

      Any idea?
      Regards,
      Louis

      Attachments

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

        Activity

          People

            shausman Simon Hausmann
            amnell Louis du Verdier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes