Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0 Beta 1, 5.12.0 Beta 2
-
None
-
aabf4e4f0474d8d6eb065fbab700432718070ae0 (qt/qtdeclarative/5.12)
Description
If a property in the global scope has the same name as a local function, QML trys to call property instead of the local function. This worked fine in Qt before 5.12.
Example:
import QtQuick 2.5 Item { property bool testFunc Item { function testFunc2() { console.log("testFunc2 called") } function testFunc() { console.log("testFunc called") } Component.onCompleted: { testFunc2() testFunc() // works fine before Qt 5.12 } } }
// Qt 5.11.2 output: testFunc2 called testFunc called // Qt 5.12 output testFunc2 called Test.qml:17: TypeError: Property '42' of context object is not a function
Attachments
Issue Links
- resulted from
-
QTBUG-70315 REG: Performance regressions in JavaScript
- Closed
For Gerrit Dashboard: QTBUG-71204 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
243359,2 | Fix lookup of methods in the scope object | 5.12 | qt/qtdeclarative | Status: MERGED | +2 | 0 |