aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* QtDeclarative fixes and workarounds for NaClwip/naclMorten Johan Sørvig2016-05-134-0/+23
| | | | | | | | | | | Make QtDeclarative run on Native Client. Some of these should be looked at more closely at a later point in time, but will do as workarounds from now. Change-Id: Ifddcb45b190c3a80c6137772a05ababb5466ea22 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6Simon Hausmann2016-01-211-2/+2
|\
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-191-2/+2
| |\ | | | | | | | | | Change-Id: Ieb48911638b5c1acdfd4dee8aa19dca9be99a1f6
| | * Fix QQmlComponent::errors() documentationMitch Curtis2015-12-111-1/+1
| | | | | | | | | | | | | | | Change-Id: I3b65a6aea614a01e36f0fb9e93bb8a9c929ad919 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| | * Fix link to QQmlError in QQmlComponent documentationMitch Curtis2015-12-101-1/+1
| | | | | | | | | | | | | | | Change-Id: I4549acabec366bb17512aad20a943b6b2f813801 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | | Provide access to signal parameters in SignalTransition::onTriggered.Michael Brasser2016-01-192-0/+23
|/ / | | | | | | | | | | | | Change-Id: Ib74d3f5e9a357a86b818e27dd7249e2ecdf1e513 Task-number: QTBUG-46897 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Doc: typo fixJoerg Bornemann2016-01-121-1/+1
| | | | | | | | | | Change-Id: Ida2e39f2eb1744173cd40b4a29f3304c2a2bfd6c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | QQmlXmlHttpRequest: Fix a memory leak on use of XMLHttpRequest's responseXML.Robin Burchell2016-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DocumentImpl (the root of all evil) inherits QQmlRefCount, thus, it has an initial refcount of 1. We correctly released the initial ref in the case of error, but if there is no error, we don't: we pass it over to v4 using class Node which (in Node::Node) increments the refcount again. When Node is later on collected by the GC, the document's refcount is never decreased past the initial ref, thus, not deleted. Task-number: QTBUG-50231 Change-Id: Icefe4391a785c95cb8900219be8ba71f9c53785f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Fix value changed logic for ValueTypeProvider typesFrank Meerkoetter2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix broken value changed logic for types implemented through the ValueTypeProvider interface (QtQuick and Qt3d). It affects vector2d, vector3d, ... The signal was not emitted for the cases where the new value was equal to the default value of a given type. Also add a unit test to cover this area. Change-Id: I9491b0462c78fecc4c704ea36921611c1bd6b2ee Task-number: QTBUG-50204 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | qml: preserve composite singleton types.Marco Benelli2015-12-173-8/+17
| | | | | | | | | | | | | | | | Composite singleton types used to always have version -1,-1; regardless of what is written in qmldir. Change-Id: Ia193e73695e57095f6a09b97768805f2f23cd56a Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | Make property interceptors work on alias properties againLars Knoll2015-11-266-114/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced by change 01c0c0963794f4dd8c3601e8340cc3dc4dec41bd, where interceptors wouldn't work correctly on alias properties. This required some refactoring and splitting out the interceptor handling from the VMEMO into it's own class, as we are now installing bindings directly on the target property of an alias and not on the alias anymore. We now resolve the target property inside the QML object creator and install a interceptor metaobject on the target if required where we can then register the interceptor. Change-Id: I3ebc8f492ce5dcab7acf901711b47336d5182ffa Task-number: QTBUG-49072 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-11-171-0/+3
|\| | | | | | | | | | | | | Conflicts: src/quick/util/qquickimageprovider.cpp Change-Id: I7ca4e49468b5ba697208287be4684e42b9900023
| * Don't normalize the path via the shell if it is a qrc based pathAndy Shaw2015-11-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | Passing a qrc based path to shellNormalizeFileName() was causing problems with the Windows API. Since it won't change the path in this case anyway because the path is not valid on the file system then there is no need to do any checking. Task-number: QTBUG-46248 Change-Id: If20075c25aade3740287250b4e1f31538b398f8f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Document default argument behavior of Qt.createComponent()Mitch Curtis2015-11-161-2/+15
| | | | | | | | | | | | | | | | | | It's not currently clear how to get the default mode when also passing a parent, though lots of Qt code simply omits the argument. Change-Id: I35db7cf57991a2a3fafe4d00df2879b98037e93c Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
* | Introduce a more sane "default constructor" for Qt.matrix4x4()Sean Harmer2015-11-111-0/+5
| | | | | | | | | | | | | | | | | | | | If no arguments are specified, create an identity matrix. This is by far the most common use case. This change avoids having to type in the 16 arguments of the identity matrix. Change-Id: I9e0d71897c5368d19ae87cff936df4b9e5e9b84a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Load component synchronously in method_createQmlObjectUlf Hermann2015-11-033-68/+99
| | | | | | | | | | | | | | | | | | | | | | setData() is not guaranteed to synchronously load the type. In fact, most of the time, it doesn't. However, by adding a private Synchronous mode to QQmlTypeLoader we can prefetch the type synchronously and then inject it into the component. Task-number: QTBUG-45418 Change-Id: I640f12ad20c01b778b5bc41f43574d8aea504195 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Doc: added required include statement QtQmlNico Vertriest2015-10-301-0/+4
| | | | | | | | | | | | Task-number: QTBUG-48172 Change-Id: I571a2a28856c95e4293c526aefc8e7ca8c88a0aa Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Export QQmlLocale privatelyJ-P Nurmi2015-10-281-1/+1
| | | | | | | | | | | | | | | | Allows QQuickSpinBox to call QQmlLocale::wrap() to be able to pass QLocale to QJSValue::call(). Change-Id: I01e4daccdc8bfe6a5c591819ac54bc51603268aa Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* | QML: file leak of QFileSelector.Erik Verbruggen2015-10-222-0/+8
| | | | | | | | | | | | | | | | When no "custom" file selector is set, the QQmlFileSelector would not delete the QFileSelector it created/owned. Change-Id: I0235d0dabdb8522db0b8b74a2a2d69ee5a20abb6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QML: Sanitize reading environment variables.Friedemann Kleint2015-10-222-6/+8
| | | | | | | | | | | | | | | | | | | | | | Where possible, use qEnvironmentVariableIsSet()/ qEnvironmentVariableIsEmpty() instead of checking on the return value of qgetenv(). Where the value is required, add a check using one of qEnvironmentVariableIsSet()/Empty(). Change-Id: Ia8b7534e6f5165bd8a6b4e63ccc139c42dd03056 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Don't delete singletons objects owned by C++.BogDan Vatra2015-10-151-1/+6
| | | | | | | | | | | | | | | | | | | | This way we can enable the usage of a single singletons in both worlds. Currently singletons are destructed before the other QML types, and using a singleton that is owned by C++ we don't need to care about the destruction order anymore. Change-Id: I120fcb8659e16321ae6e70c7b0d62be3bc650d73 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Align QQmlVMEMetaData to int.BogDan Vatra2015-10-151-2/+1
| | | | | | | | | | | | Task-number: QTBUG-48139 Change-Id: I12bec1ec72a99de0c3f5b4b12d22fba2b66c8f49 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Libraries: Fix single-character string literals.Friedemann Kleint2015-10-132-5/+5
| | | | | | | | | | | | | | Use character literals where applicable. Change-Id: I294fc4cb5cbbd23df9735ba2b398118f37cbe08a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Make QML composite types inherit attached propertiesJ-P Nurmi2015-10-096-37/+67
| | | | | | | | | | | | | | | | Change-Id: Ic06af4805da987dd08e361f2668e7a1788d3eefe Task-number: QTBUG-43581 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Add missing "We mean it" comments to private headers.Friedemann Kleint2015-10-0611-0/+121
| | | | | | | | | | | | Task-number: QTBUG-48594 Change-Id: Ifc207938de7f0c8995fc712df92665f222612647 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | qqmlvmemetaobject.cpp: Fix conversion warning by MSVC2015/64.Friedemann Kleint2015-10-051-1/+1
| | | | | | | | | | | | | | qml\qqmlvmemetaobject.cpp(620): warning C4312: 'reinterpret_cast': conversion from 'int' to 'quintptr *' of greater size Change-Id: Ic24caf32b82b06bce04f4d4917efdf303be68444 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-024-7/+7
|\| | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: I3e2326bc86a9d3adaafbe3830b75ce9afa81c45b
| * Disable Clang warning -Wheader-hygiene.Marcel Krems2015-09-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | qqmlinfo.h:51:17: warning: using namespace directive in global context in header [-Wheader-hygiene] In this case the use of the using directive is intended. See also: 0181dc283f6a783783b7e622b4e2dc241edd8a54 Change-Id: I8f94cefdab7ce70e375ad8b01f59eb0f9d840708 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Fix QQmlComponent::beginCreate documentationMitch Curtis2015-09-151-2/+2
| | | | | | | | | | Change-Id: I4ef2cfc83d308a017ef4a98eac94aac52c49d117 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * Document that modifying the globalObject of QQmlEngine is not supportedMitch Curtis2015-09-091-1/+1
| | | | | | | | | | | | Change-Id: I62feb04ae26b6988c6e392b27bd1c3b7f630fd57 Task-number: QTBUG-48175 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| * Fix compilation with ICC on WindowsThiago Macieira2015-09-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QV4::Managed is not copyable and its default constructor is deleted. However, it and classes derived from it are exported, which on Windows means the compiler will instantiate all possible functions and add to the DLL. ICC on Windows, unlike MSVC, attempts to instantiate the default constructor of the derived classes (like CallContext) and then the build fails due to the deleted Managed() constructor. Instead, use V4_MANAGED to mark each and every managed class as non- default-constructible and non-copyable. Only one note: the V4_MANAGED macro in QV4::Managed itself takes different parameters, so it needs to be slightly different. Task-number: QTBUG-48063 Change-Id: I42e7ef1a481840699a8dffff140007c65a7a35db Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Smaller cleanupsLars Knoll2015-09-252-9/+5
| | | | | | | | | | Change-Id: Ib75bf9de898975dcbb98b411a1e98524754c0788 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Remove some unused codeLars Knoll2015-09-252-136/+0
| | | | | | | | | | Change-Id: Iaa89515891624602cf63701364c77e49ea1e1bd9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | CleanupsLars Knoll2015-09-252-20/+4
| | | | | | | | | | | | | | Remove some unused code Change-Id: I1d6612649cf279834f9ce92da60a85495389555e Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Get rid of the special handling of list properties in the vmemoLars Knoll2015-09-252-24/+33
| | | | | | | | | | | | | | | | | | There's no need to store the list properties separate from other property data in the vmemo, simply wrap the list in a QVariant as we do with the other more complex types. Change-Id: I7c7946503cb603c401e11a367986c6923dffe68f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | CleanupLars Knoll2015-09-251-13/+14
| | | | | | | | | | | | | | | | | | Restructure code to make the flow more obvious and avoid executing code that is afterwards being ignored for list properties. Change-Id: I1b21562d48cec34ecb722f9012166926d55e4724 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Get rid of the aConnected bit array in the vmemoLars Knoll2015-09-252-15/+12
| | | | | | | | | | | | | | | | We can track the state just as easily by simply checking if the endpoints metaobject is already set. Change-Id: I5cea909b2525bf37d404f6d54ead2bdf9538cff4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Properly refcount the property cacheLars Knoll2015-09-251-0/+4
| | | | | | | | | | Change-Id: Ia37d4a5e64b653c9af614ed633c3c443190d015a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Cleanups to property allocation in the VMEMOLars Knoll2015-09-252-31/+24
| | | | | | | | | | | | | | | | There's no need for a separate propertiesAllocated bool, we can keep that state in the WeakValue itself. Change-Id: Ife0f517bee9bc5830680eec68983767379a3c2cf Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Reimplement the right metaCall() methodLars Knoll2015-09-254-8/+12
| | | | | | | | | | | | | | | | The goal should be to make these dynamic metaobjects independent of the concrete QObject instance. Change-Id: I13448420d15792918cc30e994a8d6d83216a0a1a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Add extension API to QJSEngineMitch Curtis2015-09-253-25/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows users in a JavaScript-only environment to install extensions including: - Translation functions (qsTr(), etc.) - The console object (console.log(), print(), etc.) - Garbage collection functions (gc()) This deprecates installTranslatorFunctions(). This API results in less clutter in the API, as we'd otherwise need to have several functions for each type of extension. [ChangeLog][QJSEngine] Introduced an extension API that allows installing various function and object extensions (qsTr(), console.log(), etc.) to QJSEngine. [ChangeLog][QJSEngine] installTranslatorFunctions() was deprecated in favor of the new extension API (see installExtensions()). Change-Id: I4d6eb2097c3eda6810e967b2e8f6441c28c91a16 Task-number: QTBUG-40772 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Set the correct prototype at construction timeLars Knoll2015-09-252-6/+4
| | | | | | | | | | | | | | Slightly speeds up construction of value type wrappers Change-Id: Ia50e9bcdb07475ed15b5aac908714d25631a0de8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Smaller cleanupsLars Knoll2015-09-251-2/+0
| | | | | | | | | | Change-Id: I68f7ea476cb00a571908b7ec0a036f8517b091d5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Speed up QQmlEngine constructorLars Knoll2015-09-252-30/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freezing the global object using a script is pretty slow, esp. given that the script needs to be compiled as well. Rather do it programmatically. The old code actually had a bug that would only cause the global object to be frozen, not it's children. The new code fixes this, but doesn't completely freeze the objects. Instead it makes all the existing properties of the global object and it's children readonly, but still allows extending existing objects with new properties. Change-Id: I0d7331cdc89a0ac717b8ed3b1a490b2a3742de02 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Factor out method to get pretty QML type nameTobias Koenig2015-09-243-27/+42
| | | | | | | | | | | | | | | | | | Factor out the code to get the pretty QML type name for an QObject from ~QQmlInfo and put it into QQmlMetaType::prettyTypeName() method. Change-Id: I54ab0c49ba4a52074877447ef67708104f954f2d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Use V4 double-to-string conversion instead of QVariant'sUlf Hermann2015-09-231-1/+7
| | | | | | | | | | | | | | | | | | V4's version makes an effort to find the shortest possible representation, which QVariant doesn't do. Task-number: QTBUG-47070 Change-Id: I49ce130020496592325074e0db29a6984ee7649a Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Cleanup: remove HP-UX and AIX specific code pathsLars Knoll2015-09-221-30/+3
| | | | | | | | | | Change-Id: Iaa0ad08fd849f604bf12a17b19a3757b5ba4f72c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Fix function signatureLars Knoll2015-09-223-11/+11
| | | | | | | | | | | | | | Returning a PersistentValue doesn't make much sense. Change-Id: I6044a12e48aa835ef78008e070bacda5125a7ca7 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Move remaining objects to new constructor syntaxLars Knoll2015-09-2214-86/+57
| | | | | | | | | | | | | | 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-222-2/+2
| | | | | | | | | | Change-Id: I269c20abdc7f9eb0d71a2d2d485d622b65405762 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>