aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* Restore a temporary QQmlInstanceModel::object() overloadJ-P Nurmi2017-12-011-0/+1
| | | | | | | | The API change in 60d589c broke Qt3D build. Restore a temporary overload to unblock the CI. Change-Id: I4debce4dc4ec7668b75854da3dc7e1813c9c34c5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Add a means to unregister custom qml typesAndy Shaw2017-12-012-0/+23
| | | | | | | | | | | | | | | In cases where Qt is used in a plugin it is possible that a plugin will be unloaded while Qt itself is still loaded and as a result there is a chance that there will be conflicting types registered. Therefore, to ensure that plugins correctly clean up after themselves cleanly, we need to add a means to unregister qml types. This is intended to only be used when the user knows what they are doing. Task-number: QTBUG-56521 Task-number: QTBUG-56532 Change-Id: Ie396e522385004e6e9f3841e04f8072ff29cb15b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlDelegateModel: add incubationStatus(), and use it to determine ↵Richard Moe Gustavsen2017-11-305-0/+29
| | | | | | | | | | | | | | 'requestedIndex' We used to assign the currently incubating item to 'requestedIndex' based on requested incubation mode alone. This is not sufficient, as the item can also be loaded async when the mode is AsyncIfNested. To check if the item is really loading async (and that we're not getting nullptr because of some other failure), we need to ask the incubator. Task-number: QTBUG-61537 Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQmlIntanceModel: use QQmlIncubator::IncubationMode instead of bool to ↵Richard Moe Gustavsen2017-11-306-20/+19
| | | | | | | | | | | | | | | | | | | | | | specify incubation mode The current implementation would pass a boolean to signal if asynchronous or synchronous incubation should be used to create an item. The problem with this approach is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested later down the chain. This meant that even if the caller requested synchronous incubation, it could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at the time of the call. And this can easily come as an unhandled supprise for the caller, and as such, cause unforseen bugs. This patch is a first of a set of patches that is done to fix the bug reported in the task below. It will not change any behavior, it is written to preserve the logic exactly as it were, just as a preparation for subsequent patches. It makes it explicit at the call location what incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested flag is in play. Task-number: QTBUG-61537 Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Check linked contexts for context objects being deletedUlf Hermann2017-11-281-1/+4
| | | | | | | | | | In QQmlObjectCreator::createInstance we can assign the new object as context object to a linkedContext of its QQmlData, not only it's ownContext. Consequently, we have to check all the linked contexts and remove the object when found on deletion. Change-Id: I09bccdb0190406245fa5a379edaff0a8f118062f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.9.3' into 5.9" into ↵Liang Qi2017-11-252-1/+11
|\ | | | | | | refs/staging/5.9
| * Merge remote-tracking branch 'origin/5.9.3' into 5.9Liang Qi2017-11-232-1/+11
| |\ | | | | | | | | | Change-Id: Ic6457df47bed359fd43653e73726f1896944241c
| | * Fix crash with dangling context object pointersAndy Shaw2017-11-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced by commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the QML context would destroy the context upon destruction. Now the context may live longer and thus the context->contextObject pointer would become a dangling pointer. Task-number: QTBUG-64166 Change-Id: I1df631fa11187abdeff735d8891ad7907e8d4a3d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Improve encapsulation of the the IR de-serialization from QtQuick CompilerSimon Hausmann2017-11-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code used by QQC to deserialize the IR requires setting the javaScriptCompilationUnit member in order to connect the generated C++ code. Knowledge of the QmlIR::Document data structure layout on the side of the generated code (thus application) has its downsides though (see referenced bug). We can avoid that dependency easily by doing the entire de-serialization on the QtQml library side. The old "API" (load member function) is still around until the qqc change is also in. Task-number: QTBUG-63474 Change-Id: I239838afacc71474c86114b5b05679ff36e4c2e2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | More fine-grained deferred property executionJ-P Nurmi2017-11-254-13/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows Qt Quick Controls 2 to defer the execution of certain building blocks until needed. For example, a button control can defer its background item so that the default background is not executed at all when replaced by a custom background. First of all, this gives a massive performance boost for customized controls. Secondly, this avoids the most burning issue in QQC2, problems with asynchronous incubation ("Object destroyed during incubation"). Task-number: QTBUG-50992 Change-Id: If3616c9dac70e3a474a20070ad0452874d267164 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Re-enable QML memory profilingUlf Hermann2017-11-235-20/+44
|/ / | | | | | | | | | | Task-number: QTBUG-64674 Change-Id: I48ed1a51f66ef8d55cc026f140d270baaca04fbf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Don't reject plugin-only qmldir filesUlf Hermann2017-11-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | On QQmlImportsPrivate::updateQmldirContent we need to check if the new module has actually been established after figuring out that it doesn't have any components or scripts. If it has, then we shouldn't fail, as obviously a plugin has been loaded. We don't need to check the component and script versions in that case, as plugins don't have separate versions. Change-Id: Ie328b59038fe65c3f6a2eeecfe969927bba6cd68 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Fix URL interception for qmldir filesUlf Hermann2017-11-223-17/+59
|/ | | | | | | | | | | | | | | | | We need to intercept the URL when it is created. This relieves us of the need to hack around in it when actually retrieving the content of the qmldir file and prevents the futile attempt to load remote qmldir files via the code path that should load local ones (or vice versa). The back and forth conversion between URLs and strings is unfortunate, but can only be solved by using QUrl rather than QString where we actually mean URL. This would be a bigger change which is unsuitable for 5.9. Mind that nothing changes for code that doesn't use URL interceptors. Task-number: QTBUG-36773 Change-Id: I6bff3ae352009fdc0a17ec209691c7b390367f11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prevent the QML engine from registering circular dependenciesErik Verbruggen2017-11-062-1/+10
| | | | | | | | Change-Id: Ic4fd2bde745e7dfaf0909e8cc575441bb04cefa3 Task-number: QTBUG-64017 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Marco Martin <mart@kde.org> Reviewed-by: Bhushan Shah <bshah@kde.org>
* Fix crash with dangling context object pointersAndy Shaw2017-10-261-0/+2
| | | | | | | | | | | | | This is a regression introduced by commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the QML context would destroy the context upon destruction. Now the context may live longer and thus the context->contextObject pointer would become a dangling pointer. Task-number: QTBUG-63733 Change-Id: Idc660116752d312917a0a149110b92a042ccfb17 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Return "qnx" for Qt.platform.os when appropriateLiang Qi2017-10-242-0/+3
| | | | | | | | | | [ChangeLog][QtQml] Qt.platform.os returns "qnx" when running on QNX platforms. Task-number: QTBUG-52515 Change-Id: Ie46f235248f7832fff12906cf858e8527e8060b1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* QQmlTypeLoader: Drain events before shutting down the threadUlf Hermann2017-10-201-10/+17
| | | | | | | | | | We take references to types when sending events to the other thread. If we don't process the events, the references are kept, which leads to memory leaks. Therefore, when shutting down a QML engine, we have to make sure the event queues are emptied. Change-Id: Id8b0440029cfd7d03a9e540747eaedbcaa7c9ff3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Tell QQmlImportInstance::resolveType what kind of type we wantUlf Hermann2017-10-195-29/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | In QQmlTypeData::resolveTypes() we know if we're looking at a reference to a composite singleton type, or some other type reference. When we call resolveType() we expect the correct type to be returned, not only based on URL, but also based on its singleton property. QQmlTypeData::resolveType() eventually invokes QQmlImportInstance::resolveType() which will call fetchOrCreateTypeForUrl(), passing a parameter on whether the result should be a composite singleton. When operating on a qmldir component the component itself encodes this. When fetching a type from a local file without qmldir, we currently assume that it isn't a singleton, no matter QQmlTypeData::resolveTypes() has determined. This means that actual singletons loaded this way later get refused by the sanity check. In order to fix this, pass the information about the expected singleton property on to QQmlImportInstance. This is done using QQmlType::RegistrationType, which gets another entry for "any type". If the expected type is CompositeSingletonType QQmlTypeData::resolveType() will not create a non-singleton type. If it is any specific other type, it will not create a composite singleton. And if it is AnyRegistrationType, it will behave as it previously did. Change-Id: I6b7e082b63582e0aed946bb3d19077b94c7a45f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix execution of deferred propertiesJ-P Nurmi2017-10-186-31/+60
| | | | | | | | | | | When deferred properties were assigned in multiple contexts, only the outermost context was executed. Any deferred property assignments in other inner contexts were never executed. Collect the deferred data to a container to be able to execute them all. Task-number: QTBUG-63200 Change-Id: I88fab27c1f81b5188430ada086dcc19842507e99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix qdoc files to always use FDLKai Koehne2017-10-181-31/+18
| | | | | Change-Id: If20d71aa85360ad94a2ef12a25ab37cd2d90abf9 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix outdated FDL license headerKai Koehne2017-10-1749-245/+245
| | | | | Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix outdated BSD license headerKai Koehne2017-10-17105-302/+1352
| | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.9.2' into 5.9Liang Qi2017-10-062-3/+3
|\ | | | | | | Change-Id: Iddce38c1d6cb51e7cccedaff165e21b60d7a85b2
| * QQmlTypeLoader: The profiler is a quintptr(0) if QT_NO_QML_DEBUGGINGUlf Hermann2017-09-271-2/+2
| | | | | | | | | | | | | | | | | | | | This follows the pattern established in other places. Task-number: QTBUG-63392 Change-Id: I11cd66d5552f751804dd0a9460b26bda546c1726 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
| * Merge 5.9 into 5.9.2Oswald Buddenhagen2017-09-254-41/+30
| |\ | | | | | | | | | Change-Id: I72bd4a21211e66b5b167b82363bdeaeca116fd90
| * | Fix crash when using signal handlers on group propertiesThomas Hartmann2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression introduced with commmit 49a11e882059ee1729f776722e085dd21d378c36: The typeRef can be null. I found this when testing grouped properties and property revisions. <TestComponent.qml> import QtQuick 2.0 Item { property alias textEdit: textEdit TextEdit { id: textEdit } } import QtQuick 2.8 Item { TestComponent { textEdit.onEditingFinished: console.log("test") } } Instead of an error message, this crashes without this patch. This is a regression introduced by using QQmlType by value. Change-Id: Ib18a0ad878f7c4696c22bc65fee636b84b966f03 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Simplify compilation unit tracking in the execution engineSimon Hausmann2017-10-064-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of collecting all compilation units in a hash, let's collect linked units in a doubly-linked lists that makes the removal at destruction time dramatically cheaper. Change-Id: I9fd59600d082be3566f605d90f14a86a58ac9296 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | QV4Engine: Don't cache compilation units to be unlinkedUlf Hermann2017-10-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compilation unit that is unlinked may recursively unlink and delete further compilation units belonging to the same engine via its resolvedTypes property. Those units won't be able to remove themselves from the cached set, and will therefore get their unlink() method called again, this time on a dangling pointer, when the engine gets around to them. Change-Id: Icaa941ca2117c8303c49623b2be0f9014502d849 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix Number.isNaN sometimes returning false for NaNSimon Hausmann2017-10-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use Encode(std::isnan(v)) and while std::isnan() is documented to have bool as a return type, there is the case where cmath pulls ::isnan into std with a using declaration when ::isnan() will sometimes return an int. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69450 This appears to be the only case where we use the overloaded Encode() constructor in conjunction with a direct std::isXXX call. [ChangeLog][QtQml] Fix Number.isNaN() returning incorrect values with some glibc versions. Task-number: QTBUG-63464 Change-Id: Iaaba3735f7400eac0950aad8f3ac47befaf9dab9 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Docs: remove empty table headersFrederik Schwarzer2017-10-031-2/+0
| | | | | | | | | | | | | | | Change-Id: I0693057b57a311b598186a72738021c7d104c41f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | ObjectModel: provide unique move IDsJ-P Nurmi2017-09-261-3/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | QQuickItemViewPrivate::removeItem() uses a QHash to store items that were removed due to a move. If the move IDs are not unique, multiple buffered moves end up overriding each other. This results to leaked items that are never released. Task-number: QTBUG-62607 Change-Id: I7e7e7fcd6b1b0aa50ed55643ba5674e98536f89f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Fix behaviors not working when sub-types declare propertiesSimon Hausmann2017-09-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 81867dfbf9c16d4300727a08eed9b5c6c979e0ba we have an optimization in place to avoid the virtual meta-call when writing properties that cannot be intercepted. Unfortunately that check did not take parent VME meta-objects into account, which triggered the bug. Test case by Harald Hvaal <hhvaal@cisco.com> Task-number: QTBUG-63365 Change-Id: I66cb2967da2c09ca5e38cebd9db2ee6e3ee78f5f Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Fix use-after-free when clear()ing all elements from a ListModelErik Verbruggen2017-09-223-41/+28
|/ | | | | | | | | | | | | Same problem as the problem with remove(), so now clear will call into remove to do the correct thing. See also e29ffa179e9920443a23e2fcb3f0694df32e8a68. [ChangeLog][Qt][Qml] Fix possible use-after-free when clearing all items from a ListModel through JavaScript. Change-Id: Ib9389d80798c4333425b4a49930b1670307d06ac Task-number: QTBUG-59256 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qmlClearTypeRegistrations() not dropping all registrationsSimon Hausmann2017-09-192-0/+9
| | | | | | | | | | | | | In commit 48c09a85ce397979c7e706e3694c879ffe456e09 we added the undeletableTypes container to hold a reference on C++ registered types to keep the indices returned by the public qmlRegisterType() API stable. Since qmlClearTypeRegistrations() is API that also resets those indices, we must also clear the undeletableTypes container to avoid leaking memory. Change-Id: I2038c00913f894d58aca3714d64d497493585326 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fall back to the ObjectWrapper for model advanceIteratorAndy Shaw2017-09-151-1/+4
| | | | | | | | | | | | When falling back to the QObjectWrapper it will add in the extra parts added when the roles were added to the object created by the model to hold the data being returned. This was causing the last entry to be duplicated and causing extra work too. Task-number: QTBUG-54285 Task-number: QTBUG-62156 Change-Id: I2907477277df8d16db4491a4999f004433e4205c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix use-after-free when removing elements from a ListModelErik Verbruggen2017-09-143-7/+27
| | | | | | | | | | | | | | | Detaching delegate instances from model items is done after the destruction of said model items. The problem is that after the model item is destroyed, it will emit a change/destroyed signal. As the delegate is still referencing the item, this will result in a use-after-free. To provent that, the items are kept around until after everyone (notably the delegate model) has been notified of the removal. [ChangeLog][Qt][Qml] Fix possible use-after-free when removing items from a ListModel through JavaScript. Task-number: QTBUG-59256 Change-Id: Iee182e2cf0b50d3dda2181fed95e38f1a60f22a9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix qml cache invalidation when changing dependent C++ registered QML singletonsSimon Hausmann2017-09-123-0/+25
| | | | | | | | | | | | | | | | | | When a qml file uses a qml singleton, we need to reliably detect when the singleton changes and re-generate the cache of the qml file using it. This is a scenario covered and fixed by commit 5b94de09cc738837d1539e28b3c0dccd17c18d29, with the exception that currently QML singletons registered via qmlRegisterSingleton were not added to the list of dependent singletons for a qml file. We can fix this by extending findCompositeSingletons() to also cover the singletons that do not originate from a qmldir file. [ChangeLog][Qt][Qml] Fixed bug where sometimes changes to a qml singleton would not propagate to the users or cause crashes. Task-number: QTBUG-62243 Change-Id: I16c3d9ba65fd82e898a29b946c341907751135a9 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix Integrity buildSimon Hausmann2017-09-121-1/+1
| | | | | | | | Disambiguate the QV4::Value parameter. Task-number: QTBUG-63135 Change-Id: Iae6bd209876336d58256aa94f89d146cadc62f08 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add missing math.h include for math functionsJake Petroules2017-09-121-0/+1
| | | | | | | | On some platforms, math functions in the std namespace don't work even if cmath is included. Change-Id: Ia71d22b07f508e0584de5320f376fbf4b3a2887b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update the expected size of QV4::CompiledData::UnitJ-P Nurmi2017-09-111-3/+1
| | | | | | | | | | ebda8170a removed a member. Thanks to the padding, the size of the structure remained the same on 64-bit, but not on 32-bit. Removing the padding gives now the same size on both. Task-number: QTBUG-63109 Change-Id: If87ad21a1c94e63643b0cd52f95e244364f6e73d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Drain the mark stack while collecting rootsLars Knoll2017-09-101-1/+15
| | | | | | | | | | This avoids overflows in the markStack for test cases where we have a huge amount of compilation units with many runtime strings that all want to get marked. Task-number: QTBUG-63063 Change-Id: I150c1f1a4065350cec59dd80c5c628920f70e3d0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix reuse of regexp objects by regexp literalsAllan Sandfeld Jensen2017-09-0810-39/+50
| | | | | | | | | | | | | Accoding to the standard the regexp objects created by literals should be separate objects as if calling new. We were violating that by caching the same object for every instance of a literal. This also fixes a problem with leaking values of lastIndex between separate instances of the same global regexp literal. Task-number: QTBUG-62175 Change-Id: Ib22e9ee68de1d1209fbd4212e72f576bc059d245 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove temporary allocations during type cleanupSimon Hausmann2017-09-081-1/+1
| | | | | | | | | | As a follow-up commit to 48c09a85, avoid the use of key() to create a temporary string when cleaning the QML type registry. There is strictly speaking no need to perform another hash lookup anyway. Change-Id: Ibd5f0210d5584d1f847d8ec61f25cb0972076365 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Get rid of the root object index variableSimon Hausmann2017-09-0811-43/+30
| | | | | | | | This is a follow-up to the parent commit to remove the variable that is really a constant (zero). Change-Id: I8fc20027c5c7b871269b814cb8b93636e94be267 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash with loading cache files originating from top-level componentsSimon Hausmann2017-09-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | If a .qml file starts with Component {} and its item(s) define their own properties, alias, etc. then loading this file initially would work, but loading it from a cache file would crash with dangling pointers in the property cache. This was due to us registering aliases, properties, etc. twice in the property cache, exceeding the reservation in the property cache vectors. The minimal fix is to skip the root object in the property cache creating loop as we do handle it separately afterwards. It needs to be separate because the first object index within the component does not stem from a binding. However as the root object index is always zero, I'll make a follow-up patch to get rid of of the variable. Task-number: QTBUG-62263 Change-Id: I86b76d38cb490750a561eac2b0ad6fff6ef2e20a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crash with dangling context object pointersSimon Hausmann2017-09-081-0/+2
| | | | | | | | | | | | This is a regression introduced by commit e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the QML context would destroy the context upon struction. Now the context may live longer and thus the context->contextObject pointer would become a dangling pointer. Task-number: QTBUG-63078 Change-Id: I8fdab4086b0472d5d4930cf57aa76922b7ed9e2e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix crashes in QML apps when upgrading Qt snapshotsSimon Hausmann2017-09-072-10/+19
| | | | | | | | | | | When upgrading from one Qt snapshot to another, we may not end up bumping the Qt version. However we do need to re-generate QML cache files. Therefore let's encode the commit hash of declarative in the checksums. Task-number: QTBUG-62302 Change-Id: Ia597fcbe05ea2d32664da2572a1b35c624490095 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* QQmlPropertyValidator::validateObject(): remove unused codeJ-P Nurmi2017-09-071-10/+0
| | | | | | | This code was moved to QQmlDeferredBindingScanner in f27d058. Change-Id: I8cf261c497ec433a14e00e17b67a284b45cf8d75 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Disable deferring when referenced as a grouped propertyJ-P Nurmi2017-09-061-1/+1
| | | | | | | | | This allows us to fix QTBUG-50992 - the issue with most votes in QQC2. Task-number: QTBUG-63036 Change-Id: I996cd1128582b80e0c8480ae143d682c1e8eb8fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix crashes with closures created in QML componentsLars Knoll2017-09-0613-106/+210
| | | | | | | | | | | | | | | When closures created inside QML components are called after the surrounding component (and consequently QML context) has been destroyed, we are in a somewhat limited environment. Initially we would just crash as the calling QML context is not valid anymore. We can alleviate that by introducing reference counting on the context and letting the QML context wrapper keep a strong reference. This avoids the crashes and also ensures that at least imports continue to be accessible within these contexts (as the singleton test case demonstrates). Task-number: QTBUG-61781 Change-Id: I893f171842d01b0863d95a02ea738adc2620e236 Reviewed-by: Lars Knoll <lars.knoll@qt.io>