aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Document that QQmlPropertyMap's meta object is not threadsafeVolker Hilsheimer2019-08-211-0/+4
| | | | | | | | | | It is generated and modified at runtime, so applications have to synchronize access explicitly. Fixes: QTBUG-70915 Change-Id: Ie6f29eef8532e2fa4ebf8dad1678cd2acbacf659 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* doc: Clarify that the delegate populate transition doesn't always runShawn Rutledge2019-08-122-2/+45
| | | | | | Fixes: QTBUG-42798 Change-Id: If10f06450f1e50893e5ba103e7c8c2d83667a651 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Fix possible crash with top/bottom aligned imagesEskil Abrahamsen Blomfeldt2019-07-301-1/+1
| | | | | | | | | | | | | | | | An image inside at the end of a text block which did not start at text position 0 would resolve to an invalid QTextLine, since we passed the document position to lineForTextPosition(), which expects the relative block position. If the image was aligned to top or bottom, so that the extracted QTextLine was actually accessed, this would cause a crash. [ChangeLog][QtQuick][Text] Fixed a bug where aligning an image to "top" or "bottom" could cause a crash under certain circumstances. Task-number: QTBUG-77217 Change-Id: Iaa239ba482f2a765703656e4116cbebb8435a66e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Fix QtQuick.Shapes::ShapePath::strokeWidth property typeLeena Miettinen2019-07-261-1/+1
| | | | | | Fixes: QTBUG-73541 Change-Id: Icb15cee3c49f142ef3634e35427dbbc0b9a2183e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Do not search for Singletons from more recent versionsFabian Kosmale2019-07-231-1/+12
| | | | | | | | | | This would break importing older versions of a module, as we would try to locate a singleton which does not exist in this version. Fixes: QTBUG-77102 Change-Id: I78be1ec111d2be26a14b2a94bbf743cf6238cddd Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: fix code snippetPaul Wicking2019-07-191-1/+1
| | | | | | Task-number: QTBUG-77094 Change-Id: I9058bf7b65e8d390327af0624df611de4965f1e4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Support text color for color fontsEskil Abrahamsen Blomfeldt2019-07-193-9/+30
| | | | | | | | | | | | | | | In order to support pen color for color fonts, we have to bake the color into the cache (since the cache contains actual color data and not alpha values). This is equivalent of 78caba7ae637bf4b33631c3425eb92ec3946c99e in Qt Base. [ChangeLog][Text] Added support for text color when using color fonts. Task-number: QTBUG-74761 Change-Id: I5910636c240bd4c0ec3f0b13db4e2f78d4b062ff Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Fix typos in code snippetsPaul Wicking2019-07-181-2/+2
| | | | | | Fixes: QTBUG-77094 Change-Id: Ia974c4d8abeab48a206fb868ee5532d4aeae7319 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickItemView: refill itself before populate transitionWang Chuan2019-07-161-0/+3
| | | | | | | | | | | | | | | | | | The view uses a visible items list, which is maintained by the refill() method, to determine which items should be triggered to do the populate transition. The refill() was only invoked when component completed before doing the populate transition; but if the size of the view depends on the size of window (for example, using anchors.fill), more delegates could become visible after component completed. In such a case, part of visible items were not be triggered to do the transition. [ChangeLog][QtQuick][Item Views] Item views such as ListView now properly populate delegates with a populate transition when the view is resized after componentComplete. Fixes: QTBUG-76487 Change-Id: Id90c3f73d9911c8a1d6d8b1ea0c51f6c27d0ed5b Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix crashes in QQmlXMLHttpRequestPavel Tumakaev2019-07-131-3/+9
| | | | | | | | | | | | | | | | | | | | | ExecutionEngine::callingQmlContext() in some cases returns a null pointer. According to ISO/IEC 14882 §9.3.1/1 "If a nonstatic member function of a class X is called for an object that is not of type X, or of a type derived from X, the behavior is undefined". Thus, invoking a QQmlContextData::resolvedUrl() member function on a null instance results in undefined behavior, and leads to a crash in some cases. ExecutionEngine::qmlEngine() in some cases returns a null pointer. The QQmlEnginePrivate::get() method must return a pointer to a QQmlEngine private internal class. Call QQmlEnginePrivate::get() with passed null pointer leads to application crash. If the QQmlEngine pointer is null, the QQmlEnginePrivate pointer should also be null. Thus, if the pointer to QQmlEngine is null pointer, the null pointer to the private class should be passed to the QQmlEnginePrivate::warning(). Task-number: QTBUG-75983 Change-Id: Iad240bb6db0be58e9087b7a86f8d400b07623865 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix static buildSimon Hausmann2019-07-122-15/+2
| | | | | | | | | Use the GL attribute name helper functions only from QtQuick to avoid a clash of symbols when linking statically. Change-Id: Ic95b984092f5db222db6dc1f4ac5fb443b5ab714 Fixes: QTBUG-77012 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Fix promise chainingFabian Kosmale2019-07-102-46/+162
| | | | | | Fixes: QTBUG-71329 Change-Id: I261b25ff281bb44d03650ab05258743f104f3cc9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Move Event Handler acceptedButtons check back up to QQPDeviceHandlerShawn Rutledge2019-07-053-3/+7
| | | | | | | | | | | | Reverts what's left of e53510944169ac9f6753e0d14e1b24a24ff7bd9a (amends 73258eca7ab7e3981d9f4aaa5484020cb67854a0): MultiPointHandler is not only for touch handling anymore. DragHandler in particular needs to respect the acceptedButtons property. Fixes: QTBUG-76875 Fixes: QTBUG-76582 Change-Id: I414e785dd09b297c93e5e9f162be23e4a44eca54 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* TapHandler: wait until after tapped is emitted to reset point.positionShawn Rutledge2019-07-052-19/+5
| | | | | | | | | | | | | | | | | | | We don't want it to hold its position indefinitely after the button is released. But in practice, reset() gets called again anyway in QQuickSinglePointHandler::handlePointerEventImpl(), _after_ handleEventPoint(), which means after tapped() is emitted. Having the point hold its position that much longer is convenient for applications and more consistent with the state expressed by the release event. Also amend the documentation. Partially reverts 17237efaefabe924599abe00e92d8b54032d7915 [ChangeLog][Event Handlers][Important Behavior Changes] TapHandler.point now holds the release position while the tapped() signal is emitted. Fixes: QTBUG-76871 Task-number: QTBUG-64847 Change-Id: I621a2eba4507a498788e9384344e8b4b7da32403 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Notify QQItem::mouseUngrabEvent() when an Event Handler steals grabShawn Rutledge2019-07-051-3/+7
| | | | | | | | | | | | We already took care of cases when the handler is a child of the Item, grab transitions involving Flickable etc.; but the bug is about a simpler case when the handler is in the parent of the item that has the grab, and steals from it. Amends 38a016c7b1337d83d77879f45b4a2e6fec11d049 Fixes: QTBUG-71218 Fixes: QTBUG-75025 Change-Id: Id1d6d370e0db75c59ec7dce4a8e545701c501827 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Fix distance field cache growing outside limitEskil Abrahamsen Blomfeldt2019-07-042-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | Due to the way the area allocator is used, where one area spans all the textures, it is possible to have the situation where part of a glyph is allocated to a texture N and the rest to N+1, i.e. the split happens inside the glyph. In a case like this, the cache would grow the texture in question to accommodate the glyph, which would in turn cause the height of the texture to be too large. For most systems, this would not happen, since a single texture would be enough for a font, but when it does the texture creation may fail. The fix is to reduce the height of the area allocated to each texture by one row height, so that if the glyph does happen to hit the border between two and the texture needs to extend, it will still not exceed the actual maximum height. [ChangeLog][Text] Fixed a bug when displaying many characters from the same font on a system with a low maximum texture size. Task-number: QTBUG-76528 Change-Id: I1e559aaf90552afe8531872264186daa5ee61939 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix possible crash when distance field cache spans multiple texturesEskil Abrahamsen Blomfeldt2019-07-041-1/+1
| | | | | | | | | | | | | | | | | | | | | The allocated area for each texture has to have its origin at (0,0) otherwise the actual required height of the cache is too low. When using the texture upload workaround, this would crash, and when not it would lead to missing glyphs. Note that this is because the texture may contain a bit of empty space at the top, since the area allocator may allocate this area to a glyph which actually belongs to the previous texture (we use a single area allocator for the entire cache and some glyphs may overlap the limit between two textures). [ChangeLog][Text] Fixed missing glyphs and in some cases crashes when large character sets were being used on system with a low maximum texture size. Task-number: QTBUG-76528 Change-Id: I710ebbdd2feba4567505393fb12f89b5dd8501f1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Create a URL from the import string before adding the qmldir pathUlf Hermann2019-07-031-1/+5
| | | | | | | | | | Otherwise the path might get interpreted as some other part of the URL, for example the host name. Fixes: QTBUG-76441 Change-Id: I3edde96153403962db4576e5af794419c21b49a8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlAdapterModel: Guard items against deletion during notificationUlf Hermann2019-07-031-2/+8
| | | | | Change-Id: I177ea278b5039688923fc23425a1377522412d08 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlComponent: Check for existence of engineFabian Kosmale2019-07-031-0/+12
| | | | | | | | | | Avoid a crash when setData or create are called after a user mistakenly used the internal constructor of QQmlComponent which does not take an engine. Fixes: QTBUG-55407 Change-Id: Ia4295d1b044723efce1a95607349561d4f1640da Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlDelegateModel: ref objects before allocatingUlf Hermann2019-07-021-1/+1
| | | | | | | | The allocation might run the garbage collector and that might delete the object before we ref it. Change-Id: I13cb74ab011a4eabc8df136023958791a2183df0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix read access violation when using KeyNavigation attached propertyTom Scheler2019-07-021-6/+7
| | | | | | | | | | | | | | | | | | Setting the KeyNavigation.up property of an item to another item will implicitly set the reverse (KeyNavigation.down) property on that other item pointing back to the item. Once the item is destroyed, you will have an invalid pointer stored in the other item pointing to the destroyed item. Using QPointer<> instead of raw pointers fixes that issue, because they will become null on QObject's destruction. Added QQuickItem test that verifies the issue is solved. Fixes: QTBUG-75399 Change-Id: Ibb3e976c4eb9fcd81604bcc2eb757257d3653930 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix bindings not being re-evaluated when changing context propertySimon Hausmann2019-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | Commit 7cb6dce1f3e140ea68d6b05281950f212fc99d38 introduced an optimization to remove bindings that after their initial evaluation had no dependencies or errors (such as when accessing properties not set yet). However when accessing a context property in a silent way -- using typeof -- then no error state is set and the binding is removed. Any later change of the context property results therefore in no binding re-evaluation. This patch skips the optimization on bindings that are associated with a context that has unresolved names. This fixes the concrete bug at the expense of disabling further optimizations in the context if other bindings access unresolved context properties. However since context properties are discouraged anyway, this may be an acceptable price to pay. Change-Id: I95e120a4f71e8ebe0ec1fc44e8703c75f920dd28 Fixes: QTBUG-76796 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix: ListView footer positioned wrong after last item removedEirik Aavitsland2019-06-281-1/+7
| | | | | | | | | | The refill() method would bail out early on an empty model. Make sure that it at least updates the header and footer in such situations. Fixes: QTBUG-31677 Change-Id: I1f3a1848ff263a8f7f9ccfc3b20f16b61348f57b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickItemView: fix crash while doing fast flicking in transitionsYulong Bai2019-06-262-8/+14
| | | | | | | | | | | | | The cause was that fast flicking kicked items in and out of viewport, while in transition, they would abruptly having tracking data structure , i.e. releasePendingTransition of QQuickItemViewPrivate, got iterator invalidated. This also helps to resolve QTBUG-44308. Fixes: QTBUG-76433 Fixes: QTBUG-44308 Change-Id: If14533d3f6b1acd7b6ca0c5c723347c0cb3f54dc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Fix thisObject when calling scope and context properties through lookupsUlf Hermann2019-06-261-2/+8
| | | | | | | | | | | | Just like resolving the lookup initially, we need to set the base also when hitting the cached lookup code path. The base is then used as this object. Fixes: QTBUG-76656 Change-Id: I6f6be05bc9875ddccc6e112e91176a0fa24a8fa1 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Unregister unit cache hook when destroying the plugin singletonMitch Curtis2019-06-252-1/+29
| | | | | | | | | At the point the plugin is actually unloaded the hook turns into a dangling pointer. Fixes: QTBUG-71387 Change-Id: Ib8ccee3f9a86d4700fbea7e87c666cd8f30f71e4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix crash caused by objects self-destructions during displacement animationsYulong Bai2019-06-1711-31/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The root cause was that the QAbstractAnimationJob::finished() might delegate its destruction to change.listener->animationFinished(this), and the original author was aware of that and provided a RETURN_IF_DELETE macro to return early if itself got deleted. In the bug's case, change.listener->animationFinished(this) dispatched to QQuickItemViewPrivate::animationFinished() which called QQuickItemViewPrivate::release() and deleted the QAbstractAnimationJob object itself in the end. However, any objects derived from QAbstractAnimationJob, or holding a pointer to a QAbstractAnimationJob, may potentially fall into the code path calling QAbstractAnimationJob::finished(). Any QAnimationJobChangeListener that directly or indirectly deletes QAbstractAnimationJob should be very suspicious to this kind of "heap-use-after-free" bug. Should ensure that the QAbstractAnimationJob won't be referenced after deletion. In the bug's case, within the code path triggered by ListView displacement animation, the other affected classes by QAbstractAnimationJob are: QQuickItemViewFxItem, QQuickItemViewTransitionableItem, QQuickTransitionManager. To fix this, a new SelfDeletable class is factored out to simplify the self-deletion test logic. Any affected classes are made to have a public member m_selfDeletable. Any code paths that finally reach QAbstractAnimationJob::finished() are wrapped with related util macro. Change-Id: Idd33fc3f2d529fd7d8bb088c329101b1e70dd6c0 Task-number: QTBUG-44308 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* declarative: fix resource initialization for namespaced buildsTim Blechmann2019-02-231-1/+8
| | | | | | | | | `Q_INIT_RESOURCE` cannot be used from within a Qt namespace. so we move the `Q_INIT_RESOURCE` call to static function defined on the global namespace Change-Id: I9eed7699e969369f861b95cdf3f7376ade73c1b3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Software Adaptation: Invalidate on dpr changeMorten Johan Sørvig2019-06-174-6/+9
| | | | | | | | | We need to repaint everything on devicePixelRatio change, like we do on size change. Task-number: QTBUG-66810 Change-Id: I6b2c2ae92335a0aca731a4b0e7621cf7d08881e3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix graphical artifacts after changing only textureAllan Sandfeld Jensen2019-06-132-0/+5
| | | | | | | | If the size of the texture changes, but subrect stays the same, the geometry changed and is now dirty. Change-Id: I5a4de88fd3f788a686fb2186185da2a0a3faad82 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Avoid number conversion issueLiang Qi2019-06-131-1/+2
| | | | | Change-Id: Ia118e5885886605f7364d15d30ac67fdb01a5562 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add simple DelegateChooser example to documentationMichael Brasser2019-06-111-1/+35
| | | | | | Task-number: QTBUG-73964 Change-Id: Ic789839de12e046cc1d8fced75ffa0c93960c165 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* JIT: Don't store accumulator on getTemplateLiteralUlf Hermann2019-06-121-1/+0
| | | | | | | | | We don't use the accumulator in that method. It could contain any random value. Fixes: QTBUG-75642 Change-Id: I41f958c1174cce76d0d77e14d5617d441aaf1e11 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow destroying QJSValues from other threadsUlf Hermann2019-06-111-2/+19
| | | | | | | | | | | | | | QVariants are commonly passed around between threads and QVariants can wrap QJSValues. Therefore we need to allow this. The persistent value is freed immediately if we're still in the same thread. Otherwise a message is passed to the QJSEngine that owns it. If there is no QJSEngine we assume that we can free the value immediately. As such a thing can only happen via private API we can make sure this assumption holds. Fixes: QTBUG-75939 Change-Id: I14c09fd5d6ef7ba689f66656f2bcbb5c88bacf89 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix use after free crash in QQmlDelegateModelNils Jeisecke2019-06-061-1/+16
| | | | | | | | | | | | | | | | | | When iterating over the cache in QQmlDelegateModel::_q_itemsInserted(), _q_itemsRemoved, _q_itemsMoved, _q_modelReset() and _q_itemsMoved, updating some of the item's modelIndex can trigger layout change in the view, which might in turn remove a QQmlDelegateModelItem from the cache, causing us to dereference an already deleted pointer. To prevent a crash, we always check whether the item is still valid in the original cache and skip it if it has been removed in the meanwhile. This fix is similar to 5df747fc but reduces runtime impact by performing the lookup only when d->m_cache has detached from the loop's copy. Fixes: QTBUG-76254 Change-Id: I9d7e0118e64e9ec7d8efae04e6ae319804f31981 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Avoid number conversion issueUlf Hermann2019-06-111-2/+3
| | | | | | | | Change-Id: Ia3f9bde43719859104759033283e697be72f7f53 Fixes: QTBUG-76286 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid assertion when having a ShaderEffect as a delegateJan Arve Sæther2019-05-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The assertion occurred when it initially tried to create an item from the delegate because it needed to show the contents of the first item when the combobox was collapsed. So, in order to do that ComboBox would create an object from the delegate by calling delegateModel->object(). Since the ShaderEffect was not ready to be constructed yet (it didn't have a window, see QQuickOpenGLShaderEffect::maybeUpdateShaders() ) it would call polish on itself in order to try later. Shortly after, it called delegateModel->release(). This didn't delete the object immediately (it called deleteLater() on the object), but it removed the engine and context it was associated with). However, this left it in the list of QQuickWindowPrivate::itemsToPolish. Due to this, QQuickWindow would call updatePolish on it shortly after (as a response to an expose event in our case). But the ShaderEffect was still not associated with an engine, so it would ultimately assert with no engine. The fix is to simply check if the ShaderEffect has an engine, and return early if that happens. Then when the dropdown opens, the ShaderEffect will get a polish() because of QQuickItemPrivate::recursiveRefFromEffectItem(), and it will have both an engine and a window and will properly initialize its shaders. Fixes: QTBUG-67343 Change-Id: Ib8ceb92d0fafb9b958407a50db5daa7b45e1d82a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Remove superfluous double quotes in code snippetsPaul Wicking2019-06-042-3/+3
| | | | | | Fixes: QTBUG-75957 Change-Id: I2c9c70461a828978d1413b8cbdb407663b4b7493 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix for loading translations automatically from resourcesTasuku Suzuki2019-06-011-3/+6
| | | | | | | | When qml file is in resources, translations under i18n was not loaded Task-number: QTBUG-76085 Change-Id: I75315ceb6a1e6ab10309634a3c445a82476d525c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Parser: Accept templated readonly propertiesUlf Hermann2019-05-311-0/+45
| | | | | | Change-Id: I37d313e3156a44eb4487b1be007aa93ace18d882 Fixes: QTBUG-76018 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickTextControl: Fix Qt::ImAbsolutePosition queryVova Mshanetskiy2019-05-241-1/+1
| | | | | | | | | Qt::ImAbsolutePosition is documented to return cursor position, not anchor position. That's also what QQuickTextInput and QWidgetTextControl return. Change-Id: I91f9343f5f33c9d43875dbad515bfda77c13058d Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Doc: Fix incorrect snippet in Repeater QML type documentationTopi Reinio2019-01-231-4/+5
| | | | | | Task-number: QTBUG-73199 Change-Id: I83f0754577b382b26f484bfdc4f6b3a2a921b5f1 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* In qmlUnregisterType() also remove the type from undeletableTypesUlf Hermann2019-05-291-1/+3
| | | | | | | Task-number: QTBUG-76074 Change-Id: I7f5ca6af0955524f9a417811c2e9f960c2b3efb3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add a workaround for ia64 to move Value bits 63-61 to 49-47 for pointersJason Duerstock2019-05-301-0/+17
| | | | | | Task-number: QTBUG-56264 Change-Id: Ifdede70d95f5846e160772c43d22bc2a4123959b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QQuickWidget: fix missing update on show event for software rendererKirill Burtsev2019-05-281-2/+7
| | | | | | | | | | The triggerUpdate call was incorrectly removed by merge 42f485231c Fixes: QTBUG-68566 Change-Id: Ibf37d88315d3ef9879e6cb9728a1c4ef4655c72b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Don't add local for anonymous function's "name"Ulf Hermann2019-05-213-10/+18
| | | | | | | | | | | | Instead, populate their "name" property directly from the surrounding object pattern if applicable, without adding locals. This fixes some ecmascript tests where functions were assigned to the key "eval" in an object. The JS engine then rejected that because you shouldn't use eval in strict mode. That should be close enough to test for regressions. Fixes: QTBUG-75880 Change-Id: Iacc45a3f7b0eb90cddc6ecf6d2bada616d2cf355 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc - minor cleanupKavindra Palaraja2019-05-211-307/+281
| | | | | | | | | | | | * Small fixes to improve readability * Fixed some typos * Updated the link to an old-ish MSDN article * Used a list instead of a long paragraph in the introduction area * Swapped a long list for a table for environment variables Change-Id: Id7eeee5c5b24f96e4577212a385cfa766e809d1f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix lookups of properties in QML singletonsSimon Hausmann2019-05-216-11/+46
| | | | | | | | | | | | An unqualified name that points to a QML singleton will evaluate to a QQmlTypeWrapper JS object. A member lookup in such an object is not guaranteed to always produce the same property. The property cache check may protect us from that, but we must still retrieve the QObject singleton for every lookup. Task-number: QTBUG-75896 Change-Id: Ibd9bac6e5c2047f838758811790b299ace636446 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix leaking scene graph rendering contextsSimon Hausmann2019-03-152-2/+11
| | | | | | | | | | | | | | | | When using the threaded render loop, the rendering thread assumes ownership of the rendering context. If the rendering thread is never started, that context is leaked. This happens in tests sometimes when we create and destroy a window without waiting for exposure. So this patch maintains the ownership in the render loop for created contexts until the per-window thread is started. Task-number: QTBUG-74348 Change-Id: Ifa397fab0833c82110ac4571c1e3790351c43afd Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>