aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Generate registrations for all examplesUlf Hermann2020-01-1396-455/+667
| | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Change-Id: I647c72bbe38fdb2deb565b75c86a696af3d15b61 Reviewed-by: Simon Hausmann <[email protected]>
* Binding example: Fix type registrationFabian Kosmale2020-01-131-0/+2
| | | | | | Fixes: QTBUG-81335 Change-Id: Ie93c9b7ad49703bce245592e659ccdb6ea2b7ed9 Reviewed-by: Ulf Hermann <[email protected]>
* QML list property: Avoid crash if contained object is deletedFabian Kosmale2020-01-134-9/+66
| | | | | | Task-number: QTBUG-81123 Change-Id: I3dd1a42e444f817722368cd268c2f987a99fbf1c Reviewed-by: Ulf Hermann <[email protected]>
* QQmlImport: Allow importing multiple versions of the same moduleUlf Hermann2020-01-102-1/+24
| | | | | | | | | Previously, once a plugin had been loaded, the static module registrations were disregarded. Therefore, if there were static and dynamic registrations in the same plugin, only one set was ever loaded. Change-Id: I24f52cc579a833041c51f15555caf226a6189c99 Reviewed-by: Fabian Kosmale <[email protected]>
* qmlformat: Fix default construction of CommentUlf Hermann2020-01-101-2/+2
| | | | | | | m_location would be uninitialized. Change-Id: Ieeeb0c0783a0b8e6f919019bd2ddcc1752993eaf Reviewed-by: Fabian Kosmale <[email protected]>
* qmllint: parse JS files for methodsUlf Hermann2020-01-105-140/+206
| | | | | Change-Id: I3888231ac82f9babd51e6332af3c5457bf3c9141 Reviewed-by: Fabian Kosmale <[email protected]>
* Generate registrations for all importsUlf Hermann2020-01-1074-11038/+158
| | | | | | | | | | | | | | | | Now that we can generate all QML type information at build time, we should also use it. Move the types for QtTest into the testlib import plugin. They don't need to be exported from QtQuickTest. Trigger the resource initialization of the shapes library from the plugin so that we retain a dependency and the linker doesn't optimize the module initialization away. Change-Id: Icc8cb338aa03ef1e3085e29356a5db7b73ba0a01 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Make draganddrop example less confusingUlf Hermann2020-01-103-44/+109
| | | | | | | | | | | | Use required properties, rather than context, use direct binding rather than Binding elements, clarify that we're using the drag passed as parameter, not the drag property of DropArea, move Icon to a different file so that we get a distinct type for it. Give the icon a defined color while it is being dragged. Change-Id: I0e8b77abaedb9fc52660dfd4ddef1a4161f1323a Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* tst_qqmlmetatype.cpp: Avoid memory leaksUlf Hermann2020-01-101-4/+6
| | | | | Change-Id: Ic4ff36e48a1ff5146ec44f58ed416fd24cce5330 Reviewed-by: Fabian Kosmale <[email protected]>
* tst_qquickanimations: Avoid memory leaksUlf Hermann2020-01-101-93/+125
| | | | | Change-Id: Idc44c6ef91417ec0fe24ec95023f52c8ed61ece0 Reviewed-by: Fabian Kosmale <[email protected]>
* tst_qmldiskcache: Increase compile timeoutUlf Hermann2020-01-101-1/+3
| | | | | | | | | Apparently some machines on the CI take north of 10s to compile a component. Change-Id: Ia01c55c0f248e061bea8a3bc194c65e4e5f663b5 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* qmllint: Clean up access to m_exportedName2ScopeUlf Hermann2020-01-101-11/+12
| | | | | | | | Don't accidentally overwrite the anonymous scope, and clearly mark where we want to modify the scopes and where we just want to retrieve them. Change-Id: I801d378ccaea6eb2548875766a9d3141dcb9f5e5 Reviewed-by: Fabian Kosmale <[email protected]>
* Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-0937-106/+700
|\
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-0937-106/+700
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/particles/qquickitemparticle.cpp src/qmlmodels/qqmladaptormodel.cpp tests/auto/particles/qquickitemparticle/tst_qquickitemparticle.cpp Change-Id: Ibd8fbb91da6893a09f4ffe61ad0b95d8149bbc87
| | * Fix unused variable warning on big-endianShawn Rutledge2020-01-081-0/+2
| | | | | | | | | | | | | | | | | | | | | Fatal because of -Werror. Change-Id: I535848be1c733c0718779c8a4c8c93ed3873cc88 Reviewed-by: Laszlo Agocs <[email protected]>
| | * V4: Avoid integer overflow on typed array length checkUlf Hermann2020-01-082-2/+41
| | | | | | | | | | | | | | | Change-Id: I370b4c4bd0d7962878849ca7c5edef6cb36eca25 Reviewed-by: Fabian Kosmale <[email protected]>
| | * Check stack limit in FunctionPrototype::method_apply()Ulf Hermann2020-01-082-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | We could just crash there, assuming unlimited memory, but as this particular place seems to be a very attractive target for various mischief, let's just plug it. Change-Id: I3b0369ceb34dafd12ce8dc1f189fc5f9ee82c169 Reviewed-by: Fabian Kosmale <[email protected]>
| | * V4: Don't crash when iterating invalid Proxy objectsUlf Hermann2020-01-083-2/+17
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-81109 Change-Id: I97f37c68d33f414d7bffa9b66e0aaed93370dc68 Reviewed-by: Fabian Kosmale <[email protected]>
| | * V4: Don't crash when sorting arrays with non-stringifyable entriesUlf Hermann2020-01-082-0/+18
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-81108 Change-Id: I7e121776a2416b5338c4c1309ec7cc31c703ad28 Reviewed-by: Fabian Kosmale <[email protected]>
| | * Fix unused variable warningShawn Rutledge2020-01-071-2/+1
| | | | | | | | | | | | | | | | | | | | | This was fatal because of -Werror. Change-Id: Ibe06f77d4728268af3f099554f7151bdaf9ac26b Reviewed-by: Ulf Hermann <[email protected]>
| | * Stabilize QQuickItemParticleLouis du Verdier2020-01-074-46/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two crashes and a memory leak in QQuickItemParticle. The first crash was caused by the list m_loadables that kept pointers on QQuickParticleData, that could in the meantime become dangling pointers if the associated particle expired or got deleted by a call to the reset() method of the particle system. Its role was to keep a list of particles that did not have a delegate instantiated yet, in order to create them in the tick() method. This list is removed and the list of particles to handle is directly deduced in the tick() method. The second crash was caused by the list m_deletables that could in some situations (generally due to a reset()) contain multiple times the same delegate, and therefore cause a double delete in processDeletables(). This list is changed to a set to avoid this situation with a minimum impact on the rest of the code. The memory leak was caused by the m_managed list of delegates that was not freed when QQuickItemParticle gets deleted. Task-number: QTBUG-71193 Change-Id: I6fe30ee59a9a0bb90c14c62c7a48a50f465a9e0c Reviewed-by: Mikhail Svetkin <[email protected]>
| | * QV4: Support printing arrays with circular referencesFabian Kosmale2020-01-072-4/+22
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-81105 Change-Id: Iaf0597cea3a5572f020c5f87a843774f33cc01fd Reviewed-by: Ulf Hermann <[email protected]>
| | * QV4: Array.includes: Support large arraysFabian Kosmale2020-01-072-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Creating new ScopedValues in the loop was quite wasteful, and would trigger a crash. We now simply reuse the ScopedValue. Fixes: QTBUG-81104 Change-Id: Ie1efd144886861a21c8f6827d7fd23699a1e0dcc Reviewed-by: Ulf Hermann <[email protected]>
| | * QV4: Check recursion limit in toStringFabian Kosmale2020-01-072-0/+23
| | | | | | | | | | | | | | | Change-Id: I18b7a4e00150f6c47c991a5164901159b7f946b9 Reviewed-by: Ulf Hermann <[email protected]>
| | * QV4MM: Fix crash caused by MarkStack overflowFabian Kosmale2020-01-074-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemoryManager::collectFromJSStack did push to the mark stack without checking if there is actually still space available. To fix this, we now drain the stack once we hit the limit. The test case is a slightly modified version compared to the reported one, removing one loop. This was required as our regular expression does not throw an exception when there are too many capture groups. However, to trigger the bug, looping was not actually necessary. Change-Id: I4d00865f25a989c380f4f5b221f4068c80b71d2b Reviewed-by: Ulf Hermann <[email protected]>
| | * V4: Catch error when compiling broken RegExpsUlf Hermann2020-01-072-2/+19
| | | | | | | | | | | | | | | | | | | | | Otherwise we try to assign an invalid RegExp object, which crashes. Change-Id: I85478406524a2a9d7542758caaa1b42b4090bb93 Reviewed-by: Fabian Kosmale <[email protected]>
| | * V4: Fix sorting of sparse arraysUlf Hermann2020-01-062-1/+22
| | | | | | | | | | | | | | | | | | | | | setArrayData() needs to handle a nullptr argument. Change-Id: I1ea05d9db9beb1fede6d3c068cfcf700702e8aa6 Reviewed-by: Fabian Kosmale <[email protected]>
| | * Avoid oob access on Array.concatUlf Hermann2020-01-062-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we have already determined that we're past the end of the allocated space on the source object by checking os->values.alloc, we should conclude that all the remaining values are undefined. Fixes: QTBUG-81037 Change-Id: I664f22b7eb37c26061e8a9e2f88bcf2a7b6e09f3 Reviewed-by: Fabian Kosmale <[email protected]>
| | * Emit QQmlEngine::warnings when load failsFabian Kosmale2020-01-063-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the existing infrastructure for reporting QML errors, instead of simply using qWarning. Fixes: QTBUG-81093 Change-Id: Ie18656a57f28fa9dfe922936fd05b44ebe1281e2 Reviewed-by: Ulf Hermann <[email protected]>
| | * QV4::Engine: replace std::function with a function pointerFabian Kosmale2020-01-062-5/+5
| | | | | | | | | | | | | | | | | | | | | Turns out, we actually do not need to capture anything Change-Id: I6194b45a1e8053be079d25a6d81212fa226fd3ea Reviewed-by: Simon Hausmann <[email protected]>
| | * QV4::ExecutionEngine: provide QNAM accessorFabian Kosmale2020-01-037-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In XMLHttpRequest, we need to get the QNetworkAccessManager from the engine. However, if the request originates from a WorkerScript, there exists no qmlEngine. We therefore add a new indirection to access the QNAM, and set it up accordinly in registerWorkerScript. Fixes: QTBUG-81055 Change-Id: I8915202b6d6b7139c8386304b3d1d7a22a82045e Reviewed-by: Simon Hausmann <[email protected]>
| | * QQuickWindow: make subFocusItem a QPointerFabian Kosmale2020-01-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | While running the fuzz tester, a crash was found related to the fact that the subFocusItem was already partially deleted. Task-number: QTBUG-34779 Change-Id: I62c48cf40baabc9f0a81074cc6408e9073459165 Reviewed-by: Simon Hausmann <[email protected]>
| | * Fix the build with -no-guiLiang Qi2020-01-021-0/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74602 Change-Id: I08e8df96b10fbc0b58fbdae296c9d54de977e3f9 Reviewed-by: Tony Sarajärvi <[email protected]>
| | * QQmlAdaptorModel: Guard access to wrapped AIMUlf Hermann2020-01-021-32/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QAbstractItemModel may be nullptr, in particular when it gets deleted from the outside. In some places we did check for that, via operator T* from QQmlGuard, in others we didn't. The checks were quite hard to read as "if (model)" first invokes a conversion operator on a base class and then implicitly converts the result to bool. Similarly adventurous, "if (*model)" invokes operator* on a base class and then converts the result to bool. Make all the checks explicit, and add new ones where they were missing. Also, as we already retrieve the AIM in order to check it for nullptr, re-use it for the actual operation. Task-number: QTBUG-80963 Change-Id: I3548e22e9d2bef485a1cd4acf70839eb8e599e62 Reviewed-by: Simon Hausmann <[email protected]>
| | * Use the correct icon filename for QML Runtime on WindowsShawn Rutledge2020-01-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Amends d7b7fed0cddf6236db3cf1bfdf9cc1380929cf5c. Task-number: QTBUG-70826 Change-Id: If9b74d19c4fc2bbe3ae882b4767919c74f3a38af Reviewed-by: Alessandro Portale <[email protected]>
| | * QV4Engine: support conversion of QJSValue to SequenceTypeFabian Kosmale2019-12-203-0/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8704c640946ac852668638e2980d3e2b78aa27ae introduced new conversions via sequentialIterableToJS. Due to that, QVariant properties which formerly stored e.g. std::vector<QObject*> now would store a QJSValue. Those would still claim to support a conversion to QVariantList, but -contrary to what our documentation says-, we were not able to do a conversion to QSequentialIterable. The default constructed QSequentialIterable would then crash when calling begin(), as that function pointer was null. This patch fixes this by adding the necessary support to convert a QJSValue containing an array. Non-array QJSValues will still return an "empty" QSequentialIterable. Note that this changes what happens when a QJSValue is converted to a QVariantList, as QVariantValueHelperInterface<QVariantList> will check first if there is a converter to QSequentialIterableImpl before attempting to call any directly installed converter to QVariantList. In order to not change the existing behavior, the QSequentialIterable returns the QVariant corresponding to the QJSValue at a given array position, intead of a QVariant containing the QJSValue. Fixes: QTBUG-80609 Change-Id: I8101229c0d2043b3f2d618ed035b279844802dd8 Reviewed-by: Ulf Hermann <[email protected]>
| | * Fix usage of qtquickcompiler.prf after lrelease.prfJoerg Bornemann2019-12-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider a project that sets CONFIG += lrelease embed_translations qtquickcompiler qtquickcompiler.prf is loaded first and loads resources.prf. Then lrelease.prf is loaded and extends RESOURCES. The latter changes are never picked up, because resources.prf was already loaded which is recorded in QMAKE_INTERNAL_INCLUDED_FEATURES. Use the newly introduced qtFlattenResources function instead of fully loading resources.prf. Task-number: QTBUG-79672 Change-Id: I1894ede97b4d5de567971a1a8cef407460bba97d Reviewed-by: Kai Koehne <[email protected]>
* | | qmlformat/dumpastvisitor: Fix a few segfaultsMaximilian Goldstein2020-01-091-3/+8
|/ / | | | | | | | | | | Change-Id: Ic8e95944cf36000a004d010293a532101433c3af Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* | qmltyperegistrar: Improve resolution of module dependenciesUlf Hermann2020-01-081-2/+4
| | | | | | | | | | | | | | | | | | Previously transitive private dependencies would not be resolved as resolve_depends would return a foo_private, for which we wouldn't find a Qt.$${dep}.module. Change-Id: Ie8d91d6c82c0d2f2e441a9eb662a14ef9bd82051 Reviewed-by: Simon Hausmann <[email protected]>
* | qmlformat: Fix whitespace for parameter defaultsMaximilian Goldstein2020-01-082-5/+5
| | | | | | | | | | Change-Id: I7958bf1546cc5854fc9b9856e36928ea932af0ca Reviewed-by: Ulf Hermann <[email protected]>
* | qmltyperegistrar: Improve formatting of includesUlf Hermann2020-01-071-2/+6
| | | | | | | | | | | | | | | | We always need qqml.h and qqmlmoduleregistration.h. Put those in front and sort and deduplicate the module-dependent imports. Change-Id: Idae435939e7a69dd706c928b01b159334c21cff1 Reviewed-by: Fabian Kosmale <[email protected]>
* | Add QQuickItemParticle give() method bodyFabio Falsini2020-01-064-6/+108
| | | | | | | | | | | | | | | | | | | | | | The current version of QQuickItemParticle give() method was not implemented and a simple TODO comment was present instead. I added a working body and add also a reparent feature when an added item is released. Fixes: QTBUG-76827 Change-Id: Ib7d289cad2ff0cd166e766eb7f07e92437e7681b Reviewed-by: Shawn Rutledge <[email protected]>
* | Add RHI shaders to ShaderEffect test scenesEirik Aavitsland2020-01-0669-354/+360
| | | | | | | | | | | | | | | | | | | | | | Add RHI versions of the fragment and vertex shaders in the lancelot test scenes. Move all shaders into external files and include them as resources, so that the automatic file selector mechanism will pick up the right version at runtime. Task-number: QTBUG-78683 Change-Id: I5eb1669d09a650301ac2a3012db8b3d1814c7bcb Reviewed-by: Laszlo Agocs <[email protected]>
* | qmldiskcache.qdoc: Add missing \endtableFriedemann Kleint2020-01-031-0/+1
| | | | | | | | | | | | | | | | Amends 2cfa63e1f1b78ef50dfac3716aab9adf868fe151, fixing: qtdeclarative/src/qml/doc/src/qmldiskcache.qdoc:76: (qdoc) warning: Missing '\endtable' Change-Id: I962b640da3125e7515c507cb6751ca1e82cdac7d Reviewed-by: Fabian Kosmale <[email protected]>
* | Fuzzing: Allow linking to other fuzzing enginesRobert Loehning2020-01-031-1/+6
| | | | | | | | | | | | | | | | | | | | oss-fuzz sets the environment variable LIB_FUZZING_ENGINE to link with AFL or libFuzzer. If this variable is not set, libFuzzer will be used as before, only that the right qmake variable will be used for doing so. Change-Id: I8d4db1bc459bd6d06feeb4351b75aa0cb07e0f85 Reviewed-by: Albert Astals Cid <[email protected]>
* | Defer loading of local qmldir files when intercepted to remote onesUlf Hermann2020-01-023-32/+49
| | | | | | | | | | | | | | | | | | | | | | | | The qqmltypeloader test checks this case. As long as the types are actually loaded by the plugin it worked as we didn't register the module before. When the types are loaded by static type registrations in QtQuick we need to detect whether we still need to wait for a remote qmldir file to appear in order to load color providers etc. Change-Id: I7aa10903c6c23d1c9be01ee7ddafbdc696975407 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Simon Hausmann <[email protected]>
* | Optimize QQuickImagePrivate paddingShawn Rutledge2019-12-312-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | Since the parent QQuickImageBasePrivate class ends with a bool bitfield, starting QQuickImagePrivate with its own bitfield seems to cause them to dovetail: at least the warnings about padding are eliminated. It's anyway nice to group variables by size (although in reverse order), group methods separately, and do header initialization as much as possible. Change-Id: I934e4ad682e338ebb62721ed40c60ff9d4465600 Reviewed-by: Shawn Rutledge <[email protected]>
* | qmltyperegistrar: Fix command line optionsUlf Hermann2019-12-242-13/+20
| | | | | | | | | | | | | | | | | | | | | | The descriptions were badly formatted, we assumed plugins.qmltypes even though we can also generate app.qmltypes and lib.qmltypes, and the --generate-qmltypes option specifies a file name, not a directory. Change-Id: Ia611198555c994ac5f5cb1ceb399fb4fc2ed780b Fixes: QTBUG-80895 Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
* | Improve ListView.headerPositioning docsShawn Rutledge2019-12-231-12/+20
| | | | | | | | | | | | | | | | Explain the changes to fix QTBUG-74046 and improve grammar. Task-number: QTBUG-74046 Change-Id: Icd02387a2ffb3ff795521cb5eda95e41eabc21c7 Reviewed-by: Venugopal Shivashankar <[email protected]>
* | doc: Clarify Q_GADGET limitations in Qt 5Shawn Rutledge2019-12-231-0/+8
| | | | | | | | | | | | Fixes: QTBUG-79640 Change-Id: I7c4377312a337ec5f65389dc4998f1df91e5f67c Reviewed-by: Ulf Hermann <[email protected]>