aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* Changed the plugin module nameVenugopal Shivashankar2012-10-291-6/+6
| | | | | | | | | | The earlier name, com.nokia.TimeExample is irrelevant now. Also updated all instances of documentation where this older module name was referred. Change-Id: Ic252d0e72af23c2d39d5fed55f242e47c1b6bde9 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Change qml list interfaceMarco Bubke2012-10-234-11/+54
| | | | | Change-Id: I185c6f4cef6105544504324c1616b5995c219fe3 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Adding invalidate function to QQmlPropertyCacheThomas Hartmann2012-10-232-0/+34
| | | | | | | | This is required for tooling to update a QMetaObject inside a running QQmlEngine. Change-Id: I26d3aeed57d39c361c150261c4e1a84094e6f657 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* QQmlOpenMetaObjectType: extend interface for visual designerThomas Hartmann2012-10-192-0/+21
| | | | | | | | We need those 3 functions to rebuild OpenMetaObject in the visual designer. Change-Id: I70affe5850f46683a049615b3173a4f30c338401 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* We need to export QQmlVMEMetaObject to support the designerThomas Hartmann2012-10-121-1/+1
| | | | | | | | In the designer we need to access QQmlVMEMetaObject. Change-Id: I36627c6ce1c2c27bef8dd85374b65a542b00d1ef Reviewed-by: Aurindam Jana <aurindam.jana@digia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Remove calculateHash functionPeter Varga2012-10-101-79/+3
| | | | | | | This function has been moved into QtV8 module. Change-Id: Ibc5b0a52bd158e8880a10300eb6b89b7f43db0f6 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix QObject::receivers() within connectNotify()Thomas McGuire2012-10-101-2/+6
| | | | | | | | | The receiver count needs to be correct in connectNotify() to be compatible with ordinary connections. Fix this and add test. Change-Id: Icff0486dac49876b8c5d8836a85cff9284368a52 Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Complete QmlJSVisitor for UiParameterListThomas Hartmann2012-10-084-1/+11
| | | | | | | | QmlJS::Visitor was missing the visit for UiParameterList. Change-Id: I3c2cb76b934059ebcef53c1a0faad3f239b33359 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Christian Kamm <kamm@incasoftware.de>
* Fix in QmlJS parser for UiParameterListThomas Hartmann2012-10-012-0/+3
| | | | | | | | | | | | The propertyTypeToken was not initilized in this case. Not having the source location of this token leads to bugs in the tooling. e. g.: QTCREATORBUG-7931 I also added the initializer for program keeping the parser and the grammar in sync. Change-Id: Id7bfb4b6dd1b9689e701a858b6c769d3addab5dc Reviewed-by: Christian Kamm <kamm@incasoftware.de>
* Fix a crash in QQmlPropertyCache::findPropertyJocelyn Turcotte2012-09-282-25/+29
| | | | | | | | | | | | | | | | | | | | | When the top type of a QML component is a C++ type registered with qmlRegisterExtendedType, its QObjectPrivate::metaObject is already a QQmlProxyMetaObject that gets chained as the parent of the QQmlVMEMetaObject of the component. When QQmlPropertyCache::findProperty iterates over the parents chain of a child item, our QQmlProxyMetaObject eventually gets static_casted to QQmlVMEMetaObject and causes a crash. This patch implements a poor man's dynamic_cast in QQmlVMEMetaObject::parentVMEMetaObject to fix the crash. Other casts of parent.asT1() are changed to use parentVMEMetaObject as well even though in those cases the static_cast is guaranteed by the context. Task-number: QTBUG-27334 Change-Id: I5982fc273ccf466960ce54974cff5662e6ab605a Reviewed-by: Matthew Vogt <mattvogt2@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update qMetaType helpers usage.Jędrzej Nowacki2012-09-271-8/+8
| | | | | | | | QtDeclarative is using private meta type api to register custom types, but the helper functions were updated to a new signature. Change-Id: I467b283b5b1ccdad8ebd1a2bb651e8ad59b9c55d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fixed missing virtual destructors in qtdeclarative.Samuel Rødal2012-09-245-3/+14
| | | | | | Change-Id: I0b0e63b572617a56874e27361479de2690644aa3 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Windows CE buildfixAndreas Holzammer2012-09-242-1/+5
| | | | | | | | | Windows CE has a define for CONST, so undef it. Change-Id: I13d363657e91956c611dee4cf90cd17f6a0fa234 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-23235-5672/+5672
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add a Q_UNREACHABLE to improve code generation a littleThiago Macieira2012-09-132-0/+2
| | | | | | | | The code can't reach there anyway, so let's help the compiler out a little. Change-Id: Icee6ebe426c1116a7baaf2c5766c6d8f8276f3ac Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Make the instruction table be constThiago Macieira2012-09-133-7/+7
| | | | | | | It's never going to be modified, so it should be const. Change-Id: Ibc3bac0583f72ccbf7caa69aeab029bae03d3cdd Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* 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>
* 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-282-7/+7
| | | | | | | | | | 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>
* 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-282-4/+5
| | | | | | | | 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>
* Restrict v8 property lookup to the execution contextMatthew Vogt2012-08-2717-481/+561
| | | | | | | | | | | | | 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>
* Avoid dynamic lookup of signal handler argumentsMichael Brasser2012-08-2413-285/+462
| | | | | | | | | | | 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>
* 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 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>