aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QQuickItem: prevent endless loop in focus tab chainWang Chuan2020-03-031-1/+7
| | | | | | | | | | | | | | Since the commit a18ab2a3822e0d, we promote the [startItem] in focus tab chain when it is invisible to prevent endless loop. However the problem still happen if the [startItem] is equal to [firstFromItem] Fixes it by compare the [current] item with the original start item Fixes: QTBUG-81510 Change-Id: Iae0207f39e2b8c4fc6ed0cf36f0a855668accfba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QQuickTableView: Immediately delete delegates when possibleUlf Hermann2020-02-283-1/+30
| | | | | | | | | | | | In the dtor we don't need to care about any side effects a direct delete may have. Rather, any deleteLater() may not take effect anymore as the event loop may be gone already. Task-number: QTBUG-82000 Change-Id: I97935dc47fbbfd0c050e80c333c36a05f685c45d Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlTableInstanceModel: Fix refcounting of metatypesUlf Hermann2020-02-272-4/+14
| | | | | | | | | | | | | | | The reusable items pool should only hold unreferenced objects. Therefore, we can immediately delete them when draining. release() is not suitable here because it unconditionally decreases and therefore underflows the refcount. Furthermore, the metatype is also refcounted, which means we should keep it in a QQmlRefCounter in order to not leak references. Task-number: QTBUG-82000 Change-Id: Iefdaaecc34342eb2e3b1e5a3281f2e46ac472347 Reviewed-by: Joni Poikelin <joni.poikelin@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Add section about QVariantList and QVariantMap as C++ propertiesUlf Hermann2020-02-241-0/+19
| | | | | | | Change-Id: Ie18661274880f45d911baf05797a8b384d72f9f7 Fixes: QTBUG-82249 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix build with -no-feature-networkUlf Hermann2020-02-243-0/+12
| | | | | | Fixes: QTBUG-82418 Change-Id: Ibceeefed75941d963e6b79b44e9231d0d8053221 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix texture coords for the compressed texture atlasMichael Brasser2020-02-211-5/+5
| | | | | | | | The texture coords should be based on the actual image size, and not on the padded size. Change-Id: I262b7ca93e26c48324ec892a988f2fc62132175e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QQmlAdaptorModel: Don't const_cast to call release()Ulf Hermann2020-02-191-1/+1
| | | | | | | release() is const. Change-Id: I00171af75151741e725cd2ceaa80afcaac4f62a3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: list Grid's alignment properties as "since 5.1"Mitch Curtis2020-02-181-0/+1
| | | | | | | | | They were added in 9b801abc3a6967392e27daa35ba7cd802b7164e4 (or 233e83b20512a5e3748542f1c279a5c7ec6310ad, depending on what you ask Gerrit or Git). Change-Id: Ia1c064c04bc3e1a23e6b8caf7d479625368f7fe6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix inverted logicMichael Brasser2020-02-171-1/+1
| | | | | | | A texture has an alpha channel if it is *not* opaque. Change-Id: Ie7fdeb6e622dbb01e19b42877b27f0e0fe8959e2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Windows: Do look for <plugin>d.dll as a fallbackKai Koehne2020-02-151-1/+4
| | | | | | | | | | | | | Do look for d.dll as name of the library, even if Qt was built in release mode. This mitigates the change we did in Qt 5.14.0, where we switched the way our MinGW builds are configured from -debug-and-release to -debug -force-debug-info. But it is also more consisten in how we handle the release build, and macOS dylib loading. Fixes: QTBUG-81021 Change-Id: I73cd11941d86a732b92a3479d47b6e83a839994f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a null check to QQuickWindowPrivate::rendererAnton Kreuzkamp2020-02-121-1/+1
| | | | | | | | | | | | | | | | Afaik there currently is no case in a regular execution where the renderer would actually be null, but for the sake of correctness add a null check as this seems to be the only code location that actually assumes the renderer to be non-null. Additionally, in order to en-/disable custom render modes at runtime, GammaRay actually needs to recreate the renderer and therefore resets the renderer to null in order for QQuickWindowPrivate::syncSceneGraph to recreate it. Thus we need a null check to make sure we don't crash in the short time frame where the renderer is null. Change-Id: Ief5c405f3bc8725d55e22cd33f2164830764e33d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* QQuickLoader: store statusFabian Kosmale2020-02-122-39/+61
| | | | | | | | | | This allows us to emit the change signal only when the status has actually changed. Due to alignment restrictions, this does not even change the size of the class. Fixes: QTBUG-82002 Change-Id: I2192bf80e72b92108046780811c3acdab39af518 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix a bug where a layout could crash or become non-responsiveJan Arve Sæther2020-02-124-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This happened because of that QQuickText is ill-behaving: When the width on a QQuickText with word wrap enabled is changed to something less than its implicitWidth, its implicitHeight is changed to reflect the height it needs in order to fit all lines. This will cause the layout to be invalidated, and rearranged again. However, at the same time it will also change its implicitWidth actually become wider than its initial implicitWidth (this seems to be a bug). So the next time it is rearranged it will actually be wide enough so that it doesn't need to wrap. This again will cause its implicitWidth and implicitHeight to change to reflect that only one line is needed, which again will cause it to rearrange, but since the item has a too small width for that it will again change the implicitHeight to reflect that it needs more lines..... This went on forever until there was a stack overflow. In addition it also caused an endless (that is, if it didn't stack overflow) updatePolish()/polish() loop (basically polish() was called from within updatePolish() continuously). To make the layout more robust for such "ill-behaving" items we have to add one recursion guard, and one polish-loop guard. Change-Id: I9f752ed320a100c8d0f0fd340347a556e63318e5 Task-number: QTBUG-73683 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Fix QQmlProperty and Connections for properties starting with '_'Fabian Kosmale2020-02-112-3/+9
| | | | | | | | | We do a weird renaming for the change handler of properties starting with '_', now we do it at least in a consistent way. Fixes: QTBUG-82017 Change-Id: I1535a5ee462f3a344c972461f1fb954f039aa854 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Mention styleName in the Font QML type documentationAndy Shaw2020-02-111-0/+1
| | | | | Change-Id: I1f2ec7b4bb96955f57b3afd4a295f04dbb70987f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Android: Don't include QtQuickParticles in the dependenciesAndy Shaw2020-02-101-4/+1
| | | | | | | | | | | | Before qmlimportscanner it was necessary to mark QtQuickParticles as a dependency, but now it is possible to have qmlimportscanner and androiddeployqt handle all of this for us. So we no longer need to make it an explicit dependency. Task-number: QTBUG-38296 Change-Id: I6e0baefdcf002746af26d8c95fa1f318770cc658 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QV4Engine: Do not construct invalid QVariantFabian Kosmale2020-02-071-19/+21
| | | | | | | | | If the provided typeHint is -1, it does not make sense to construct a QVariant of this type and to check whether it is appendable. Fixes: QTBUG-81945 Change-Id: I32cbb9e70e210a7eca8d55801c1783338d1173b7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QAccessibleQuickWindow::focusChild() to return focused descendantPeter Varga2020-02-061-2/+6
| | | | | | | | | | Same as the focusChild fix for qtbase: a132e02540 Fix QAccessibleWidget::focusChild() to return focused descendant Task-number: QTBUG-78284 Change-Id: Ibc3e3287790ebc879513a5b1a739e3a919e1f038 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Clarify the Binding.restoreMode warning messageUlf Hermann2020-02-031-7/+11
| | | | | | | | | | Specify that you need to import QtQml 2.14 and where. Fixes: QTBUG-81787 Change-Id: Ia8e7fb3229971294cbade2791075dcd0b5943fae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Doc: Remove outdated noteJoni Poikelin2020-02-031-4/+0
| | | | | | | The behavior described in the note does not apply to Qt 5. Change-Id: Ia4d45ca35d095d6cdc193f276bd52c7ad403b82f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Enable conversion from QJSValues containing arrays to container typesFabian Kosmale2020-01-311-1/+24
| | | | | | | | | | | | We started to convert containers to QJSValues, so that we could use them as JavaScript arrays. Unfortunately, this would then lead to a type missmatch when those same values where to be stored in a property of the container type. This commit fixes this by converting them back to the original type. Fixes: QTBUG-80916 Change-Id: I30a3b03e17c34b171d4a6881dfd7801c13e94d80 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix static builds due to name clashesAndy Shaw2020-01-311-7/+7
| | | | | | | | | When QtQuick and QtQuickParticles was linked into the same application then there was a name clash, so the classes in QtQuickParticles are renamed to avoid this clash. Change-Id: I8c2144ba7ad5838c95077a370ef400bd706fce8a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix some ListView bugs related to snapping when it had a headerJan Arve Sæther2020-01-301-15/+153
| | | | | | | | | | | | | | | Most bugs were related to the PullBackHeader header positining mode, for instance the old code did not take into consideration that for the PullBackHeader it was sometimes not sufficient to scroll the view. The header also had to be scrolled independently from the view: We achieve this by hooking on to the same timeline that is used for scrolling the view. (This way, both animations are synchronized, and they start and end at the same time). Change-Id: I75708c0fd8d4741032c04ad9ee144d7a49cf3359 Fixes: QTBUG-76362 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get rid of global gadgetPtr in QQmlValueTypeUlf Hermann2020-01-297-69/+150
| | | | | | | | | | | | We should not keep user-created objects in global data structures. This is inherently thread-unsafe and crashes when the user passes static data and later unloads the same. Instead we keep the cached gadgetPtr wrapper objects in the engine now. Fixes: QTBUG-79553 Change-Id: I24ac3e84b572831d1d70b61b8a6001338579e284 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickFlickable: fix division by zeroMitch Curtis2020-01-291-4/+15
| | | | | | | | | | | | | | | | | | | | The issue could be seen when enabling exceptions and running the following QML code: Flickable { id: flickable anchors.fill: parent contentWidth: 1000 contentHeight: 1000 Text { text: flickable.visibleArea.xPosition } } Change-Id: I615f9f9dc84903fb3a902f416a55e3ce3fece64c Fixes: QTBUG-81098 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: document behavior and caveats of TextInput's padding propertiesMitch Curtis2020-01-281-0/+12
| | | | | | | Task-number: QTBUG-80699 Task-number: QTBUG-81679 Change-Id: I9c936a020ffa358dfa97d9b7044a90a27d3336dc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.14.1' into 5.14Qt Forward Merge Bot2020-01-271-1/+4
|\ | | | | | | Change-Id: I424a0f7fe04ea801ed155bc27a91eace7ebaa843
| * Merge 5.14 into 5.14.1v5.14.1Kari Oikarinen2020-01-1512-31/+185
| |\ | | | | | | | | | Change-Id: Iefb900b42cc0476e62342724a5f3a480c09ce354
| * | Return false for user types in isSaveable()Andy Shaw2020-01-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling isSaveable() for a user based type then it should return false because the client will not be able to read these types. This prevents it from using the wrong streaming operator for the user types then. Change-Id: I7f3bff359dd0c3fa49dc4e83db0057b79c481ed9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Doc: Move snippet file to qtxmlpatternsPaul Wicking2020-01-271-20/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This file was forgotten when moving the documentation to qtxmlpatterns, leaving the docs broken. Task-number: QTBUG-77176 Change-Id: I832a4c3cb2551b8e683b6e6fb97034ba86a74322 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | V4: Check for exceptions before we use the result of a JS callUlf Hermann2020-01-2316-42/+99
| | | | | | | | | | | | | | | | | | | | | | | | If the call resulted in an exception the return value is undefined. Task-number: QTBUG-81581 Change-Id: Ibfdd5e1229cf5437f270232d3b1a91308adeec72 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | ArrayPrototype::method_filter: Check for exception after callbackUlf Hermann2020-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If there was an exception we cannot assume the returned value holds anything sensible. Also, we should immediately return. Fixes: QTBUG-81581 Change-Id: I822c204c476e05d6de78124b66ab2f939ca38ffd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Remove shadereffect dependency from shapesKarim Pinter2020-01-223-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Uses wavefrontmesh only if the shadereffect feature is there. Path doesn't need to depend on shadereffect feature only on gui module. The shape also missed a sgtexture header. Fixes: QTBUG-81296 Change-Id: I78425ef8a09226b99e9b9f6010dda9dac9009fe5 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Initialize boolean m_hasItemChangeListenersDavid Edmundson2020-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | | Found by a valgrind warning of an unintialized jump. Change-Id: I24279c97042e1971eaff35c3363fc1250e5c6c6e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Fix printing of garbled UTF-8 characters from QML verify() statementsDimitrios Apostolou2020-01-201-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Messages that contain QtPositioning.coordinate are including the degree unicode symbol U+00B0. These were printed as garbage from QML tests that use the verify() function. This was caused by the message argument being encoded using toLatin1() on its conversion to const char *. This caused both garbled text and invalid XML output in the test runs, which in turn was causing coin's agent to fail while deserialising the test XML log. This was fixed by changing from toLatin1() to toUtf8(). Since testlib is receiving plain const char * arguments for the "description" argument, it was deemed correct to standardize on UTF-8 as the proper encoding for it, to avoid losing any information (QTBUG-81474). When it's output to the console it can be re-encoded depending on the system's locale, of course. Task-number: QTBUG-81474 Fixes: QTBUG-80527 Change-Id: I0f1fdb7d414d9dfd30d4638b00088c9502c339bd Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Text and TextEdit: document MarkdownText formatShawn Rutledge2020-01-175-62/+209
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81306 Change-Id: I8ee50727f4e75eee8c0997f17193d8c99e855551 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Fix documented types for DelegateChoice propertiesMichael Brasser2020-01-151-4/+4
| |/ |/| | | | | | | Change-Id: I0a5907354e7a983e7c7ad36aa9d86c3bf87d264e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QQuickItemView: fix crash when changing modelWang Chuan2020-01-152-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When visible items become invisible, ListView will try to cache them and redisplay these items if necessary. However, we can't cache items when changing to a new model, since the old one will be deleted later Fix by adding a flag to let ListView know we are clearing items and prevent cache unnecessary items Fixes: QTBUG-80203 Change-Id: I50dcd3f0586c93496b143bdad0e59751360501a8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* | fix for out-of-screen preview windowsUlf Hermann2020-01-142-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | The problem was that the screen position was changed by the user and it did not check this before it set it to that saved position. Also added a warning if it is still happening - which is not expected anymore. Fixes: QTBUG-79323 Change-Id: Id3d945626461016d51fcad9f8882c3d39544a985 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Register PointerScrollEvent and document the WheelHandler.wheel signalShawn Rutledge2020-01-133-4/+142
| | | | | | | | | | | | | | | | | | | | | | Writing an onWheel() handler script was working and mentioned briefly in docs; but PointerScrollEvent and the signal were not documented. Also fixed the type of QtQuick::WheelEvent::inverted: bool not int. Fixes: QTBUG-81302 Change-Id: I31342955c42e20ff52460a1b7ee95da325e38af6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Remove unneeded/unused signalAlbert Astals Cid2020-01-132-2/+0
| | | | | | | | | | | | | | | | | | | | QQuickMultiPointHandler inherits from QQuickPointerDeviceHandler, which inherits from QQuickPointerHandler that already has a marginChanged signal. It's the only place that signal gets actually emitted from. Amends da722fb448f06cf43780e6f857a1ccd9f07176d6 Change-Id: I8ba3129ed69903d6f3cff56401c8a18580af0375 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | QQuickItemView: Fix iteration/deletion logicUlf Hermann2020-01-101-12/+16
| | | | | | | | | | | | | | | | If a QVector has been modified from the outside, all its iterators are invalid. Therefore, we need to do index-based iteration here. Change-Id: I02b850daf6aadd8f8a81cc93b0d295e1170d7dd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | On QQmlEngine destruction drop singletons before type loaderUlf Hermann2020-01-101-2/+2
| | | | | | | | | | | | | | | | The singleton destruction can trigger additional types to be loaded. Fixes: QTBUG-80840 Change-Id: Ifa406b2a1cfd3b9e9b36e8005dfc0808eebf15cf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | SequenceObject: Better message when trying to write readonly containerUlf Hermann2020-01-091-1/+3
| | | | | | | | | | | | | | Before it would only output "Type Error". Change-Id: Ibd3a85f327c3ce8c58295c7e900c516b77c85a2b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Fix unused variable warning on big-endianShawn Rutledge2020-01-081-0/+2
|/ | | | | | | Fatal because of -Werror. Change-Id: I535848be1c733c0718779c8a4c8c93ed3873cc88 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* V4: Avoid integer overflow on typed array length checkUlf Hermann2020-01-081-2/+5
| | | | | Change-Id: I370b4c4bd0d7962878849ca7c5edef6cb36eca25 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Check stack limit in FunctionPrototype::method_apply()Ulf Hermann2020-01-081-1/+7
| | | | | | | | | 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 <fabian.kosmale@qt.io>
* V4: Don't crash when iterating invalid Proxy objectsUlf Hermann2020-01-082-2/+2
| | | | | | Fixes: QTBUG-81109 Change-Id: I97f37c68d33f414d7bffa9b66e0aaed93370dc68 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* V4: Don't crash when sorting arrays with non-stringifyable entriesUlf Hermann2020-01-081-0/+6
| | | | | | Fixes: QTBUG-81108 Change-Id: I7e121776a2416b5338c4c1309ec7cc31c703ad28 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix unused variable warningShawn Rutledge2020-01-071-2/+1
| | | | | | | This was fatal because of -Werror. Change-Id: Ibe06f77d4728268af3f099554f7151bdaf9ac26b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>