aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* QtQml: document QQmlExtensionPlugin::baseUrlShawn Rutledge2013-06-282-1/+10
| | | | | | | | | | | It was added here https://codereview.qt-project.org/#change,47532 without documentation. Also updated \since because for now qdoc seems to interpret \since 5.0 as QtQml 5.0. Task-number: QTBUG-31928 Change-Id: I652e9471f1ad8e83b355bffc8498a6565dc9aa2b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Switch to non-streaming version of qWarning()Alan Alpert2013-06-271-2/+1
| | | | | | | | | Allows us to drop the qdebug.h include in a public and frequently used header. Change-Id: I2cb05fbec6298ba600020db684e9eea4093ce663 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Undo presumably accidental line deletionAlan Alpert2013-06-271-0/+1
| | | | | Change-Id: I7ddb3ef9b45cfb95c48c2060dc62acd4ed9d64f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update 5.1.0 changelog and what's newAlan Alpert2013-06-251-0/+5
| | | | | | | All the new features should now be listed in those two documents Change-Id: Ifa17581bf589f3a18b602f8a1d10683a5e48c70d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* QQmlPlatform: rename "mac" to "osx"J-P Nurmi2013-06-242-3/+3
| | | | | | Change-Id: Ie458690b8008b211785cf9dcc0312a7e25c84f6b Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix null-pointer access in QQuickVisualDataModelPrivateFlorian Hänel2013-06-071-1/+2
| | | | | | | | | | I observed null cachItem->contextData which lead to null-pointer access on cacheItem->contextData->destroy(). Task-number: QTBUG-31439 Change-Id: I91f28a3ee1ac83446ecde1801a1cb7962fb883f3 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Add future compatibility noteAlan Alpert2013-06-071-0/+4
| | | | | | | | | | | File selectors are being delayed from releasing at the same time as QQmlApplicationEngine, but will need to be enabled by default (in QQmlApplicationEngine only) when they do arrive. Adding a note to the documentation to help forwards compatibility. Change-Id: Ia47a1da1afebd0da3bd1a97e7e4c8ee85f70b49a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Set incubation controller when a Window{} is loaded via QQmlApplicationEngineAlan Alpert2013-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This was the one convenience that was lost when transitioning templates from QQuickView + Item{} to QQmlApplicationEngine + Window{}. As the default window incubation controller was tied to the first window's frameSwapped, we could easily run into a situation where a secondary window required incubation while the first window was idle. This would then starve the incubation controller. Instead make it so that the renderloop emits "timeToIncubate" once it is done with a renderpass over all windows, so the incubator gets to run once and exactly once per vsync when animating. The incubator logic was also flawed in that it could post a lot of events to itself as a result of incubatingObjectCountChanged and thus starve system events while processing incubation requests. Now we start a timer and don't start it again until we have completed an incubation pass. Task-number: QTBUG-31203 Change-Id: Iea9e2c81efb46bb7875c70ccda0cdc4b3b3e58e7 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fixed QCH listings for Qt QML and Qt Quick DialogsJerome Pasion2013-06-061-1/+5
| | | | | | | | | Qt QML: added QML types page as a child in the list Qt Quick Dialogs: "manual" as type taken out Change-Id: I95d77b7582a0f5729801e1e6fb8f5f3242a0b760 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Clarified members of QtQml.Models submodule.Jerome Pasion2013-06-048-68/+72
| | | | | | | | | | | | | | -Took out members of QtQml.Models submodule from Qt QML and Qt Quick. -Set up qdocconf files to include QtQml.Models to be part of Qt QML doc build. -Edited the sentences to make it clearer that list and model types are in QtQml.Models. -Placed the Visual* types back to QtQuick 2 module. -This patch removes several collision pages. Change-Id: I16e7045162af6852e5d6c3162b6f4cf97a42402b Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QQmlPropertyCache: check methods before propertiesAlberto Mardegan2013-05-311-21/+25
| | | | | | | | | | | | | | | When creating the QQmlPropertyData, search within the methods list before searching for properties. The reason is that if the meta object is dynamic, looking up a property will always return a result (if the property doesn't exist, it will be created) and therefore all methods will be obscured. By swapping the search order, we eliminate this risk (methods are not dynamically added). Task-number: QTBUG-29836 Change-Id: Ie367f757c37ef4bc834a6c1c009f27bcf344fe76 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fallback to QMetaObject for properties not in QQmlPropertyCacheAlberto Mardegan2013-05-312-3/+10
| | | | | | | | | | | | QQmlOpenMetaObject does not update the QQmlPropertyCache when new properties are added, meaning that the QQmlPropertyCache might not contain all of the dynamic properties of an object. Therefore, make QQmlPropertyCache fallback to reading the QMetaObject when a property is not found. Task-number: QTBUG-31226 Change-Id: I760aaa155b1952f6f52ab9ce173fb9547f8e34a6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Deprecate the with statement in QMLSimon Hausmann2013-05-314-2/+21
| | | | | | | | | | | | | It is generally considered deprecated in JavaScript and its use disables a whole range of optimizations that we would like to apply in the future. Therefore this patch will issue a warning if the with statement is detected. This change is also documented, along with the plan on enabling strict mode in the future. Change-Id: Ie60f0536e0bdd6ecc537d8e34efbd8868bcad743 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Added Qt 5.1 details in Qt QML's release notes.Jerome Pasion2013-05-301-1/+22
| | | | | Change-Id: Ie5a4199563b22c21d7be009aeb85206670b84642 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Fix links for ListModel and ListElement typesTopi Reinio2013-05-291-2/+6
| | | | | | | Link to documentation under QtQml module. Change-Id: Id65d237558c235dcdda8ab206eddef23c2886a29 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Animations: Avoid accessing invalid memory if stop() triggers deletionKai Koehne2013-05-291-2/+2
| | | | | | | | | Return immediately if calling stop() results in the current object being deleted. Task-number: QTBUG-31247 Change-Id: I684a858bfb4cc53f415daa8cc1c4df96067daa1c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QmlProfiler: fix SceneGraph profilingChristiaan Janssen2013-05-271-1/+1
| | | | | Change-Id: I54c960f0b0da061816223a51795c83a9f9dd3f66 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Debugger: Make sure client list is protected by mutexKai Koehne2013-05-241-0/+3
| | | | | | | So far we didn't protect this access. Change-Id: Id738453db5e655371fa2fbf88f81cab6c0af466f Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Do not return cacheItem->object if it is still incubatingAlbert Astals Cid2013-05-231-3/+8
| | | | | | | | | | | | | | | | | | | | It can happen that cacheItem->object in QQmlDelegateModelPrivate::object already has a value but that the cacheItem->incubationTask is still Loading. If we return the object here we can confuse some of QQmlDelegateModel consumers like QQuickItemView. E.g. in QQuickItemView if we get to return the object before the createdItem signal is emitted we will make that when the createdItem signal happens QQuickItemView::createdItem will be called it will add the item to unrequestedItems items and will expect that layout/refill will remove it from unrequestedItems if it is really one of the items we are creating, but as it has been already created the item will wrongly remain in unrequestedItems making the item view to act weird Task-number: QTBUG-28403 Change-Id: I4359391eb2a4012afd3f01d082a99692d63b6639 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Partial fix for deferred properties when combined with componentsAlan Alpert2013-05-225-15/+36
| | | | | | | | | | | | | | | | | Current deferred properties implementation did not store context or compiled data pointers correctly. Those pointers are now stored when the defer is reached, so as to avoid confusion (confusion leads to asserts or crashes). Does not extend the deferred property support to allow multiple deferred blocks per item. This now prints and error and the side effect is only that one of the deferred blocks is lost. This use case is sufficiently rare that it may not be worth the cost. Task-number: QTBUG-30325 Change-Id: I80cb074ed4452e95020208a0142a91e721bced7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix comment: Signal is actually createdItem not itemCreatedAlbert Astals Cid2013-05-221-1/+1
| | | | | Change-Id: Ie2a259a02becdf6fb0c21d93013e0e3148187ed8 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Fix some broken linksSze Howe Koh2013-05-203-8/+8
| | | | | Change-Id: I1385a8947107a7c80b32306fc587aff45536a4ec Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Prefer qFatal to assert for failure conditionMatt Vogt2013-05-191-4/+7
| | | | | | | Otherwise the explanatory message won't be seen in release mode. Change-Id: I5c9fbc86753ac5ecea3d0714b8f17207f6b713d6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Assert instead of crashingAlan Alpert2013-05-161-0/+4
| | | | | | | | | | | Using a singleton (at least a QJSValue one) improperly leads to a crash. Assert with an explanatory comment is a low-cost improvement until better capitalization checking is implemented. Task-number: QTBUG-30090 Change-Id: I237a1dd2aab743ae1f09e8d653aa5aeb4bd0240f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Inline a short snippetSze Howe Koh2013-05-161-61/+0
| | | | | | | | | | An indirect way of fixing a broken snippet path. The entire (but very short) file is included as a snippet in only one place, and the license text takes far more space than the snippet. Change-Id: I6f4bf588b8701b655d418a71f83a2f9263d6b532 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Move snippet into correct moduleSze Howe Koh2013-05-161-125/+0
| | | | | | | | The snippet belongs to Qt Quick's "QML Basic Type: color" (src/quick/doc/src/qmltypereference.qdoc) Change-Id: I47defee04c34f9c98ec57d840c377c680d114d71 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Do not use an export macro in the function definitionThiago Macieira2013-05-151-1/+1
| | | | | | | | | | qmlExecuteDeferred is exported using Q_QML_EXPORT in qqml.h, so we don't need to use one here. Better not have any than have the wrong one, which can cause problems. Cherry picked from d6d2074ff in qtquick1 Change-Id: Ief978feb503b7381ed462f71ebbd7986bd6862c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Update references to QDeclarative* classesSze Howe Koh2013-05-151-1/+1
| | | | | Change-Id: Ifbde8c1ccfc0c759da6f2204320b9170a04179eb Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Move exports conflicting with QtDeclarative into namespaceKai Koehne2013-05-154-12/+84
| | | | | | | | | | | | | | Move exported qml* symbols that conflict with QtDeclarative into an - automatically imported - namespace. This ensures apps can link against both QtDeclarative and QtQml. To keep the BC promise the old symbols are still exported. Task-number: QTBUG-29584 Change-Id: I3d31c36ca4e2faaf6f5d67a77c5c5a304c0338a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: corrections, spelling, and ListView requirements commentsDavid Fries2013-05-151-3/+2
| | | | | | | | | | From the ListView comment I thought the model had to be derived from QAbstractListModel, but that's not the case, QAbstractListModel will work just fine, it just doesn't support specific cases such as trees. Change-Id: I59305006540ddc049e276cf412571373cbfa6c67 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Removed pages from the "qml-features" group.Jerome Pasion2013-05-151-2/+0
| | | | | | | | | -This group is from Qt 4 and no longer relevant in Qt 5. -The \group page in qtdoc is removed. Change-Id: I6349a9056ae45c98b31c70fd693adecf71e2ba8c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Doc: Fixed a bunch of missing snippets.Jerome Pasion2013-05-157-13/+285
| | | | | | | | -moved delegate model related snippets from Qt Quick to Qt QML. -corrected snippet paths Change-Id: If688f97fb9317def16f343d5502a6a54d6761e95 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Doc: Define Qt global object as a QML type and fix referring docsTopi Reinio2013-05-1511-30/+31
| | | | | | | | | | | This change adds the Qt global object as a QML type in the Qt QML module and fixes links to it in documentation. Task-number: QTBUG-29353 Change-Id: I1690224091a79a3309fac7a78aa0c0c734449e4f Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: fixed some WS issues.Jerome Pasion2013-05-141-9/+9
| | | | | | | -generated by git-split-ws tool Change-Id: Icf1e85d01c818396e8dffb9b6aba2c132acfaaa1 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix crash in QQmlApplicationEngine when loading finishesJosh Faust2013-05-141-1/+2
| | | | | | | Task-number: QTBUG-30997 Change-Id: I10cb2c689408d1b31360095c2aa9e0943a5d9452 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Make QQmlInstantiatorPrivate bools more space efficientAlan Alpert2013-05-091-5/+5
| | | | | Change-Id: Ie7a4951d66763c55148f02c6c88241c8ad363a90 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Fix MSVC-warning about inconsistent DLL-linkage.Friedemann Kleint2013-05-091-2/+2
| | | | | | | | Introduced by 9b5a55101d7c519446c1cf3706a235dea81ad4de . Task-Number: QTBUG-28572 Change-Id: I5e7d012d22c701b2b15ab288d2c72f177caf904e Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Move xmlrole.qml to the correct locationJan Arve Saether2013-05-081-81/+0
| | | | | | | | | The snippets that qqmlxmllistmodel.cpp referred to could not be found. xmlrole.qml is only referenced from src/imports/xmllistmodel/qqmlxmllistmodel.cpp Change-Id: I95f962927097cd9d3295fbc2b376a9ab27ae6e5c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix Instantiator response to model changev5.1.0-beta1Alan Alpert2013-05-082-3/+8
| | | | | | | | | | | | | | Objects were not being created correctly when the model changed after componentComplete. After correcting that the model change can lead to an intermediate count change when the old model is cleared, so a flag is set to ignore intermediate changes fom the QQmlDelegateModel when the model changes. Task-number: QTBUG-30379 Change-Id: I55519c9ee378a1b0569567137ebd378f32a6c85c Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Add qmlClearRegisteredTypes FunctionAlan Alpert2013-05-078-3/+58
| | | | | | | | | | | Registered types are stored in a global static variable, not on an engine instance. For applications managing multiple engines over their lifetime, there needs to be a way to clear the existing types so they can register new ones and avoid memory leaks. Task-Number: QTBUG-28572 Change-Id: Ic70a4dd1e29d99399b21fb42eaf10d4a52bf2adf Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Add a URL interceptor to the QML engineAlan Alpert2013-05-0710-20/+240
| | | | | | | | Allows for custom file handling to a greater extent than the QNetworkAccessManager. Change-Id: Ifd3946bf33530c40ca2edeeb9f441f712e4941f6 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Doc: Fix some broken snippet pathsSze Howe Koh2013-05-061-2/+2
| | | | | Change-Id: Ib79bfbea402b86e26a503de47383522317ca906b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QmlProfiler: SceneGraph profilingChristiaan Janssen2013-05-062-29/+113
| | | | | Change-Id: Ide71b330b13fc3816ed191bd9af84e0fce0d9587 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Avoid rare crashAlan Alpert2013-05-041-10/+12
| | | | | | | | | In the case where a QML type had been registered with the same metaobject, you could dereference the c++ type union data when it hadn't been allocated. Change-Id: I906d68710cf88b379933eb13cf0668738f07d5f4 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Doc: Move example docs related to QtQml under the correct moduleTopi Reinio2013-05-031-48/+48
| | | | | | | | | | | This change moves 'Extending QML' qdoc file and the tutorials from examples/quick to examples/qml, which is the correct location for them. Change-Id: I24bd9dfa75baaab7bc8efe08489f09a7b65d98a6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix crash in QQmlDelegateModelAlbert Astals Cid2013-05-031-3/+23
| | | | | | | | | | | | | | | | | | | | It can happen that when the QQmlDelegateModel goes away some of the QQmlDelegateModelItem from d->m_cache are still incubating, this means that isReferenced() will return true and we will not delete them. This also means that when these QQDMIncubationTask finish they may end up calling QQDMIncubationTask::statusChanged which will try to access the delegate model that is already gone. This commit makes sure we set vdm to 0 in these orphaned QQDMIncubationTask so in QQDMIncubationTask::statusChanged we know no one cares about us anymore and don't reference the already gone delegate model Task-number: QTBUG-30928 Change-Id: Ief6176cec151d861dad09ca2498ca27e17ee6385 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Document percieved memory leakAlan Alpert2013-05-012-0/+6
| | | | | | | | | | | | QJSEngine doesn't call collectGarbage upon deletion, because this operation can be expensive and in most cases the JS engine is deleted during application shutdown, when the memory can be deallocated cheaper. This can lead to an apparent memory leak if multiple engines are created and destroyed in the same process. Documenting how to avoid this. Change-Id: Ie02cb8bedc8821e0bb04dfa52a5a2d65b4b085a3 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Elaborate on versioning docsAlan Alpert2013-05-011-0/+5
| | | | | | Task-number: QTBUG-30808 Change-Id: I1930bd91a6c2089047ac7e7d74da2c977c522e07 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix VS2010 compile warningAlan Alpert2013-05-011-1/+1
| | | | | | | | | warning C4510: 'QQmlPrivate::RegisterCompositeType' : default constructor could not be generated Task-number: QTBUG-30454 Change-Id: I16ec8995ac1df3c92353006473ca082c4ed4e5b7 Reviewed-by: Josh Faust <jfaust@suitabletech.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QmlProfiler: Pixmap CacheChristiaan Janssen2013-04-302-3/+96
| | | | | Change-Id: Ibc237bb162c24030438b89d54fa8802ee66b080a Reviewed-by: Kai Koehne <kai.koehne@digia.com>