summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeexpression.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Allow property bindings to be easily created from JavaScriptBea Lam2011-01-271-1/+40
| | | | | | | | Properties can now be assigned a function that returns the binding value. Task-number: QTBUG-14964 Reviewed-by: Aaron Kennedy
* Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | Reviewed-by: Trust Me
* Replace all occurances of "Qt 4.7" with "QtQuick 1.0"Aaron Kennedy2010-09-291-1/+1
| | | | | Task-number: QTBUG-13799 Reviewed-by: Martin Jones
* Re-enable script program caching on Symbian (used to be disabled due to ↵Joona Petrell2010-08-051-4/+0
| | | | | | | crash problems that no longer occur). Task-number: QTBUG-12599 Reviewed-by: Martin Jones
* QtDeclarative: Give name to function bindings and signals.Olivier Goffart2010-07-281-0/+1
| | | | | | | | Currently, bindings and signals are annonymous javascript functions. If one give them a name, a proper name is then shown in the javascript debugger. Reviewed-by: Aaron Kennedy
* Split responsibilities in QDeclarativeExpression more cleanlyAaron Kennedy2010-07-141-219/+259
|
* doc improvementsBea Lam2010-07-061-1/+23
|
* Use custom static scopes to improve QML/JavaScript performanceKent Hansen2010-06-251-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a new internal JS object type, QScriptStaticScopeObject, that enables the JS compiler to make more aggressive optimizations of scoped property access. QScriptStaticScopeObject registers all its properties in a symbol table that the JS compiler has access to. If the compiler finds the property in the symbol table, it will generate the fast index-based op_{get,put}_scoped_var bytecodes, rather than the dynamic (slow) op_resolve and friends. If the compiler _doesn't_ find the property in the symbol table, it infers that it's safe to skip the scope object when later resolving the property, which will also improve performance (see op_resolve_skip bytecode). QScriptStaticScopeObject is only safe to use when all relevant properties are known at JS compile time; that is, when a function that has the static scope object in its scope chain is compiled. It's up to the user of the class (e.g. QtDeclarative) to ensure that this constraint is not violated. The API for constructing QScriptStaticScopeObject instances is not public; it lives in QScriptDeclarativeClass for now, an internal class exported for the purpose of QML. The instance is returned as a QScriptValue and can be manipulated like any other JS object (e.g. by QScriptValue::setProperty()). The other part of this commit utilizes QScriptStaticScopeObject in QtDeclarative in the two major places where it's currently possible: 1) QML disallows adding properties to the Global Object. Furthermore, it's not possible for QML IDs and properties to "shadow" global variables. Hence, a QScriptStaticScopeObject can be used to hold all the standard ECMA properties, and this scope object can come _before_ the QML component in the scope chain. This enables binding expressions and scripts to have optimized (direct) access to e.g. Math.sin. 2) Imported scripts can have their properties (resulting from variable declarations ("var" statements) and function declarations) added to a static scope object. This enables functions in the script to have optimized (direct) access to the script's own properties, as well as to global properties such as Math. With this change, it's no longer possible to delete properties of the Global Object, nor delete properties of an imported script. It's a compromise we make in order to make the optimization safe. Task-number: QTBUG-8576 Reviewed-by: Aaron Kennedy Reviewed-by: Olivier Goffart Reviewed-by: Jedrzej Nowacki
* Add parent parameter to QDeclarativeExpression constructor.Michael Brasser2010-05-181-8/+10
| | | | Also rearrange the parameter order to be more clear.
* Suppress transient errors from bindingsAaron Kennedy2010-04-291-1/+3
| | | | | | | If a binding generates > 1 transient error, only the first was being suppressed. QTBUG-10274
* Use Q_DECLARE_PRIVATE for private slot.Michael Brasser2010-04-221-4/+4
|
* Rename QDeclarativeExpression::value() to evaluate().Michael Brasser2010-04-221-8/+8
| | | | | QDeclarativeExpression can be used to evaluate any sort of expression, not just those returning a value.
* Emit runtime warnings through QDeclarativeEngineAaron Kennedy2010-04-191-3/+2
| | | | QTBUG-9726
* Reduce warnings at shutdownAaron Kennedy2010-04-141-1/+1
| | | | QTBUG-9799
* Fix qdeclarativeecmascript::arrayExpression() testAaron Kennedy2010-04-081-1/+1
|
* Cleanup handling of errors in bindings and scriptsAaron Kennedy2010-04-081-45/+26
| | | | | | | | | | | | | QML used to silently ignore a log of errors - such as a failed assignment to a QObject property. These errors are now all reported as exceptions in JavaScript. Other questionable activities, like assigning a JavaScript array to a "property var" property which appeared to work, thanks to QtScript's transparent conversion of arrays to a QVariantList, are now blocked entirely. QTBUG-9152 QTBUG-9382 QTBUG-9341 QTBUG-6886
* Update #include of private headers in QtDeclarativeThiago Macieira2010-04-021-6/+6
| | | | | Always use private/. The WinSCW compiler doesn't search the current directory, for whatever reason.
* Remove dead performance measurement code from QMLAaron Kennedy2010-03-221-8/+0
|
* Fix crashAaron Kennedy2010-03-171-0/+1
| | | | | | If the notifier gets swapped out during emitting, the endpoint is also invalidated. Thus the "disconnected" writeback must track the endpoint not just the Notifier.
* CrashAaron Kennedy2010-03-171-1/+7
|
* Optimization: Reduce unnecessary QObject allocationsAaron Kennedy2010-03-171-29/+39
|
* Optimization: Use id notifier for QtScript bindingsAaron Kennedy2010-03-171-1/+23
|
* Merge remote branch 'qt/4.7' into qml-4.7Qt Continuous Integration System2010-03-101-13/+14
|\ | | | | | | | | Conflicts: src/declarative/util/qdeclarativestateoperations.cpp
| * doc: Fixed several qdoc errors.Martin Smith2010-03-091-13/+14
| |
* | Unify binding optimizer and QtScript binding signal management logicAaron Kennedy2010-03-101-108/+45
|/
* Save secondary scope inside the expression's scope objectAaron Kennedy2010-03-031-16/+25
| | | | | | | This prevents the secondary scope from contaminating scopes outside itself when used as a signal expression. QTBUG-8641
* Move JS global scope to top of the QML scope chainAaron Kennedy2010-03-031-0/+5
| | | | QT-2787
* Change class prefix to from QmlXXX to QDeclarativeXXX, QmlGraphicsXXX to ↵Warwick Allison2010-02-241-0/+810
QDeclarativeXXX.