aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* doc: fix some more typosSergio Ahumada2012-09-103-3/+3
| | | | | Change-Id: I7fa055049b9e5900d597754c6004febb153de12b Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* doc: fix some typos in .cpp filesSergio Ahumada2012-09-075-6/+6
| | | | | Change-Id: Ica7685aefde84ec80d8af7a67541af454de4adce Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Doc: Use settings from global qdocconf.Casper van Donderen2012-09-051-52/+4
| | | | | | | Depends on the integration of #34077 Change-Id: I188d7617c4805d00226d0fb8d5768a02d24c6933 Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
* Delete weak JS objects on exit right awayThomas McGuire2012-08-311-1/+4
| | | | | | | | | This reduces memory leaks on exit when the engine is destroyed after exec() has finished. Change-Id: I917d103966d55b4dd3ba4e986ff902e29d8fb0ac Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Evaluate bindings more intelligently during constructionAaron Kennedy2012-08-2917-123/+318
| | | | | | | | | | | | | | | | | Instead of just evaluating bindings in a fixed order, and possibly having to evaluate a single binding multiple times, prior to reading a property, we check if there are any bindings "pending" on it and evaluate them then. A pending binding is one that has been assigned to the property, but not yet evaluated. To minimize side effects we only do this for "safe" bindings. A safe binding is one that has no side effects, which we currently define as not calling functions or otherwise assigning values during its evaluation. This isn't an entirely foolproof way to ensure that the evaluation has no side effects, but it should be good enough. Change-Id: I98aa76a95719e5d182e8941738d64f8d409f404a Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix compiler warnings from MSVC2010Kai Koehne2012-08-281-0/+5
| | | | | Change-Id: I44eb0113374c221a166609c4fd29b5dad05ecc94 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Console API: Print JS objectAurindam Jana2012-08-281-12/+23
| | | | | | | | | Calling console.log(), console.debug(), print() etc would only print out "Object" if a JS Object was passed as an argument. This patch calls the toString() on the object. Change-Id: Iadf8b4d1fe81c3e2c7bd65e3c153a930fd994bef Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix property overriding lookup to exclude functionsv5.0.0-beta1Matthew Vogt2012-08-281-8/+28
| | | | | | | | Function overriding is required by QmlTest, and is likely to be used by other existing QML users. Change-Id: I04086a933456145bda5cede74aba753799feb555 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Reduce memory usage of QV4Bindings::Subscription by 8 bytes.Thomas McGuire2012-08-282-18/+50
| | | | | | | | | | There is no need to store the method, as it can be calculated via pointer arithmetic. That leaves the active flag, which now is the last bit of the bindings pointer. Change-Id: I17b443e63be2d950aa80ad15cc76372b415c3dd6 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Docs - add missing images and code, clean up sectionsBea Lam2012-08-287-23/+23
| | | | | | | | | | Includes the removal of concepts/modelviewsdata/localstorage.qdoc since that is a duplicate of the existing Local Storage module docs. Also removes classes from whatsnew.qdoc that are internal. Change-Id: I4170c1797bbec09bb67784b0b2ad67fd990365a8 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Document the current behavior of overridden propertiesMatthew Vogt2012-08-281-0/+50
| | | | | Change-Id: I0d9cf0285824e05b846ffeca2d26fe573f93ccf4 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Doc: Clarify ownership semantics of objects returned by property gettersThomas McGuire2012-08-281-2/+4
| | | | | Change-Id: I8d19756e95ff02ed67b39ba4741aff4fda5896ce Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix various doc errorsBea Lam2012-08-287-21/+31
| | | | | | | | Also restore the main module "reference documentation" links added in 0e0f46c01cf6a183996d36c31987ca4a46b50bd9 Change-Id: I421f5a17e2946a2569537d8ba8a021f219aaf75a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Refactor QQmlPropertyCacheMethodArguments creation.Michael Brasser2012-08-282-57/+24
| | | | | Change-Id: Ic7215741b26ddf0a36181cf7c7daaff095e797da Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Fix leak introduced in 0853343c33e394f35c31c161b019b2aed17f9256.Michael Brasser2012-08-282-7/+12
| | | | | Change-Id: I7e23f2ba8e7ecbcfaddce1ac4224434aa5fbe69b Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Refactor singleton type registration codeChris Adams2012-08-2820-427/+370
| | | | | | | | | | | Previously each singleton type was registered as an implicit separate import. This commit changes the code so that these types are treated just like any other type in the registration sense. It also ensures that singleton types are instantiated per-engine. Change-Id: I5c81c4ca5bf65210f7125d74a62a282a21838068 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Update usage of smooth and antialiasing.Michael Brasser2012-08-283-3/+3
| | | | | | Change-Id: Icc8b28bdd466389ed3f269f076f1bdb6e9abe3f2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Improve docs related to visual parent conceptBea Lam2012-08-282-1/+2
| | | | | Change-Id: I73cc63c8a55cf949b94a2fa502cb331fb8adbda3 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Clean up structure of JavaScript related docsBea Lam2012-08-287-116/+136
| | | | | | | | | | | | | | | | The global object and list of javascript functions should be linked to as subsections from the "JavaScript Host Environment" topic page, and all of the subsections should be visible from the module index page. Also move the "restrictions" docs to this topic page as it's more relevant to this section. Also includes some minor doc improvements. Task-number: QTBUG-26380 Change-Id: Iba6e4e510191bf5e4603d6cbb2826ad7bcdbd10c Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Move data ownership docs and improve docsBea Lam2012-08-282-45/+39
| | | | | | | Move data ownership docs to where they can be found more easily. Change-Id: Id5262cee9b082bc472e4b6ccea853c57e66489ac Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Move the Property Modifier Type documentationChris Adams2012-08-275-69/+89
| | | | | | | | | | | Property Modifier Types are just another sort of QML object type, and don't deserve explicit top-level documentation. This commit moves the docs into the object types documentation, and adds documentation to the syntax page about the "<PropertyModifierObject> on <propertyName>" syntax. Change-Id: Ia9b707739b562d2c8b75fa99b88795ba4d415cf7 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Restrict v8 property lookup to the execution contextMatthew Vogt2012-08-2718-482/+562
| | | | | | | | | | | | | When resolving property names, only properties known to the current context of execution should be available. If a property name has been overriden by a component extension, code executing in the context of the base component should resolve the property name to the property available inside the base component or its bases. Task-number: QTBUG-24891 Change-Id: I9687cc28e108226d5a939627a901c8254344b598 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Immediatley delete QV8QObjectResource objects to reduce memory leaksThomas McGuire2012-08-241-2/+6
| | | | | | | | | | This reduces memory leaks when deleting the v8 engine. Otherwise, the memory would only be reclaimed during a full GC run, which might not happen at all. Change-Id: Iac34bad1f2280adc530d3b3d7a074c5d022005a4 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Document the vTable hack.Thomas McGuire2012-08-241-0/+8
| | | | | | | This was not immediately obvious, so better document this clever trick. Change-Id: I0d4a06396b9a709b29b46726d9a65d53600e3fa2 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix warnings in QtQmlMatthew Vogt2012-08-245-11/+14
| | | | | Change-Id: Ibba3b8e878257f7019bdc90a1344462b77f95a21 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix doc linksBea Lam2012-08-241-1/+1
| | | | | Change-Id: Iafbcd39472f3e6f12169ae1a17b4a040dbb9a8a4 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Avoid dynamic lookup of signal handler argumentsMichael Brasser2012-08-2414-286/+464
| | | | | | | | | | | Rewrite signal handlers to include the parameters in the rewrite. Also check whether parameters are actually used when possible, and if not don't provide them to the expression. Change-Id: I7d65c05f4639979dd61035cf7478119ef7647c25 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Increase test coverage for V4Matthew Vogt2012-08-235-4/+48
| | | | | | | | Add test for integer operations, Math functions and exercise some previously uncovered code. Change-Id: Idff3f3672498775ac117ca98bf34b0fe96cbf760 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Doc: Tidied links, titles, and HTML pages.Jerome Pasion2012-08-233-24/+14
| | | | | | | | -used "Qt Quick" and "Qt QML" to refer to the module -qtquick-index.html and qtqml-index.html for the landing pages Change-Id: I1569949f7875ac6008a5b80a169e327f93f330ae Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Make connectNotify() work with QMLThomas McGuire2012-08-2210-45/+122
| | | | | | | | | Call connectNotify() and disconnectNotify() in QQmlNotifierEndPoint, which works for QML signal handlers and for QML bindings. Task-number: QTBUG-11284 Change-Id: Ic9a08ee6687e5c7e606f315c8fb30eec1493cd83 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Trim trailing whitespace.Stephen Kelly2012-08-226-73/+73
| | | | | Change-Id: I3d268d3ce8d73c7287f51abe9a28c165cb75acb9 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix signal offset in dynamic sig param lookupChris Adams2012-08-221-3/+2
| | | | | | | Related to 4317c442fd492121e2fc037a39b40653bbc34294 Change-Id: I6aa505b9dc13813d4996c0b5761e9c3e5eea0292 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Export QV8ValueTypeWrapper.Aaron McCarthy2012-08-221-1/+2
| | | | | | | This is required to implement value types in other modules. Change-Id: I0d59abb321b046efbaa73a5dcd24b72ee343fba7 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix snippets to compile to ensure they are validBea Lam2012-08-2221-851/+20
| | | | | | | | | Also deletes snippets that are no longer used by docs. Task-number: QTBUG-26637 Change-Id: I63e129f3169ae78aeb7ac840b6f5b5925dbd06b4 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix V4 calculations that vary from V8 resultsMatthew Vogt2012-08-222-8/+100
| | | | | | Task-number: QTBUG-24706 Change-Id: I4475a772c5cd92776f2cb73dab9bc06ae4c019fa Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix compilation on Linux with gcc-4.6Sean Harmer2012-08-211-7/+10
| | | | | | | | | Also make use of the seed. Change-Id: I03bd961489d95504bf973c02d51979904fbd9b1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use object identity to detect cycles in JS-to-C++ type conversionKent Hansen2012-08-204-34/+39
| | | | | | | | | | | | | | | | | | | | | | | | The documentation for v8::Object::GetIdentityHash() states that the hash value is not guaranteed to be unique (the current implementation just returns a random number). Hence, the hash value should not be used to determine whether an object has already been visited during type conversion; in the worst (and non-deterministic) case, the conversion will be "cut off" prematurely (due to identical hash values for two different objects), resulting in data loss. Instead, represent the visited objects as a set of V8 object handles. This is safe since the type conversion is always done on the stack, within a handle scope. Use v8::Object::GetIdentityHash() merely to implement the qHash() specialization needed for the set. V8 already provides an operator==() for handles, and it is documented to return true "if the objects to which they refer are identical", which is the behavior required by the set implementation. Task-number: QTBUG-21681 Change-Id: I1f2a1eee8f7c197c02c2ffeaaa1fc0274e8ab740 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Get rid of engine-wide state of visited objects for type conversionKent Hansen2012-08-204-42/+58
| | | | | | | | Pass the state through to internal conversion functions instead. Change-Id: Ifab9a9472d7271ee5da103ed915427dfd4f2b15b Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add missing QT_{BEGIN,END}_NAMESPACEKent Hansen2012-08-171-0/+4
| | | | | Change-Id: Id924df99bd000ca5e7ffbef122c0087733f53685 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Reduce memory consumption in QV4Bindings::BindingMatthew Vogt2012-08-174-64/+54
| | | | | | | | As with QV8Bindings::Binding, access details from the QML IR instruction object rather than storing a copy of the values. Change-Id: I2b629ee1b06ed74c7b38e6d047ef6a98acd45086 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Document QJSEngine's lack of exception handling APIKent Hansen2012-08-161-3/+7
| | | | | | | | | | | | Since we consider throwing non-Error values an edge case, we decided not to add a an exception handling API (like QScriptEngine::hasUncaughtException() or v8::TryCatch) yet. Document this limitation in QJSEngine::evaluate(). Task-number: QTBUG-25857 Change-Id: I7f4869a152f176e613e3e8d2f81efeae198bd560 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Fix crash in signal change notification overrideChris Adams2012-08-161-7/+45
| | | | | | | | | | | | | | | Manual overrides of automatically generated property change notification signals can cause crashes. They also don't work properly in the situations where they don't crash. This patch ensures that it is now a compile error to attempt to override a signal with a manual signal or slot. Note that this includes signals defined in superclasses. Task-number: QTBUG-26723 Task-number: QTBUG-26818 Change-Id: I4ecf448ce9de5d97526606126991e280debea2d6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Reduce memory consumption of source coordinatesMatthew Vogt2012-08-1636-156/+186
| | | | | | | | | | Reduce memory consumption by storing source location coordinates as 16-bit variables (in run-time structures). Also modify qmlmin to restrict line lengths so that the column bound is not normally exceeded. Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove the use of QWidgetStar from QtQml.Stephen Kelly2012-08-153-14/+3
| | | | | | | | | The enum value can be removed so that it can be replaced in functionality with QMetaType::PointerToQObject. There is no advantage to QtDeclarative knowing that a value is a QWidget pointer. Change-Id: I14530132bc37fbb0dc55ba8aaa5bb68db0d87bad Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* make use of QT_PRIVATE to specify private Qt dependenciesOswald Buddenhagen2012-08-111-3/+1
| | | | | Change-Id: Ia6bf273ff8ed63e13ea9f5c469b5f8e2702a4ee7 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* follow rename of qt_module_config.prf to qt_module.prfOswald Buddenhagen2012-08-111-1/+1
| | | | | Change-Id: I8a13b3aca195b9e8331478d73cd338ab66d65d1f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Permit value types with metatype IDs >= QMetaType::UserMatthew Vogt2012-08-1019-207/+201
| | | | | | | | | Remove the assumption that value types must be types defined by Qt, having metatype IDs below QMetaType::User. Task-number: QTBUG-26352 Change-Id: Ib5a56ff2e7892e82adf17a3a1e7517a0c9fe0534 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove remnants of QQmlImageProviderKent Hansen2012-08-091-1/+0
| | | | | | | | QQmlImageProvider was renamed to QQuickImageProvider quite some time ago. Change-Id: I2f737f1e2a543c0abb0f45170499c41de25cf696 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Improve main QtQml and QtQuick doc pagesBea Lam2012-08-091-49/+33
| | | | | | | | | | | Make the content of the two pages more consistent with one another. Also improve the reference documentation sections and fix some links. Also the apireferences.qdoc page is not necessary. Change-Id: I01c5b3757c2ec03b1365e4c9c348e33e06f8315f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix default property docsBea Lam2012-08-091-8/+5
| | | | | | | Item's default property is data. Change-Id: I60577f4cfbe954ab3311703915f43fecf4ed9bf2 Reviewed-by: Bea Lam <bea.lam@nokia.com>