aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fix QtSharedPointer::ExternalRefCountData object leaks"J-P Nurmi2015-12-231-3/+0
| | | | | | | | | | This reverts commit 839d2d3e2368bc8e107d22203b0611c852f54319, which has been causing crashes in qtquickcontrols2 auto tests and making it nearly impossible to integrate anything over the past few days. Change-Id: I570b286a067aae5e3c2d8c56ad601e1a6cb58c20 Task-number: QTBUG-50134 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix QtSharedPointer::ExternalRefCountData object leaksJian Liang2015-12-181-0/+3
| | | | | | | | | | | Call destroyObject() for every QV4::Heap::QObectWrapper object in heap in QV4::MemoryManager::sweep() to make sure the QPointer object contained in QV4::Heap::QObjectWrapper is properly destructed. We also keep track of QObjectWrapper in QV4::Heap::ModelObject to make sure we destory them in QV4::MemoryManager::sweep() Change-Id: I3b3e96cfc300c2e21ab691762879ac2970afa90c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix bogus warning when using Binding on value typesLars Knoll2015-11-271-26/+20
| | | | | | | | | In addition streamline the code and only do the lookup of the property name once. Change-Id: If2bad4b9179214492ff5692cf1f503f927ca2246 Task-number: QTBUG-48918 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Doc: fixed link issuesNico Vertriest2015-10-301-1/+1
| | | | | | Task-number: QTBUG-43810 Change-Id: I9f989cd59780ab325cd3f8ddb824868763e369b3 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Binding: document that property can be grouped if it's a value typeMitch Curtis2015-10-231-0/+17
| | | | | Change-Id: Ie33410027556857fefb87517ebb336c2714bc6c6 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: fixed compilation and link errors qqmlitemmodels.qdocNico Vertriest2015-10-151-20/+20
| | | | | | Change-Id: Ifed9787a4fc00a235faf043dbb0b1871fbfa9b06 Task-number: QTBUG-43810 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: corrected syntax errors \qmlmethodNico Vertriest2015-10-151-2/+2
| | | | | | | Task-number: QTBUG-43810 Change-Id: I694e9046ba32144b084277637b47d7ce23c633a9 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-069-0/+99
| | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-1/+1
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Doc: corrected broken linksNico Vertriest2015-09-081-1/+1
| | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: Ib47749f95c9ce9db7f2b97726c13ccb9550981e4 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Improve warning for QtQml.BindingTobias Koenig2015-09-241-3/+33
| | | | | | | | | | | | | | | | | | | | Print a warning if there is no property with the given name of the specified target object, or the property is read-only. Change-Id: I5dc2e8330fb1ce53be396b7bf5baf13c1702d2f4 Task-number: QTBUG-39243 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move remaining objects to new constructor syntaxLars Knoll2015-09-224-21/+14
| | | | | | | | | | | | | | Also disable the old way of constructing objects. Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Convert FunctionObjects to new allocation syntaxLars Knoll2015-09-221-1/+1
| | | | | | | | | | Change-Id: I269c20abdc7f9eb0d71a2d2d485d622b65405762 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Further cleanupsLars Knoll2015-09-152-2/+2
| | | | | | | | | | | | | | Reduce usage of ScopedContext. Change-Id: I84a6a7478065de3398fd0b21596ca1308e78ceb3 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Implement QQmlListModel::setData()Tobias Koenig2015-09-142-0/+25
| | | | | | | | | | | | | | | | | | | | Extending QQmlListModel by setData allows us to modify the content of the ListModel from within a delegate by doing an 'model.someProp = someValue' assignment. Change-Id: I87e4c31aca3813f099b2a4fd694beb2492a03bd0 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Centralize access to qml contextLars Knoll2015-09-091-11/+10
| | | | | | | | | | Change-Id: If601262c7fd2d304491d60f63a7b9bcd4118cee8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Pass a QmlContext to QV4::Script instead of a contextwrapperLars Knoll2015-09-091-3/+4
| | | | | | | | | | Change-Id: Ia8db166aacbbe6e8f588179dffa04e2dce9566cb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Doc: Fixed several link errorsNico Vertriest2015-09-071-1/+1
| | | | | | | | | | | | | | Change-Id: I684b8c0d238b7592b49abc0156bbc9791fdf6991 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-211-1/+1
|\| | | | | | | | | | | | | Conflicts: tools/qml/main.cpp Change-Id: I6d521b21be85d91ebb96c28e2c64186f02d94842
| * Doc: fix verb redundancySamuel Gaist2015-08-191-1/+1
| | | | | | | | | | Change-Id: Ifa76a814dba5271b852c2eaf8a59a2ebb5aee808 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Fix performance of ListModel::get()Simon Hausmann2015-08-193-58/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When called, the function would return a full-fledged QObject that maps the list element addressed. It would contain a _copy_ of all values in the list item and it would create a new meta-object for each list element. This function exists for the JavaScript API, and therefore we now return a much more lightweight object. For compatbility reasons it still has to be a QObject, but the meta-object of it is created on-demand, i.e. only when accessing properties from the C++ side or when connecting to the changed signal of a property. Otherwise the JavaScript wrapper will return the live values from the model without copying them. Change-Id: Iabf3ca22192d2aee06ae9d4b4cfb2fcde2a021b1 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Spencer Schumann <spencer.schumann@echostar.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Ulf Hermann2015-08-181-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv4debugservice.cpp src/qml/jsruntime/qv4value_inl_p.h src/qml/jsruntime/qv4value_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/qml/qqmlnotifier_p.h src/qml/qml/qqmlproperty.cpp src/quick/items/qquickflickable.cpp src/quick/items/qquicktextedit.cpp tests/auto/quick/qquickwindow/BLACKLIST The extra changes in qqmlbinding.cpp are ported from changes to qqmlproperty.cpp that occurred in parallel with writeBinding() being moved to qqmlbinding.cpp. Change-Id: I16d1920abf448c29a01822256f52153651a56356
| * Instantiator: fix typo in docsAndrew Knight2015-07-261-1/+1
| | | | | | | | | | | | | | The method is objectAt(), not itemAt(). Change-Id: Ie37636a6f9a641edfe3ec2b47def8806b9b10aa8 Reviewed-by: Martin Smith <martin.smith@digia.com>
* | qml: Avoid heap allocations due to QString::fromLatin1()Sérgio Martins2015-08-131-3/+3
| | | | | | | | | | | | | | By using QStringLiteral when the argument is a literal. Change-Id: Ib25042d10f3d9d0aca81af74cde0107aba4f9432 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Polished documentation for the Binding type.Kavindra Palaraja2015-07-211-39/+30
| | | | | | | | | | | | | | | | | | The current documentation was a bit wordy and not concise. Made some changes to simplify the sentences and also changed the code samples to use \qml instead of \code for improved syntax highlighting. Change-Id: Iefa14ca34a749ebd039f47e26e51086e00684c6f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | qml: Pass non-trivially-copyable types by const-refSérgio Martins2015-07-204-6/+6
| | | | | | | | | | Change-Id: Id3d960ee8236a4c6f4bb4e0add1f88dfa32d3592 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-301-7/+12
|\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/qml/qqmlengine.cpp src/quick/items/qquickitemsmodule.cpp tools/qml/main.cpp Change-Id: Ida8daf6b4d7e675385f2f5514c446e52dedaf136
| * Fix documentation for ItemSelectionModelGabriel de Dietrich2015-06-261-7/+12
| | | | | | | | | | Change-Id: I28f61e1853ea2cc75fbf814f76a7ef09e0d17f5d Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Save another pointer in QQmlBoundSignalLars Knoll2015-06-181-1/+1
| | | | | | | | | | | | | | | | | | isEvaluating is not really needed as it's tightly coupled to the isNotifying flag in the parent class. Use that instead, to get rid of it. Change-Id: Ic7274ac54e4d380567522c8a549b98d5ed1a1798 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move the StringValue members of ExecutionEngine onto the JS stackLars Knoll2015-06-101-1/+1
| | | | | | | | | | Change-Id: Ib55c05f1730b7659e2f6fee7e1fa79c10c759167 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Make bindings refcountedLars Knoll2015-06-101-9/+8
| | | | | | | | | | | | | | | | | | | | | | Refcounting our bindings greatly simplifies our memory management of the objects and ensures we safely clean them all up. In addition, it allows us to remove the m_mePtr and weak reference handling from QQmlAbstractBinding as we can safely handle this through the same mechanism. Change-Id: If23ebc8be276096146952b0008b62018f5d57faf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | ObjectModel: add API for dynamic changesJ-P Nurmi2015-06-103-16/+200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the ListModel API: - object get(index) - append(object) - insert(int index, object) - move(int from, int to, int n) - remove(int index, int n) [ChangeLog][QtQml][ObjectModel] Added get(), append(), insert(), move() and remove() methods. Change-Id: I592e55b7c4c933a1100191bf5a9405944b347172 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | Add missing QVector::reserve() callsSérgio Martins2015-06-051-1/+3
| | | | | | | | | | Change-Id: Iab7c9949941559b4773e5d4a0406dc58cfc70adb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-06-041-2/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/quick/items/qquickitemsmodule.cpp src/quick/items/qquicktext.cpp src/quick/util/qquickpixmapcache.cpp tests/auto/quick/qquickwindow/tst_qquickwindow.cpp Change-Id: I90ecaad6a4bfaa4f36149a7463f4d7141f4a516a
| * Purge use of VisualDataModel from docs where DelegateModel is requiredAlex Blasche2015-05-281-2/+2
| | | | | | | | | | | | | | | | | | They are the same types except that VisualDataModel is deprecated and uses a different import statement. Now, references to VisualDataModel are only used where we explicitly refer to the replacement/deprecation. Change-Id: I1e68eb5784235a00233b3882c3d91e21e32af7d1 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Fix build with QT_STRICT_ITERATORSSérgio Martins2015-05-151-4/+4
| | | | | | | | | | Change-Id: I3df6ac107cb46b3a1b15b80f39d7c6015adcd9ac Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-04-282-8/+34
|\| | | | | | | | | | | | | Conflicts: tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I075e742da8396a268d97d3ab34bcd9e0c0cf001f
| * Merge remote-tracking branch 'origin/5.4' into 5.5Simon Hausmann2015-04-271-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf tests/auto/qml/qqmlxmlhttprequest/tst_qqmlxmlhttprequest.cpp Change-Id: I715b8a78b74cbe0dcaf599367fd6e08af4858e11
| | * fix model leak in QQmlInstantiatorAlexandr Rekunkov2015-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ieb6ef229bc999f1a35adc2a157bd42a38908f7d7 Task-number: QTBUG-45271 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * | Instantiator: Make asynchronous mode workGabriel de Dietrich2015-04-252-7/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch proceeds in two steps. First, and the most trivial, we make sure not to offend the Instantiator's objects container since asynchronous creation also means the objects can be created in any order. We do so by ensuring the objects container has always the necessary size. The second step is to make sure the objects don't get destroyed by the delegate model when their incubation tasks are asynchronous. We force to keep an extra reference calling the object() function on the instance model, but only if the creation was asynchronous. However, it's not enough to check for the Instantiatior async value since the incubation tasks in QQmlDelegateModel are async-if-nested. Therefore, we need to keep track of the object index requested to the model and see if it matches when the createdItem() signal gets emitted. Task-number: QTBUG-36410 Change-Id: I180b03b6a7468d6521827a9631755577e9e6d357 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | | Simplify binding setup code furtherLars Knoll2015-04-271-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | Reduce the number of setBinding/removeBinding overloads and simplify their internal handling. Change-Id: I87174a3b2dc0ecb8380e8fc28f8969fbf475c728 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Make removal of bindings explicitLars Knoll2015-04-251-2/+1
| | | | | | | | | | | | | | | | | | | | | This simplifies the code for further refactoring. Change-Id: I6bcb5ce397f642242af80ce37dc8bba1fa9bf3f5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Get rid of qv4value_inl_p.h and replace it by qv4typedvalue_p.hLars Knoll2015-04-242-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This is a cleaner separation and further reduces include dependencies in the definitions of our basic data structured. Change-Id: I18aa86cdea0c0dfbc16075d4d617af97e638811e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | More cleanupsLars Knoll2015-04-212-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | Get rid of Value::asObject(), and pass const Managed pointers into some more vtable methods. Change-Id: Ia4f427d5fd8868f77b4015d1ce5424d32bfc2115 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Get rid of asManaged()Lars Knoll2015-04-211-1/+1
| | | | | | | | | | | | | | | Change-Id: I853417fdf1cc339f7d43a006c20e1626b6bfb288 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Get rid of Value::asDateObject()Lars Knoll2015-04-161-3/+3
| | | | | | | | | | | | | | | Change-Id: I71816a784b5175f600c5a870318b16c0d84c42fb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | | Further cleanupsLars Knoll2015-04-162-9/+9
|/ / | | | | | | | | | | | | | | | | The get and getIndexed vtable methods should take a const Managed pointer. Start cleaning up the asFoo() methods in Value and Managed by removing asArrayObject() and asErrorObject(). Change-Id: Ibd49bf20773ef84c15785b7ac37a7bc9fd4745d5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove QItemSelection value-type, use Array insteadGabriel de Dietrich2015-03-222-64/+4
| | | | | | | | | | | | | | | | We implement this by adding QItemSelection to the set of sequence types. Change-Id: Ia3db376c806d8f062639e22c7f4bf392f114c266 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* | Remove QModelIndexList value type, use Array insteadGabriel de Dietrich2015-03-222-16/+14
| | | | | | | | | | | | | | | | We implement this by adding QModelIndexList to the set of sequence types. Change-Id: If7e0e88ab0c2916c2b65a926f8241549520d7391 Reviewed-by: Stephen Kelly <steveire@gmail.com>
* | Fix usage of QtQmlDevTools private headers on OSX with framework buildsSimon Hausmann2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this module borrowed its private headers from QtQml, so that when writing QT += qmldevtools-private, you'd get the private headers from QtQml. This doesn't work when QtQml is built as a framework. A cleaner solution is to give this module its headers proper by letting syncqt create the forwarding headers correctly (and consequently also include them in make install). In order for this to work, the included headers themselves cannot include any headers from QtQml, which this patch also takes care of, through a centralized inclusion of qv4global_p.h. Change-Id: I9bb8337956a2774cfaca6b338369face6c6ee785 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>