aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Precompile the most common materialsGunnar Sletta2013-05-312-0/+29
| | | | | Change-Id: Idfa76f9fcdbac61a248b38e1f793a6628af12552 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Doc: Fix the positioning topic pageCaroline Chao2013-05-302-14/+13
| | | | | | | | | Mention both Positioners and Qt Quick Layouts. Also add qtquickdialogs to qtquick.qdocconf. Change-Id: I19bc09a0a81be7c748af83ddf38f1111f0ecc81a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Added QQuickWindow::setDefaultAlphaBuffer()Shawn Rutledge2013-05-304-2/+37
| | | | | | | | | | | | | | All QQuickWindows will render using the same OpenGL context, so for a window to support transparency, the OpenGL context needs to be created with support for transparency from the very start. Therefore the application needs to call setDefaultAlphaBuffer() before creating windows. There are some relevant comments in QTBUG-20768 although the bug itself is not the same use case (it was already OK as long as the first window had a translucent color, because of setAlphaBufferSize in QQuickWindow::setColor()). Change-Id: I92e111c1a62c0d510821b646fd334e52254f8f57 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc fixes to the Positioners/Layouts documentationJan Arve Saether2013-05-304-12/+16
| | | | | | | | | | | * Add references to Qt Quick Layouts * Don't lie about that Positioners can resize the items * Rename title from "Item Layouts" to "Item Positioners" to avoid confusion with Qt Quick Layouts Change-Id: I43e3ad6e6d9e4b08a1233868c75f0efcab43f8c3 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@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-292-5/+9
| | | | | | | Link to documentation under QtQml module. Change-Id: Id65d237558c235dcdda8ab206eddef23c2886a29 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Fix various problems in Qt Quick Dialogs documentationTopi Reinio2013-05-291-18/+20
| | | | | | | | | | | | | | | | | This change fixes the following things in .qdocconf: - CamelCase for project name (required for generating valid tags in example manifest file). - Proper selector for QML Types topic - Fix exampledirs to not pull in all the Qt Quick examples - Add examplesinstallpath to make Qt Creator see the examples Also fixes the paths in example docs according to changed exampledirs. Change-Id: If18f7b5a3160d85814d508e1cbfb7bdb1a002c54 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: Excluded Dialogs directory from Qt Quick doc build.Jerome Pasion2013-05-291-0/+3
| | | | | | | | | | Qt Quick Dialogs is separate and should be excluded from the Qt Quick doc build. Task-number: QTBUG-30180 Change-Id: I6e63efc071d8d2e5673745f0dcd97d5b5f562d25 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* Make sure tryCompare value argument is not undefinedAlbert Astals Cid2013-05-291-0/+5
| | | | | | | | | | | | | | | It happens often that people convert a compare(foo.bar, 3) to a tryCompare(foo.bar, 3) and unfortunately that succeeds but doesn't do what they expected This makes tryCompare fail if no third argument is given Task-number: QTBUG-31427 Change-Id: I0c9618dae9aad4be55aa35c3e2dcf3535728beaa Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* Dialogs: Create directory structure for documentationCaroline Chao2013-05-286-28/+132
| | | | | Change-Id: I5245a6931606673733130b1f168fddafe8def695 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Do not draw negative-size ShaderEffect(Source) items.Gunnar Sletta2013-05-282-3/+3
| | | | | | | | | | | | | | | We were a bit inconsistent here. A negative size Image element would not render at all, a negative size ShaderEffect would render mirrored and a negative size ShaderEffectSource would trigger an assert. Be consistent and not draw any of them. DropShadow from QtGraphicalEffects uses both a ShaderEffectSource and a ShaderEffect together, so keeping the behavior in ShaderEffect would make it render incorrectly. Task-number: QTBUG-31383 Change-Id: Ied5568d7edbc2aed96b00adfdc6aae09b6f2a7d9 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Accessibility: Fix crash when accessing accessible children.Frederik Gladhorn2013-05-281-4/+2
| | | | | | | | | | The window would create new child interfaces every time it's children are queried. Instead properly use the crash. Task-number: QTBUG-31417 Change-Id: Ifc7bbdbdb9a506fe04a348fba643f1d52a6157e7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Prevent tab focus from wrapping endlesslyLiang Qi2013-05-271-4/+28
| | | | | | | | | | | | | | | | | | If there was no item that accepted focus, it would go into an endless loop. This also changes the default behavior of QQuickWindow. When there is not any activeFocusItem in the whole window, it means the contentItem got focused. The Tab/BackTab key will now focus the next item in the tab focus chain. Autotest is included. Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com> Task-number: QTBUG-31344 Change-Id: I854292f89a327c493eec21969907c94aa9cfddcb Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Doc: Added Qt 5.1 information in Qt Quick's release notes.Jerome Pasion2013-05-271-1/+29
| | | | | Change-Id: I97971f27d9ff7e94e14f442d1baf78b0e56ca312 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: Add Qt Quick Dialogs to Qt Quick submodules listCaroline Chao2013-05-274-3/+32
| | | | | | | | And add a landing page for Qt Quick Dialogs. Change-Id: I0c2611bf5cdbf9937b4fd94228915553d8b3bb77 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Update all plugins.qmltypes filesLiang Qi2013-05-272-185/+462
| | | | | | Task-number: QTBUG-31388 Change-Id: I13a821a009c6c06f2c7fe7f7d28f1a579d69c8df Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Doc: Add Dialogs/Controls/Layouts in submodules sectionCaroline Chao2013-05-271-0/+6
| | | | | | Change-Id: Ide4afaa74d73ea09cf329de593283c269ecdacb3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* QmlProfiler: fix SceneGraph profilingChristiaan Janssen2013-05-272-2/+2
| | | | | 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>
* Cut performance cost in QSGContext::prepareMaterial()Gunnar Sletta2013-05-233-1/+10
| | | | | | | | | | | | The hash-lookup in this function is costing us a lot, and since we're looking up the same materials again and again, and the material has a place holder for it, we can store it directly in the material at no extra cost. This was a 10% gain in this particular benchmark. Change-Id: I46b67791ce39f453fa86d1ee82f6f5c7785b46a1 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* add private export to image and rectangle nodesGunnar Sletta2013-05-232-2/+2
| | | | | Change-Id: I15aea1b1dc3d41c9efe0a38f53d6858bae273566 Reviewed-by: Samuel Rødal <samuel.rodal@digia.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 TextEdit content size calculationJ-P Nurmi2013-05-221-1/+3
| | | | | | Task-number: QTBUG-31154 Change-Id: I9d3e31352967b99b4bbb38f5819d3d093438ee37 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Avoid redundant QColor::alphaF() calls.Gunnar Sletta2013-05-221-5/+5
| | | | | Change-Id: I3694b075e98eab9f3eacf7758881a9473999b46e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Avoid using QColor::xxxF functions.Gunnar Sletta2013-05-222-29/+22
| | | | | | | | | | | | | | | In our usecase, the color is always used as a float so using QColor (which is ushort) internally adds a lot of pointless conversion. Enough so that it shows up in profiles as 1-2% each. Not a lot, but easy to fix. The compare function is also somewhat simplified. For colors we're primarily searching for equallity. If that fails, we just need to provide consistent values, so use the address instead of doing any fancy calculation. Change-Id: Icae7e78ed767e802c137bab7fcacff66e9a4bc66 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* QQuickTextControl: emit cursorPositionChanged() only if it changedJ-P Nurmi2013-05-221-1/+4
| | | | | | Change-Id: Id6fe03677e93119a63bfe87ade3cd333bf4890a1 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Android: Make Qt5QuickParticles a dependency of Qt QuickEskil Abrahamsen Blomfeldt2013-05-221-1/+4
| | | | | | | | | | | | Since we don't have any way of parsing QML to find out which imports will be used, we need to always load Qt5QuickParticles library when using Qt Quick, since this is a dependency of the particles import itself. Otherwise, apps that use particles would crash. Task-number: QTBUG-30848 Change-Id: I24326e2d59fc05f7867233fe503b2708d50eee78 Reviewed-by: Paul Olav Tvete <paul.tvete@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>
* Fix PropertyAnimation docAlan Alpert2013-05-201-2/+2
| | | | | | Task-number: QTBUG-31063 Change-Id: I2329f5c92c5985ed4a65a896521ddd3f6649ce2c Reviewed-by: Bea Lam <bea.lam@jollamobile.com>
* Doc: Fix some broken linksSze Howe Koh2013-05-207-30/+30
| | | | | 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>
* Respond appropriately to textFormat changedAlan Alpert2013-05-171-0/+1
| | | | | | | | | | If the text has not changed when textFormat changes between states other than RichText, the text was not re-laid-out. This is necessary if the text includes control tags. Task-number: QTBUG-31191 Change-Id: I3c6f5343aa85e8337b90cf86748a696d5742e906 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Fix a warning when setActiveFocusOnTab(false) for root itemLiang Qi2013-05-171-1/+1
| | | | | | | | Task-number: QTBUG-31114 Change-Id: I4d6aac534fbc1e84593e4d7084e6a892eea4256c Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix a crash in QQuickRepeater::clear()J-P Nurmi2013-05-161-5/+6
| | | | | | | Change-Id: Iedf45862323ca8233be155ce65cd3348abd0a8e5 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> 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>
* improve docs of QSGGeometry::set[Vertex|Index]DataPatternGunnar Sletta2013-05-161-2/+4
| | | | | Change-Id: I6ca0d8549891302cc9d71bdfac11704752caaf60 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Doc: Inline a short snippetSze Howe Koh2013-05-162-62/+21
| | | | | | | | | | 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-1/+1
| | | | | | | | 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>
* Document Flickable.pixelAligned.Mitch Curtis2013-05-161-0/+12
| | | | | | Change-Id: I8ea85269c2666d18bf3c3815d2de0f90e9e0a3f4 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Make Canvas respect smooth: true/falseGunnar Sletta2013-05-151-0/+1
| | | | | | Change-Id: I6e68fcfc534aca139484a9b2970e61fb22688c58 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Doc fixAlan Alpert2013-05-151-1/+1
| | | | | | Task-number: QTBUG-31155 Change-Id: I4f1ac7c31ce6d4529c368d796706aa5f93a78d1a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix warnings about unused parameters.Friedemann Kleint2013-05-152-0/+4
| | | | | Change-Id: I091a0369f2026ae820d623aadd13a3190d40a56b Reviewed-by: Shawn Rutledge <shawn.rutledge@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>