aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
Commit message (Collapse)AuthorAgeFilesLines
...
* QQmlDelegateModel: don't fall back to use DelegateChooser as delegateRichard Moe Gustavsen2018-09-061-3/+3
| | | | | | | | | | | If the application uses a DelegateChooser, but the chooser fails to resolve a delegate for a certain index, it should not use itself as the delegate instead. This will cause the application to crash. Instead, return nullptr (like we do in the function guard), which will let the item views handle the situation gracefully. Change-Id: I9b3b4aa2626d1f8521b4395096300ac12150c63f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Make QtDeclarative work for the no-thread configMorten Johan Sørvig2018-09-051-2/+7
| | | | | | | | | | | | | Force use of the basic render loop, adapt qqmlthread and qqmltypeloader to work on a single thread. Disable components and features that require worker threads: qmldb_server, worker script, shapes, folderlistmodel, threaded render loop, software renderer. Done-with: Lorn Potter <lorn.potter@gmail.com> Change-Id: I77d965947f684f8b7d19284b5decd893395316cb Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QQmlDelegateModelItem: ensure that we emit changes to row and columnRichard Moe Gustavsen2018-08-221-5/+3
| | | | | | | | | | | | | As it stood, we would only emit changes to row and column if index changed as well. But when removing rows and columns from the model, it can happen that we reuse an item that by accident has the same index as the one we change it to, but belonging to a different row and column. So we need to check for changes to the index the same way we do for row and column. Change-Id: I9d507a74aa5dcb0fe7630e7af1e949bd2db7fb47 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Clarify docs of WorkerScript with regards to memory usageSimon Hausmann2018-08-211-0/+4
| | | | | | | | | | Since now each WorkerScript has its own JS engine, let's document that to explain the reason (isolation), impact (memory consumption) as well as how to deal with it (sharing). Change-Id: I8007a58aaa96f989bc9e72e68dacd87655a8a8cc Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix race condition when removing worker scriptsSimon Hausmann2018-08-211-0/+1
| | | | | | | | | | As reported by TSAN, while registering new workers is done in the QML engine thread with the lock held, the removal of workers from the hash is done without a lock in the thread and therefore a data race. Change-Id: I932ed6127fe34b3b3da0b0202f42e877ae6e0d5f Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port WorkerScript threading examples to use ES modulesSimon Hausmann2018-08-211-3/+3
| | | | | | | | | This is the more modern way of doing things, so demonstrate that in our examples and documentation. Change-Id: Icd5316fbeeb00c34d470c8d871851945dc831244 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add support for ECMASCript modules in WorkerScript elementsSimon Hausmann2018-08-211-17/+38
| | | | | | | | | Similar to script imports from .qml files, the .mjs extension is used to distinguish between ES modules and plain script files. Change-Id: Id5f9b59fb77e99e3c9d6a404e6d091d96b501ad6 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up QML worker scripts part 3Simon Hausmann2018-08-211-144/+55
| | | | | | | | | | With one engine per worker script, we can replace the onMessage and sendmessage wrappers with plain properties of the WorkerScript object that we can access. The code is further simplified by merging WorkerEngine into WorkerScript. Change-Id: I25e9fb253b6b0dd1fe63676392b1c760a83215db Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up QML worker scripts part 2Simon Hausmann2018-08-211-36/+19
| | | | | | | | | Now that we have one JS engine per worker script, we can get rid of the per-script QML context and let the script simply run in the global object, which is now also mutable. Change-Id: I36d8616b85b2c0ff3a356ee7be9d242c3da624cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up QML worker scripts part 1Simon Hausmann2018-08-211-20/+19
| | | | | | | | Multiple WorkerScript {} elements would share the same underlying JavaScript engine. This complicates the design. Change-Id: I17f240bc393f669c23248c96d1aeb6b5a70a2802 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow DelegateModel-based views to support multiple delegate typesPaolo Angelelli2018-08-1710-21/+553
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a specific abstract QQmlComponent subclass, QQmlAbstractDelegateComponent, and a default implementation, DelegateChooser, that, together with the type DelegateChoice allows determining the delegate type by role and/or index. The patch also adds QQmlAbstractDelegateComponent support to QQmlTableInstanceModel, that is a simplified version of the delegate model, currently only used in the new table view. DelegateChoosers are intended to behave just like Components in the context of the view. This means that they can be declared outside of the view, and also in separate files, and the same delegate component can be used at the same time in multiple views. [ChangeLog][QtQuick][Item Views] Added a DelegateChooser Component to host DelegateChoice instances to choose different delegates in an Item View (e.g. TableView) depending on model roles. Done-with: Michael Brasser <michael.brasser@live.com> Task-number: QTBUG-26681 Change-Id: Ibe24a31daf9142c8a9ff45ef6c65da0aec8a14dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix revision of Connections.enabled propertySimon Hausmann2018-08-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The enabled property was added with QtQuick/QtQml 2.3 as part of Qt 5.7, but due to multiple bugs, the property became visible across all versions, breaking lookup as outlined in the linked task. The first issue was that property revisioning needs to be specified via the REVISION tag inside Q_PROPERTY, not using Q_REVISION. The second issue was that in type registration the unversioned type must be registered first followed by the revisions. Otherwise the call to QQmlMetaType::qmlType(const QMetaObject *metaObject, const QHashedStringRef &module, int version_major, int version_minor) that will look through the metaObjectToType multi-hash will find the last inserted type first and that satisfies the minor version requiremend. In the case of the Connections type, that would be the base version registered last with qmlRegisterCustomType<QQmlConnections>(uri, versionMajor, versionMinor,"Connections", new QQmlConnectionsParser); Lastly, if we were to just call that one first and then register revision 1 afterwards, then only the first version would have a custom parser attached and we would fail to process the bindings correctly if using the newer revision. So to fix this, we introduce another private qmlRegisterCustomType specialization that includes a meta object revision, thus allowing us to register the Connections type in the correct order and both with a customer parser. That's not ideal, but also not worse than the previous three registration and it fixes the visibility. [ChangeLog][QtQml][Connections] Fixed the visibility of the enabled property to only appear when importing QtQml/QtQuick >= 2.3, which was introduced with Qt 5.7. Otherwise it would accidentally shadow for example an "enabled" context property. Task-number: QTBUG-69884 Change-Id: I888374d96f19502466358df81007bcb3c65d3a79 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix ASAN error about new-delete-size mismatchSimon Hausmann2018-08-081-1/+4
| | | | | | | | | | When object cache for list model items is a plain QObject that was allocated together with declarative data in one go. Since we control the site of deletion, we can call the destructor manually as well as operator delete to avoid the ASAN error. Change-Id: I346d6ef34876cb495573ba9cfbc68be92dd937ab Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* QQmlTableInstanceModel: remove false assertRichard Moe Gustavsen2018-08-071-6/+18
| | | | | | | | | | | | | | There current assert turned out to not be valid for all cases. If the model is currently incubating an object, m_modelItems list will contain it, but the view will not. So be more specific what we check. Also, we need to release the object for items that are being incubated. The code snippet for doing that is more or less the same as found in the destructor of QQmlDelegateModel. Change-Id: I84b4286a037b27ad809c3a63afed94ce61febc19 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTableView: improve draining of reuse poolRichard Moe Gustavsen2018-08-071-0/+1
| | | | | | | | | | | | It turns out that using a maxTime of 2 when draining the pool was a bit naive. If e.g the width of the table is greater than the height, it starts releasing pooled items to quickly. So change the logic to be more dynamic, and to calculate what the maxTime should be based on the geometry of the table. Change-Id: Ifeed62789575f98cff063f550f45eb54ef312fdb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Implement ObjectIterator using the new iteration mechanismLars Knoll2018-08-022-24/+0
| | | | | | | And with that get rid of the old advanceIterator methods. Change-Id: I969fa89d25df8992a4b08c8c081b91c92ffdfddd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove support for iterating over the proto chain from ObjectIteratorLars Knoll2018-08-022-3/+3
| | | | | | | | | This will simplify moving over to the new iteration model. It implies a very small behavioral change in a few places where we used to iterate over the proto chain before. Change-Id: Ia62c9c51712d6b45e69ca63becdbefab6fa4bf3f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce a new mechanism to iterate over object propertiesLars Knoll2018-08-022-0/+41
| | | | | | | | | | | | | | | | | The old advanceIterator schema was extremely ugly and in addition not flexible enough to support the requirements for Proxy.ownKeys and some of the methods in Object Implemented a new scheme through a OwnPropertyKeys method in the Object VTable that creates and returns an iterator object. Ported QJSValueIterator and for-in to use the new mechanism. There's still many places where we use the old ObjectIterator (that relies on advanceIterator). Those will be ported in subsequent commits. Change-Id: I091a9bea9ff6b2b63630cc336814700757a718be Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlTableInstanceModel: handle model data changes more gracefullyRichard Moe Gustavsen2018-08-022-0/+21
| | | | | | | | | | | | | Equal to QQmlDelegateModel, we need to listen for changes done to existing model items, and notify existing delegate items about it. Otherwise, they will not stay in sync with the model. By accident, this sort of worked in QQuickTableView already, since it would rebuild the whole table for every model update. This is really slow, and completely unnecessary. Change-Id: I10750ff387f8b455d0f27c50a17926d9beb6dd03 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQmlTableInstanceModel: implement support for reusing delegate itemsRichard Moe Gustavsen2018-08-024-47/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will make it possible for TableView to reuse delegate items. The API lets TableView (or any kind of view in theory) specify if an item is reusable at the time the item is released. Reusing delegate items is specified per item, meaning that the view can choose to release some items as reusable, but others not. If the view never releases any items as reusable, no items will be added to the pool, and hence, no items will be reused. If the view releases an item as reusable, the model will move it to the reuse pool rather than destroying it (if the items ref-count is zero, and not persisted). The next time the view asks the model for a new item, the model will first check if the pool already contains an item, and if so, use it. Otherwise it will create a new item, like before. Items in the pool are supposed to rest there for a short while. Ideally only from the time items are flicked out on one side of the view, until we reuse them when new items are flicked in on the oppsite side. One big reason for this is that we have no way of hibernating items in QML, so they will effectively stay alive while inside the pool. This is not ideal, but still a huge performance improvement over what we had before, where all items are always created from scratch. If hibernating objects will ever be possible, it should be easy to extends the current logic to take advantage of this. Already existing tests for QQuickTableView should verify that no regressions are introduced with this patch. Since recycling of items is driven from the view, auto tests for this functionality is included with the patch for implementing reuse support in TableView (coming in a subsequent patch). Change-Id: I28aa687251ce3e7e1de0b1c799fdbf44d8867d45 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Simon Hausmann2018-08-011-4/+59
|\ | | | | | | refs/staging/dev
| * Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-011-4/+59
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I654a2a4b34dadc7cb7d85625b86f54691ad5904a
| | * Doc: Extend ItemSelectionModel QML documentationPaul Wicking2018-07-301-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change provides a bare minimum documentation for the ItemSelectionModel QML type. Task-number: QTBUG-58090 Change-Id: I0e232f8e05e7629d6f573f8dce21154d0ec307e5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | QQmlTableInstanceModel: check if adaptormodel adapts AIM before using itRichard Moe Gustavsen2018-07-311-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | The aim() function doesn't check if the model inside QQmlAdaptorModel is a actually a QAbstractItemModel (it just does a static cast). So we need to guard it. This is essentially the same fix as was done for QQmlDelegateModel (sha1: 9757d5f9c90988). Change-Id: I9f14e1639b5e7df4190333c679e805e7f9f7481a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Encapsulate access to CompiledData::Object and CompiledData::ImportSimon Hausmann2018-07-312-7/+5
| | | | | | | | | | | | | | | | This will make it easier to move the data out of CompiledData::Unit and into a separate data structure. Change-Id: I32e6233a66f2279b44cc06ef7c3505db4a565f98 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Clean up compilation unit string resolutionSimon Hausmann2018-07-312-3/+2
| | | | | | | | | | | | | | | | | | Replace use of CompiledData::Unit::stringAt with CompilationUnit::stringAt as central place, in preparation for allowing derived compilation units to retrieve strings from base units. Change-Id: Ifafe6c18a9fd8d1e2259a60c17200124869b4c2d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Clean up constant storage for CompiledData::BindingSimon Hausmann2018-07-311-5/+5
| | | | | | | | | | | | | | | | | | | | Store doubles in bindings in the constant table of the compilation unit instead of each binding. This removes one of the two 8 byte members of the value union and also allows for sharing of constants throughout a .qml file. Change-Id: I1d7daafdb7f24e34c14cd160d2dcb2c5aaac1c50 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Encapsulate the unit data in CompilationUnitSimon Hausmann2018-07-312-4/+4
| | | | | | | | | | | | | | | | This allows updating the constants table when the unit data is set / changes and removes the tie to the engine. Change-Id: Ice553650390589e30e18421c4e55422a55d0df89 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Clean up QQmlCustomParser APISimon Hausmann2018-07-304-23/+23
| | | | | | | | | | | | | | | | 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>
* | Fix unused variableJesus Fernandez2018-07-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | Coverity was complaining about an uninitialized variable, but it was not being used then we can remove it instead. Amends commit 3d9a59b4329cd6f4af6f5e65bc59f8ff28180eec. Coverity-Id: 191020 Change-Id: I98cb0bac9d9985555fda2bc0d2682bd7f1bcc301 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Revert "QQmlAdaptorModel: support dataChanged signals from multi-column models"Richard Moe Gustavsen2018-07-181-9/+2
| | | | | | | | | | | | | | | | | | No longer needed since TableView will switch to use QQmlTableInstanceModel. This reverts commit a5d2fb468cabff8dc0702c7ddcd9f5b08993b827. Change-Id: I10c6217627a77beebd99cfa5668db05bbbe4ed15 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQmlDelegateModel: remove rows and columns propertiesRichard Moe Gustavsen2018-07-183-37/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This change reverts 59a9c7c3d9ed. Adding support for rows and columns to a QQmlDelegateModel is no longer needed now that TableView will use QQmlTableInstanceModel. Besides, QQmlDelegateModel was designed from the ground up to only support list models, so just adding those properties was a bit half-baked. Change-Id: I1d58355d98999dc6a2a0b88ea64852c9eb918447 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQmlDelegateModel: remove unused m_useFirstColumnOnlyRichard Moe Gustavsen2018-07-181-2/+4
| | | | | | | | | | | | | | | | This variable will no longer be used once QQuickTableView starts to use the new QQmlTableInstanceModel. Change-Id: I0a4df2b3ce16868105426dac79a8f506fe353cea Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devSimon Hausmann2018-07-171-0/+41
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/quick/demos/photoviewer/i18n/qml_de.ts examples/quick/demos/photoviewer/i18n/qml_fr.ts examples/quick/demos/photoviewer/photoviewer.pro examples/quick/demos/photoviewer/qml.qrc src/qml/compiler/qv4instr_moth_p.h tests/auto/quick/qquickanimations/tst_qquickanimations.cpp Change-Id: Ibea76b468577c2a68bd305cee82ae6444d0f8073
| * Doc: Extend documentation for ItemSelectionModelPaul Wicking2018-07-161-0/+41
| | | | | | | | | | | | | | | | | | | | | | Add documentation for setCurrentIndex() and the select() methods. Include SelectionFlag enum values in select(index, command) description. Task-number: QTBUG-56320 Change-Id: Ia43fa2903656d89a1e80bef6097500d329df0c59 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | QQmlTableInstanceModel: add new TableView helper classRichard Moe Gustavsen2018-07-164-5/+480
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will add a new model class: QQmlTableInstanceModel. It will be used by QQuickTableView to communicate with the data model, instead of using QQmlDelegateModel. The reason we abandon QQmlDelegateModel for QQuickTableView, is because QQmlDelegateModel was written from the start to only support list models, not table models. And to work around this, we proxy table models as a list models, and combine all columns to form one big list. This as some disadvantages. First and foremost because QQmlDelegateModel is using QQmlListCompositor internally. QQmlListCompositor can combine many different list models into one big list model, and divide them into groups. Any change done to a list model will also be mirrored in the list compositor. The compositor will further create QQmlChangeSets describing such model changes, which will then be emitted by QQmlDelegateModel so that the view can transition in the same changes. This flow is especially bad when adding/removing a new row in a table. In that case, since the table looks like as a list, the list compositor will need to update its own internal structures for each item in the new row. So if you have 1000 columns, 1000 updates will be processed. Even worse, since the list compositor create QQmlChangeSets for each item in the row, the view will end up receiving 1000 signals about the change. Combine this with the fact that QQmlDelegateModel contains a lot of undocumented complex code for dealing with groups, which is not needed or used by TableView (or ListView for that sake *), adding a new QQmlTableInstanceModel that understands table models, is the right solution. Auto testing the new class will be done from QQuickTableView, once it takes it into use. * Note: The fact that TableView/ListView is using QQmlDelegateModel internally to communicate with the data model is a private implementation detail. The application will never have access to this model (and can therefore not create any groups on it etc). The application can, however, create its own DelegateModel and assigns it to TableView/ListView. But this is a different issue, and will continue to work as before. Change-Id: If1c35c27e75f236161df84ecb1d919aa3050f5a0 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQmlDelegateModel: check if the delegate model adapts an AIMRichard Moe Gustavsen2018-07-131-1/+2
| | | | | | | | | | | | | | | | | | The aim() function doesn't check if the model inside QQmlAdaptorModel is a actually a QAbstractItemModel (it just does a static cast). So we need to guard it. Change-Id: I397280ea7e6f81939d4030d0512a3a67877ad94c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQmlAdaptorModel: move connection set-up code to QQmlDelegateModelRichard Moe Gustavsen2018-07-102-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | There is no need that QQmlAdaptorModel sets up the connection between QQmlDelegateModel and QAIM. QQmlDelegateModel can do this internally. This removes more of the dependency to QQmlDelegateModel, and will make it easier to reuse the class also for other models as well (first and foremost the upcoming QQmlTableInstanceModel). Change-Id: I957ac7bf85c6976ac79df0500a3c1ec3f8be42e2 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQmlDelegateModelItem: set row and column explicitRichard Moe Gustavsen2018-07-092-21/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Whenever we set a model index on a model item, set row and column explicit as well. We used to calculate row and column by calling out to QQmlDelegateModel from within QQmlDelegateModelItem. But we want to remove the dependency to QQmlDelegateModel as much as possible, to be able to reuse QQmlDelegateModelItem also from other model classes (first and foremost the upcoming QQmlTableInstanceModel). Change-Id: Ib80b31250010b2611ba1715d3324145117add865 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Prefix vtable methods with virtualLars Knoll2018-07-033-14/+15
| | | | | | | | | | | | | | | | | | Turns out that the overloading of vtable methods and regular ones is problematic in some cases. So let's rather make it explicit which methods are part of the vtable, and which aren't. Change-Id: Ifee32a26104d30f3c82bca8b5a9cdea2d4f4f526 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Clean up the property key API in StringOrSymbolLars Knoll2018-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of makeIdentifier(), as toPropertyKey() will take care of it. Rename identifier() to propertyKey() and check that the key is valid. Remove String/StringOrSymbol::asArrayIndex(), we don't need it anymore. Change-Id: I3c490fabc1475c9ea288b49b1638b6fa1bc237b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Replace Identifier by PropertyKeyLars Knoll2018-07-023-5/+5
| | | | | | | | | | | | | | | | Change all uses of Identifier to use the new PropertyKey class and get rid of Identifier. Change-Id: Ib7e83b06a3c923235e145b6e083fe980dc240452 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Cleanups in the Identifier APILars Knoll2018-07-021-1/+1
| | | | | | | | | | | | | | | | | | | | Rename from/asHeapObject to from/asStringOrSymbol and fix the signature. Add a isStringOrSymbol() method and redefine isValid() to also include array indices. Change-Id: Ic8272bfbe84d15421e2ebe86ddda7fdaa8db4f3e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Unify the get and getIndexed vtable functions of QV4::ObjectLars Knoll2018-07-023-37/+37
| | | | | | | | | | | | | | | | This finalizes the refactoring of Object's vtable API. Also added the receiver argument to the method as required by the ES7 spec. Change-Id: I36f9989211c47458788fe9f7e929862bcfe7b845 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Unify put and putIndexedLars Knoll2018-07-022-7/+6
| | | | | | | | | | | | | | | | | | | | Pass an Identifier through those virtual methods to unify the string and integer based versions. Also add the receiver that's required in ES7 Change-Id: I4e7f01b4c97cc80bcb3c485f6343f28213dc9e6b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Internal naming cleanupSimon Hausmann2018-06-291-2/+2
| | | | | | | | | | | | | | | | | | Rename QV4::CompiledData::Binding::containsTranslations() to isTranslationBinding() in an attempt to improve the readability of the code. Change-Id: I73898298c4295d0def812c0526d908254d73c243 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | QQmlInstanceModel: add virtual function to get abstractItemModelRichard Moe Gustavsen2018-06-273-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new virtual function to query the model if it's backed by a QAbstractItemModel. This will be needed later when we create another model (QQmlTableInstanceModel) that also inherits QQmlInstanceModel. By having this virtual function, we don't have to check and special case what kind of model is assigned to QQuickTableView, as long as it has a QAIM. Change-Id: I4080fd601ca1988c5fe448d68bdd156740403c60 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Liang Qi2018-06-258-13/+13
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devUlf Hermann2018-06-258-13/+13
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/packetprotocol/qpacketprotocol.cpp src/quick/handlers/qquickhandlerpoint.cpp src/quick/handlers/qquicksinglepointhandler.cpp tests/auto/qml/ecmascripttests/test262 Change-Id: I8908ec8c6116ca626fbd269af7625d4c429429ca
| | * Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-198-13/+13
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>