aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/testtypes.h
Commit message (Collapse)AuthorAgeFilesLines
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-9/+9
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix erroneous enum conflict warningsSimon Hausmann2018-10-231-1/+1
| | | | | | | | | | | | | Permit enums from sub-classes to overwrite enums from super-classes, but keep warnings about clashes within a class, provided that the values differ. The last condition relates to the declaration of enums and a subsequent declaration of Q_FLAGS, which appear to have the same keys and values in the meta-object system. Task-number: QTBUG-71184 Change-Id: I2a00dc90e3714fc4c6fe8add5a6268b88bb9e745 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
* Provide option to skip registration of enum classes unscopedRainer Keller2018-08-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enums classes are registered unscoped which leads to clashes in the following cases: 1. Two different enums contain the same values 2. The name of an enum class is the same as an enum value In the 2nd case you can not even access the scoped enum at all because it will be overwritten by the primitive type. Users can now add a class info to the meta type to disable the unscoped registration which solves all clashes. The default is kept as is. class MyClass : public QObject { Q_OBJECT Q_CLASSINFO("RegisterEnumClassesUnscoped", "false") public: ... }; [ChangeLog][QtQml] Added option to disable unscoped registration of enum classes. Change-Id: Ifa4197a14a252575e8a25ae56fb6ee479addf80b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clean up QQmlCustomParser APISimon Hausmann2018-07-301-8/+8
| | | | | | | | Consistently provide a smart pointer to the compilation unit in the two virtual functions. Change-Id: I2f43d4d17102082577f2502424d288d40eb7479d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-241-0/+15
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix execution of deferred propertiesJ-P Nurmi2017-10-181-0/+15
| | | | | | | | | | | | | | | | | | | | | | When deferred properties were assigned in multiple contexts, only the outermost context was executed. Any deferred property assignments in other inner contexts were never executed. Collect the deferred data to a container to be able to execute them all. Task-number: QTBUG-63200 Change-Id: I88fab27c1f81b5188430ada086dcc19842507e99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-201-0/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| * Disable deferring when referenced as a grouped propertyJ-P Nurmi2017-09-061-0/+20
| | | | | | | | | | | | | | | | | | This allows us to fix QTBUG-50992 - the issue with most votes in QQC2. Task-number: QTBUG-63036 Change-Id: I996cd1128582b80e0c8480ae143d682c1e8eb8fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | C++11 scoped enum support for QMLMichael Brasser2017-05-031-0/+18
|/ | | | | | | | | [ChangeLog][QtQml] Support C++11 scoped enums in QML. These can now be accessed as <TypeName>.<EnumName>.<EnumValue> Change-Id: I29bd3f16e980f3e6f1b2390b5a8e9e8e999952a3 Task-number: QTBUG-54961 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add missing qmlRegisterExtendedUncreatableType variantKevin Ottens2017-02-171-0/+54
| | | | | | | | | | | | | We need another qmlRegisterExtendedUncreatableType allowing to pass the metaObjectRevision as third parameter. Otherwise extended uncreatable types can't use for instance REVISION in their properties. This is missing for some of the Qt 3D types for which we are cleaning up the versioning for 5.9.0 and which fall in this category. Change-Id: I20ebec339814d7f43cc4b2b58090406b0d5fb97e Task-Id: QTBUG-58895 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add qmlRegisterUncreatableMetaObject convenience functionBogDan Vatra2016-09-071-0/+10
| | | | | | | | | qmlRegisterUncreatableMetaObject is needed to register Q_NAMESPACE QMetaObjects. Task-number: QTBUG-54982 Change-Id: I767dfcb15db647e0dceb0c37b17e64f2a5c1dd8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-021-0/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-011-0/+24
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| | * Fix string property assignments to 2d vectors and quaternionsSimon Hausmann2016-07-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | Just like it's possible to assign "1,2,3" to a QVector3D, the same should be possible for a QVector2D and a QQuaternion. Task-number: QTBUG-54858 Change-Id: I8f394279dcdf5c057876efaa316b4bad51a4c126 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Remove QQmlCompiledData in favor of QV4::CompiledData::CompilationUnitSimon Hausmann2016-06-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlCompiledData used to contain the binary data for instantiating QML types in the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler create a QV4::CompiledData::CompilationUnit. Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Removed the dependency to QQmlCompiledData from QQmlCustomParserSimon Hausmann2016-05-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | We only need fields from the compilation unit, so let's pass that instead. This is private, internal QQmlEngine API only used by QtQml and QtQuick. Change-Id: I1a659654d95585b736384b5b519d05a4df3f9ead Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Convert QByteArray in C++ type to ArrayBuffer in QML and vice-versaNobuaki Sukegawa2016-03-051-0/+52
|/ / | | | | | | | | Change-Id: Ie4e29a443a17826a3ce4d1e1912bd35dc497ac78 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7J-P Nurmi2016-03-011-1/+7
|\| | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_native/qmldbg_native.pro Change-Id: I3ca8f0422828191b7e19539c25f31f2d048e9f18
| * Properly signal errors when accessing lowercase enum valuesThomas McGuire2016-02-241-1/+7
| | | | | | | | | | | | Task-number: QTBUG-46758 Change-Id: I14e394021c231bda5552c8d1c98f20c903a62f12 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-201-17/+12
|/ | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Make QML composite types inherit attached propertiesJ-P Nurmi2015-10-091-0/+2
| | | | | | | | Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe Task-number: QTBUG-43581 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Make QML composite types inherit enumsJ-P Nurmi2015-09-211-0/+11
| | | | | | | | | | | | | | | | | | | | | | | Problem: in Qt Quick Controls 2, enums declared in the abstract C++ base types were not accessible with the concrete QML type name, but had to be referenced using the base type name: Slider { snapMode: AbstractSlider.SnapOnRelease } Solution: this change resolves the C++ base type and creates the missing link between the composite type and its base type's meta- object. This allows referencing enums using the concrete/composite QML type name: Slider { snapMode: Slider.SnapOnRelease } Change-Id: Icefdec91b012b12728367fd54b4d16796233ee12 Task-number: QTBUG-43582 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* CleanupSimon Hausmann2014-08-151-4/+4
| | | | | | | | | Merge QV4::CompiledData::QmlUnit into QV4::CompiledData::Unit. For pure JS units it means a slight increase of memory usage by a few bytes, but overall it makes the code a lot simpler. Change-Id: Ib48927749720b056f004aac0fe22cb8ec729e3f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* qmlRegisterCustomExtendedType, qmlRegisterExtendedUncreatableTypePaul Lemire2014-07-251-0/+19
| | | | | | | | | | | | | | | | | | There are cases in Qt3D where we'd like to be able to register uncreatable extended types. The main use case is having an abstract class that has an extension class so as to have a clean separation between the C++ and QML API. Implementations of the abstract can then be easily registered to QML and rely on the extension class for QML specific properties. The other feature we'll need in the near future is the ability to create extended QML types that use a custom parser. Two new type registration method were added to qqml.h to fulfill those needs. Unit tests for those are present in qqmlecmascript and qqmllanguage. Change-Id: I15b2cd791ffd36b537305af1873491c079d4094e Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rework custom parser integrationSimon Hausmann2014-06-041-9/+11
| | | | | | | | | | | | | | | | | | | | | | | The custom parser design used to be so that the custom parser operates on the "AST", creates its own binary representation of the data it needs, stores it in a QByteArray and gets that at object instantiation time. That meant serializing everything necessary. With the introduction of the "binary" QML data structure, that process of serialization becomes obsolete and would require extra work in the custom parsers for example for QQuickStates to store the translation parameters. The clean solution is to eliminate this unnecessary serialization process and instead let the custom parsers do a verification pass at type compile time and then simply operate directly on the QV4::CompiledData::Bindings at object instantiation time. That simplifies the code, and allows for support of translations throughout all list model properties. Additionally this speeds up the creation of state objects and reduces memory consumption. Previously a text: qsTr("foo") binding in states would result in an actual java script binding. After this patch it is merely stored as a string and translated at object instantiation time. Change-Id: I7550274513f54abb09a0ab4de51c4c0bcdb23cae Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix assignments of null strings in QML and JavaScriptSimon Hausmann2014-04-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Assigning "" to a string based property would exhibit inconsistent behavior: * When assigned as a literal, it would assign an empty string * When assigned from JavaScript, it would assign a null string When the assignment was done _to_ a QByteArray property, it would hit the case of calling QVariant::convert where the incoming variant is either an empty or a null string and the target is a QByteArray. For historical reasons - as documented - QVariant::convert will return false when the incoming variant is a null variant. In V8 assignment from JavaScript would produce an empty string and thus hit the "succesfull" conversion code path in QVariant to convert to a seemingly empty QByteArray. With v4 a null string would result in a failed conversion and spurious warnings as seen in the reported task. This patch ensures that we consistently map "" to a null string, when it comes from JavaScript or QML as a literal string. We now also detect the situation of trying to convert a (valid) null variant to another target type. Task-number: QTBUG-37197 Change-Id: I68f9031262fdd287d69a38d5468fb38a20441d7b Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Avoid recompiling of signal handlers defined in QtQuick state changes and ↵Simon Hausmann2014-04-021-4/+4
| | | | | | | | | | Connection objects We can re-use the expression we've compiled at QML type compilation time, as long as we "inject" the signal parameters in the dynamic qml lookup chain. Change-Id: Icc417531c41dea06ff5d033011179af49b03f542 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix performance regression of parent setting during QML object creationSimon Hausmann2014-03-311-1/+7
| | | | | | | | | | This showed up in the profiles again: In QML we create a lot of objects with many children and sending a child event each time is expensive. That's why the VME didn't do that and hadn't done so in ages. This patch restores that behavior and aspect of loading performance. Change-Id: I5078fe330d913dc832b284aaecf031152dc80802 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove object index parameter from QQmlCustomParser::compileSimon Hausmann2014-03-291-4/+4
| | | | | | | | There is no need anymore to pass through the object index of the object being "custom compiled". Change-Id: I8ef8e578b27523d9e7190503fbf95d1eb863a149 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix instantiation of QML list models with custom object propertiesSimon Hausmann2014-03-271-0/+27
| | | | | | | | | | | | | | | | | | When doing something like property Item blah: Item { ... } in a list model, we would erroneously pass "blah" to the custom parser of the list model, which is wrong as the binding to blah is on an existing property (not custom). For regular properties there's a code path in place to avoid passing this to the custom parser, but for sub-object bindings we'd unconditionally register it with the custom parser. This patch corrects that and also adds a unit test to verify that we don't pass any bindings to existing properties to the custom parser. Task-number: QTBUG-37795 Change-Id: I1a3091fb5fad4be08b577cf74a85f24c3ab62ef4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix crash on shutdown with statesSimon Hausmann2014-03-151-0/+17
| | | | | | | | | | | | When populating deferred properties, we must not set the rootObjectInCreation flags on the root context and (consequently) on any sub-objects objects created when initializing deferred properties. Doing so otherwise will end up us incorrectly linking QQmlContextData together, causing QQmlData::linkedContext to point to iself and crash on exit upon deletion. Task-number: QTBUG-37484 Change-Id: Ia5dc92a04e0f66499f15fbac10f14859d387b021 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove old compiler and VMESimon Hausmann2014-03-071-3/+0
| | | | | | | | | | | | This removes the bulk of the code. A few smaller cleanups remain, to be done in smaller changes as they move code around. Additionally the "optimize" option of qqmlbundle was removed. It called QQmlScript::Parser::preparseData, which however was not implemented and always returned an empty QByteArray. Therefore "optimize" would not do anything and the class is gone now :) Change-Id: I0c265e756704cb53c5250be1f69e4a3e1b6e64d5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Add the correct object index to the custom parserSimon Hausmann2014-03-021-3/+3
| | | | | | | | Without the correct index the calls to astForBinding run out of bounds. Fixes tst_qqmllistmodel crash. Change-Id: I6fb8b77866cbf247e7373cdbece6833c92be3615 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix implicit component determination inside group propertiesSimon Hausmann2014-03-021-0/+4
| | | | | | | | | Don't only scan full-typed objects for property bindings that may define components implicitly, do this for any types we know (propertyCache populated) and that aren't explicitly of Component type. Change-Id: I918b636be6d524e919cdd4efd49c33e63da64de3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix evaluateEnum for custom parsersSimon Hausmann2014-03-021-0/+8
| | | | | | | | | When storing the string for a script binding - next to to the AST node - then for expression statements skip the (potentially synthetically inserted) semicolon. Its omission is required for the use of QQmlCustomParser::evaluateEnum. Change-Id: I3b556fd6a884f5c9c290d7d793eeab4dd135343e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* [new compiler] Add support for QML list modelsSimon Hausmann2014-01-201-0/+2
| | | | | | | | | | | | | List model definitions make heavy use of custom parsers, which requires AST access as well as a general port to the new QQmlCustomParser API. Additional fixes in the custom parser support were needed to pass all tests: * Fix support for AcceptsSignalHandlers and AcceptsAttachedProperties * Don't call setCustomData unless the compiler generated data earlier Change-Id: Ic42f8a890391267c94f63d35f055b60fdbf3c83d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix broken Maroon game / regression in PropertyChanges {} elementSimon Hausmann2013-12-101-0/+23
| | | | | | | | | | | | | | | | | | | | | | Commit 0aadcf8077840068eb182269e9ed9c31ad12f45e that pre-compiles the expressions in PropertyChanges {} introduced a regression in where the evaluation context was incorrect and thus bindings would not be able to access the correct properties. For example PropertyChanges { target: someObject y: height / 2 } Here height should be looked up in the context of "someObject", not of the PropertyChanges element. This patch introduces an auto-test that verifies that the lookup context is correct and fixes the bug by disabling accelerated compile time property lookups for binding expressions that are requested from a custom parser. Change-Id: I5cb607d07211b453ddfc9928ccbf5f9ecec85575 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix compiler warnings in declarative tests.Friedemann Kleint2012-12-201-1/+1
| | | | | | | | | | | | - Unused variables - Missing enumeration values in switch - truncation from double to float - truncation from size_t to int - Missing initializers - Mix of operator & and bool | Change-Id: Ib212aeea41befef193f12300a1d9814a60f183af Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Declare QJSValue as a metatype where it is defined.Stephen Kelly2012-12-041-2/+0
| | | | | | | Instead of in multiple different TUs, therefore causing ODR violations. Change-Id: I08d3624d3ed5a995e96488361665afa197fb9fc9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Implement QAbstractDeclarativeData::isSignalConnected hookKent Hansen2012-06-271-0/+5
| | | | | | | | | | QQml_isSignalConnected is no longer needed, since QObjectPrivate::isSignalConnected will now call the declarativeData hook. Change-Id: I0685b0fa909d6c6c2d275bfa8d41100d9926a046 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Add enum values from related typesMatthew Vogt2012-06-271-0/+19
| | | | | | | | | | If moc marks a type as being related to another type (by using that type's enums or properties), then include the enum values exported by the related type in those exposed by the dependent type. Task-number: QTBUG-22675 Change-Id: I78e72791a4f470200a9ba986a865ffac6c873725 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* qmlRegisterRevision clashes with qmlRegisterUncreatableTypeMartin Jones2012-06-251-0/+35
| | | | | | | | | | | Add template<typename T, int metaObjectRevision> qmlRegisterUncreatableType() in order to register an uncreatable type for a particular revision. Task-number: QTBUG-23278 Change-Id: Ic165e41c8176916929cf19eb9bf6eef4b5bee1eb Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Enable literal Qt enum assignment to enum properties.Michael Brasser2012-06-211-0/+27
| | | | | | | | Assigning Qt global enums to enum properties was previously handled as a binding, rather than a literal assignment. Change-Id: If6bb65f63b34f4e10c0636221ddadb11f7025735 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Enable binding to properties of type QJSValue.Andrew den Exter2012-05-241-24/+82
| | | | | | | | | This allows javascript objects of all types to be bound to properties declared in c++. Compared to a QVariant the primary benefit this offers is a type which functions and objects with functions can be bound to. Change-Id: Idb3313e7ff1d616ab12d44f616083c8296201f3a Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix signal handlers for signals with default arguments.Michael Brasser2012-05-171-0/+1
| | | | | | | | | | For cloned signals, connect to the index of the original. This was a regression caused by the switch to QQmlNotifierEndpoint for signal handlers. This change also makes parameters with default arguments available from QML, while previously they were unavailable. Change-Id: I1feb3412c3e9b0f2a5d6644c404c56d53c5544ac Reviewed-by: Martin Jones <martin.jones@nokia.com>