Hi, On Friday 12 October 2012 12:16:26 [email protected] wrote: > On 11/10/2012, at 3:04 PM, ext Thomas McGuire wrote: > > the QML engine "freezes" the global JS object. This is apparently(?) to > > prevent accidental writes to the global object. For those who don't know, > > the global object in JS provides objects and properties available in > > global scope, such as "console" (for console.log) or "qsTr". > > In addition preventing the common errors that a mutable global object > causes (try running common JS libraries and see how many of them > accidentally modify the global object because they forgot to put a "var" > somewhere),
Ah, I see, I didn't know enough about JS to know that this would create a global variable/property. > a mutable global object would prevent QML from optimising any > bindings as it cannot be sure of the names in any given scope. You mean v4 optimizations? Isn't the global object last in the scope lookup, so this doesn't matter? Anyway, I can see why the global objects is frozen, I just wish there'd be some way to get rid of the 100ms penalty of this. Regards, Thomas -- ** Qt Developer Conference: http://qtconference.kdab.com/ ** Thomas McGuire | [email protected] | Software Engineer KDAB (Deutschland) GmbH&Co KG, a KDAB Group company Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-independent software solutions
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
