aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
Commit message (Collapse)AuthorAgeFilesLines
* Doc: corrected broken linksNico Vertriest2015-09-081-1/+1
| | | | | | Task-number: QTBUG-43810 Change-Id: Ib47749f95c9ce9db7f2b97726c13ccb9550981e4 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Doc: fix verb redundancySamuel Gaist2015-08-191-1/+1
| | | | | Change-Id: Ifa76a814dba5271b852c2eaf8a59a2ebb5aee808 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* 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>
* Fix documentation for ItemSelectionModelGabriel de Dietrich2015-06-261-7/+12
| | | | | Change-Id: I28f61e1853ea2cc75fbf814f76a7ef09e0d17f5d Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* 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>
* 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>
* | 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>
* | QtQml: Micro-optimize iterator loops.Friedemann Kleint2015-02-261-3/+5
| | | | | | | | | | | | | | Avoid repeated instantiation of end() in loops, use variable instead. Change-Id: I3bb1c6918cfd16a5dcefbcc03c442e99fe9bf76b Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-243-4/+11
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Fix QML Timer running not being updated together with triggered signalTroels Nilsson2015-02-111-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The running property of the QML Timer should be updated at the same time as the triggered signal is emitted, otherwise code like e.g. the following: if (qmlTimer.running) { qmlTimer.stop() } doesn't work as expected. In addition if the timer is stopped or restarted between posting the QEvent_Triggered event and receiving it, the triggered event should not be emitted. This avoids the issue of stopped timers still emitting the triggered signal which can potentially cause problems in existing code. Task-number: QTBUG-44026 Change-Id: Ia14d80d152967d09adc1586467715b2e1c6662cc Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Doc: link issues qtdeclarativeNico Vertriest2015-02-041-1/+1
| | | | | | | | | | | | Task-number: QTBUG-43810 Change-Id: I154ffa83512435c3e455937a3f81931a45d9e368 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Fix possible crash when removing items from QQmlDelegateModelDaniel Vrátil2015-02-021-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When iterating over the cache in QQmlDelegateModel::_q_itemsRemoved(), removing of some of the items can trigger layout change in the view, which might in turn remove a QQmlDelegateModelItem from the cache, causing us to dereference an already deleted pointer. To prevent crash, we always check whether the item is still valid in the original cache and skip it if it has been removed in the meanwhile. Task-number: QTBUG-34351 Change-Id: Ib91a0544e11dbd7bf6d82fa4dc4400cac9d0b5f7 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Fix deprecation warnings about constructing QString from const char*.Friedemann Kleint2015-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | types/qqmlmodelindexvaluetype.cpp: In static member function 'static QString QQmlModelIndexValueType::propertiesString(const QModelIndex&)': types/qqmlmodelindexvaluetype.cpp:47:56: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations] items/qquickimagebase.cpp: In member function 'virtual void QQuickImageBase::load()': items/qquickimagebase.cpp:213:49: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations] items/qquickimagebase.cpp:213:88: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations] Change-Id: I03266aba589ade8228bc286cd3f3f237cd06a780 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* | QML Models: Register ItemSelectionModelGabriel de Dietrich2015-02-122-0/+141
| | | | | | | | | | Change-Id: I7f5c9e05c2e779d33e1bc92d698c75d97d397339 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Add Q_GADGET wrappers for QModelIndex & Co.Gabriel de Dietrich2015-02-124-0/+392
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The complete list of types is, * QModelIndex * QModelIndexList * QPersistentModelIndex * QItemSelection * QItemSelectionRange These wrapper types follow the QQmlValueType conventions and allow us to expose the wrapped types without introducing meta-type changes. They also allow to customize the string type representation. We also extend QQmlValueTypeFactory to return the meta-object for those types. Finally, we add two-way meta-type conversion between QModelIndex and QPersistentModelIndex to get the same interoperability as in C++ when passing an object of one type to a function requir- ing an object of the other type. Change-Id: Iaa7089ea576c901f12715ffa21e4d94603d53755 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1225-170/+170
| | | | | | | | | | | | | | | | | | 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>
* | CleanupsLars Knoll2015-01-232-10/+10
| | | | | | | | | | | | | | | | Simplify some code in BooleanObject Simplify access to call arguments and thisObject Change-Id: I2f8e844019bc587385608beb02f05b15f827535c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | CleanupsLars Knoll2015-01-232-2/+2
| | | | | | | | | | | | | | | | Remove duplicated methods. Remove some mostly unused methods, and simplify some others. Change-Id: I605b249e54417bb32c3dfc8e22f2c8b6b684a1e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of most uses of ValueRefLars Knoll2015-01-234-49/+42
| | | | | | | | | | | | | | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of all uses of Managed::engine()Lars Knoll2015-01-211-4/+4
| | | | | | | | | | Change-Id: I596f14554d81f5e9af9996294d96047f2e810bef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove all the setVTable() calls that aren't required anymoreLars Knoll2015-01-212-4/+0
| | | | | | | | | | | | | | | | The memory manager's allocation methods now set this up correctly for us :) Change-Id: I8492bf732df601f95a1a851fb3804127ffc83935 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Models: Remove QModelIndex metatype re-declarationGabriel de Dietrich2015-01-201-2/+0
| | | | | | | | | | | | | | It's absolutely unnecessary. Change-Id: Ib9e4077a8720b7f58886b85c4feabe18205ccb41 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Make sure we always have an engine when assigning to a PersistentLars Knoll2015-01-132-5/+5
| | | | | | | | | | | | | | This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Get rid of Value::engine()Lars Knoll2015-01-121-4/+4
| | | | | | | | | | | | | | | | | | This method is not guaranteed to return an engine. We're safer checking for the value being an object first and then getting the engine from there. Change-Id: I5c95e675337e545f2421613bd31c42d1e58d6f9a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup variant conversion codeLars Knoll2015-01-092-11/+11
| | | | | | | | | | | | | | | | Make public methods proper members of the ExecutionEngine, and move private methods into the .cpp file only. Change-Id: I3ca49e39bb1c4e559a2c63346e6ae6cfa446147d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move the variant conversion methods from qv8engine to qv4::ExecutionEngineLars Knoll2015-01-092-11/+11
| | | | | | | | | | Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Move extension mechanism over to use the v4 engineLars Knoll2015-01-081-7/+6
| | | | | | | | | | Change-Id: Ib329fc7bcae3c78d962a116f53b2244a71f81228 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove qv8engine usage in the contextwrapperLars Knoll2015-01-081-1/+1
| | | | | | | | | | Change-Id: Iaf807add5d971e96cac57e38e13385e901f9c930 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Reduce v8engine dependency for the list modelLars Knoll2015-01-085-65/+61
| | | | | | | | | | Change-Id: Ib9e39a886c918a8f6ee1477465895739f90e1a0a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Further reduce v8engine dependenciesLars Knoll2015-01-081-1/+1
| | | | | | | | | | Change-Id: I9f50f5ed1928de0c389c9646b308b431b51dae37 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use QV4::ScopedObject typedef instead of actual typeOleg Shparber2015-01-033-6/+6
| | | | | | | | | | Change-Id: I0b68c534ea513a7c230b12114f6b42b069f9864b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use QV4::ScopedFunctionObject typedef instead of actual typeOleg Shparber2015-01-021-1/+1
| | | | | | | | | | Change-Id: I6b4effaa5bef992b4ae9402eea7fe655bc7b18f0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Use QV4::ScopedString typedef instead of actual typeOleg Shparber2015-01-021-2/+2
| | | | | | | | | | Change-Id: I64ecbf6cea463387a70e909ecc5f9165d22a7b0f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove v8engine dependency in fromVariant conversionsLars Knoll2015-01-022-2/+2
| | | | | | | | | | Change-Id: I3427129dc7a0e68c8fa0b61f353835e2bee179a0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove v8engine dependency in toVariant conversionsLars Knoll2015-01-021-1/+1
| | | | | | | | | | Change-Id: I0f2f77c9cc268a0c5ca3ffe0cd66fc98bb1964b3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove v8engine dependency from qv4serialize.*Lars Knoll2015-01-011-4/+4
| | | | | | | | | | Change-Id: I5b4c1247286bf18c96df3b68b7bae9feefbbdbc9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove most of the places where getPointer() is usedLars Knoll2014-12-203-18/+18
| | | | | | | | | | | | | | This is no longer required, and simply uglifies the code Change-Id: Iba91a1d7735ebe23a43437f137a488423b6eb743 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Return Heap::ExecutionContext for globalContext()Lars Knoll2014-12-192-13/+15
| | | | | | | | | | Change-Id: Ide7c81735be4662ff45bf268cfe750ff1f784453 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Encapsulate accesses to the root contextLars Knoll2014-12-112-13/+13
| | | | | | | | | | Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-093-5/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * Fix \inqmlmodule usage: only use one parameterAlejandro Exojo2014-12-083-5/+5
| | | | | | | | | | | | | | | | Since the command just links back to the corresponding module page, only the first parameter is used, and the version causes more confusion. Change-Id: I73ed289550c576747132f77b83c1257094059cd1 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* | Cleanup destruction of heap objectsLars Knoll2014-11-212-12/+2
| | | | | | | | | | | | | | | | Generate the code from a macro instead of duplicating boiler plate code. Operate on Heap::Base instead of Managed. Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Cleanup exception catching codeLars Knoll2014-11-151-6/+3
| | | | | | | | | | Change-Id: I85afd5758f72e19c280dc196601ee145f0c25f01 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Changed MemoryManager::alloc<T> to return Heap::T* instead of T*Simon Hausmann2014-11-151-3/+3
| | | | | | | | | | Change-Id: Iede1ba624d1313fbe2f8e5e979e936f1f32efdc9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Replaced more usages of Returned<T> with Heap::T*Simon Hausmann2014-11-141-6/+6
| | | | | | | | | | Change-Id: I451128ee71610bfeb71139c28da89a00a8209ec6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Move data for remaining objects in QtQml into the Heap namespaceLars Knoll2014-11-111-47/+66
| | | | | | | | | | Change-Id: Iefef658dc246b5087d5061d964f08378b56c6cef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>