aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/util
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash when assigning a null QObject or derived property as a ListView modelAndrew den Exter2013-11-241-3/+3
| | | | | | | | | | Fall through to the null case handler in the event of a QVariant of QObject or derived type with a null value, rather than asserting in the instance handler. Task-number: QTBUG-34999 Change-Id: I5eeffbe29a263c57e6157d516b138ddc8e2e7a95 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Simplify & speed up function callingLars Knoll2013-11-091-8/+8
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix various compiler warnings in order to remove warn_off in the near futureErik Verbruggen2013-11-041-1/+1
| | | | | Change-Id: Ic0492fbe31a1e134674bc6c20381f735dd6d5b7a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Avoid side effects when en exception has been thrown.Lars Knoll2013-10-291-8/+8
| | | | | | | | | | | | | | We don't want to check for exceptions after every single line on our runtime methods. A better way to handle this is to add the check in all methods that have direct side effects (as e.g. writing to a property of the JS stack). We also need to return whereever we throw an exception. To simplify the code, ExecutionContext::throwXxx methods now return a ReturnedValue (always undefined) for convenience. Change-Id: Ide6c804f819c731a3f14c6c43121d08029c9fb90 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix CallContext to not hold arguments on the C stack anymoreLars Knoll2013-09-281-11/+17
| | | | | Change-Id: I35f46cce4f243d4b8b2bac9244f8fc26836f413b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Persistent/WeakValue APILars Knoll2013-09-261-10/+11
| | | | | | | Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup Object::define*Property APILars Knoll2013-09-221-4/+4
| | | | | Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add a Safe<T> class and start using itLars Knoll2013-09-221-2/+2
| | | | | | | | | | The class denotes objects that are stored safely in areas controlled by the GC. These we can convert fast to a StringRef etc. Change-Id: I6b154eccaefddc42d4fafca55b7ee9e77179830c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Start using StringRef for parameter passingLars Knoll2013-09-221-4/+4
| | | | | Change-Id: If2c41daeda2862cd1162c5da8163a9d62fe4111d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup ExecutionEngine::newBuiltinFunction() usagesLars Knoll2013-09-221-16/+7
| | | | | | | And change the return type to be GC safe Change-Id: I6d7513962370fea4072a3d8c6b2c6f2d1705992e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't use Value::emptyValue() anymore.Lars Knoll2013-09-221-1/+1
| | | | | | | | | | emptyValue is special and reserved for usage inside the engine to mark missing values. The main to use cases are when converting property descriptors, and to mark holes in array data. Change-Id: I0ed357e65102b1041bf9a878e6e9a4ae0657523b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Further work towards an exact GCLars Knoll2013-09-221-4/+6
| | | | | | | | | | | Add some more convenience in the helper classes in qscopedvalue_p.h Make accesses to CallData safer, and change ExecutionEngine::newObject() to return a safe pointer. Change-Id: I980909754ce9681cf6faa1355bab3a1e5d6dd186 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert most remaining return values from Value to ReturnedValueLars Knoll2013-09-181-10/+11
| | | | | Change-Id: If8b0c3b91be50678693868c10fefc3678008834d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert builtin methods to return a ReturnedValueLars Knoll2013-09-181-8/+9
| | | | | Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move prototype pointer into QV4::InternalClassLars Knoll2013-09-021-2/+2
| | | | | | | | | | | | | The prototype is actually the same for most objects. By moving it into the internal class, we can save 8 bytes per object, as well as allowing for some future optimizations. Also fix a bug in the implementation of the Error prototype objects. Change-Id: I4d4b641055f644a9b088f27be34bfdb0446279b7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-1/+1
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the last v8 dependency from the delegate modelLars Knoll2013-06-071-36/+33
| | | | | | | Don't use a qv8objectresource for the items anymore. Change-Id: I5aadd58bf432e0a8984234c03a369aaea92c5f9e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert the qml adapter model to v4Lars Knoll2013-06-071-98/+86
| | | | | Change-Id: Ief02791fd5391653477b0a6031a5e8e644afcfd4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Port the first half of the delegate model code to v4Lars Knoll2013-06-051-4/+4
| | | | | Change-Id: Ieda3de0a297ba15e4d6634a1123df27347830cfa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::BooleanLars Knoll2013-05-211-2/+2
| | | | | Change-Id: I10b4240db78532dfdf972bb0a6f191462d81caaa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::IntegerLars Knoll2013-05-211-2/+2
| | | | | Change-Id: I6b9ab830c4ff3cbf986dbcf7c056648b5a16a222 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert qqmladaptermodel to use QV4::persistentValueLars Knoll2013-05-081-19/+32
| | | | | Change-Id: I231c166d796c64fd8a50da54893383f5241ce81d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Replace v8::Undefined() with QV4::Value::undefinedValue()Simon Hausmann2013-05-071-1/+1
| | | | | Change-Id: I4c7bb5bcc1bc15a982bb83d2597e6ae4bc5710cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of v8::LocalLars Knoll2013-05-061-14/+14
| | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove v8::HandleScopeLars Knoll2013-05-031-1/+0
| | | | | | | This class never made sense with v4... :) Change-Id: Id597d791d1adf52cc821d6d46f57cb24d1acd343 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup v8 Context handlingLars Knoll2013-05-031-1/+0
| | | | | | | | | We don't need or use v8 Context objects, so it's sufficient to have one global context for now. Remove all code related to entering or leaving Context's. Change-Id: I4f7ddaa4907e59de5713368fa13bbc40e5830542 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move QV8Engine::to/fromVariant over to a v4 based APILars Knoll2013-05-011-3/+3
| | | | | Change-Id: Ie44de10cbd970715345e2c428db666dc6233b39c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-251-2/+2
|\ | | | | | | Change-Id: Ia02971527a2d1a80c5624d69330428818aab3a41
| * Fix warnings about shadowing membersThiago Macieira2013-02-221-2/+2
| | | | | | | | | | | | | | | | util/qqmlpropertymap.h:87:9: error: declaration of 'parent' shadows a member of 'this' [-Werror=shadow] [and others] Change-Id: I2ff1a3c133efe2132e74dad00596931a84a7f421 Reviewed-by: Alan Alpert <aalpert@rim.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-283-10/+0
| | | | | | | | | | | | | | | | | | | | | | The macro was made empty in qtbase/ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Ia07e99676e0134fde5e32880edb95e57c779a7ff Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* | Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-249-0/+4004
|/ | | | | | | | | | | | | | | | | | | | | | | | This is needed for proper support of non-GUI instantiators in QtQml. Only private C++ classes are affected. Aside from name changes, model classes now operate on QObjects instead of QQuickItems, leading to minor changes in the implementation of QtQuick classes using them. The old QML type names will still be registered in the QtQuick import for the forseeable future, but pointing to the new classes. The new QML types will be added in a second commit. Classes Affected: QQuickVisualDataGroup -> QQmlDataGroup QQuickVisualDataModel -> QQmlDelegateModel QQuickVisualItemModel -> QQmlObjectModel QQuickVisualModel -> QQmlInstanceModel QQuickChangeSet -> QQmlChangeSet QQuickListAccessor -> QQmlListAccessor QQuickListCompositor -> QQmlListCompositor QQuickPackage -> QQuickPackage (just moved for now) Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-102-2/+2
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-232-48/+48
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix uses of \inmodule, \inqqmlmodule and \sinceBea Lam2012-08-081-0/+1
| | | | | | | Some classes and QML types were missing these or had the wrong values. Change-Id: Ic6376b8b450301f8ae0549e636f4bc2db4400f2b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Remove default parameter from protected QmlPropertyMap CT.Friedemann Kleint2012-07-301-2/+2
| | | | | | | | | Make public constructor explicit. This fixes QtLocation compilation (declarativeplaces defaulted to the protected CT). Change-Id: I8b32d7624b6ba770f6d646c227a0bfd37e501ee5 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Allow access to signals and slots in QQmlPropertyMap inheritorsMatthew Vogt2012-07-272-5/+46
| | | | | | | | | | | Allow inheritors of QQmlPropertyMap to pass the static meta object information needed to support their signals and slots. If the correct pointer is not provided to the constructor, it is not accessible via the virtual metaObject() function during construction. Task-number: QTBUG-26400 Change-Id: Ide8c6d3568e4abd4c48e0aa60e6fa05a9c2a11cf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow QQmlPropertyMap property updates to be controlledMatthew Vogt2012-07-182-1/+41
| | | | | | | | | | Allow clients to control updates made from QML to types derived from QQmlPropertyMap, by overriding the updateValue() function. Task-number: QTBUG-23183 Change-Id: I0169093779ebfe50dc9349f5aaac08ed85c80a8f Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: abcd <amos.choy@nokia.com>
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-131-2/+2
| | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I62d203f21df63a95ee236e578b10418fd9680707 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-243-0/+405
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>