Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
5.0.0
-
None
Description
When building the qtquick2-integration branch inside the qt-lighthouse rep, there is a change in how the scope of an imported javascript file works compared to qt-4.7. I think the best way to explain the bug is just to run the simple example below to trigger the bug:
// ui.js var WIDTH = 240 var HEIGHT = 230 // tools.js function getWidth() { return UI.WIDTH } // main.qml import Qt 4.7 import "ui.js" as UI import "tools.js" as Tools Text { width: UI.WIDTH height: UI.HEIGHT text: "Click to trigger bug!" MouseArea { anchors.fill: parent onClicked: console.debug(Tools.getWidth()) } }