aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* qmllint: warn when passing a directory to -i optionMitch Curtis2020-05-061-4/+16
| | | | | | | | | It should be a file. Change-Id: I52f4ebcf8bdd8ddd1fedd66ceffe9a060139c1d9 Fixes: QTBUG-83861 Pick-to: 5.15 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Implement URLSearchParamsMaximilian Goldstein2020-05-062-0/+60
| | | | | | | | | | Implements URLSearchParams (https://url.spec.whatwg.org/#urlsearchparams), completing our implementation of the URL object. Still needs the for..of iterator to get implemented. Change-Id: Iad33ed2f3fe0b2598ca2b0b21a4743f5f7dc19fd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a default message to QML_UNCREATABLEMaximilian Goldstein2020-05-062-0/+19
| | | | | | | | | [ChangeLog][QML][Feature] Add a default message to QML_UNCREATABLE when proving an empty string as a reason Fixes: QTBUG-83842 Change-Id: Ifd2044fa6c56c3a382d451ec47d5f92a1ac16b81 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-051-1/+14
|\ | | | | | | Change-Id: I0e495f3d59f2a507aeb73c013e1d8ec0668313c4
| * Gracefully handle Accessible attached property on non-itemsTor Arne Vestbø2020-04-281-1/+14
| | | | | | | | | | | | | | | | | | Attaching to e.g. a ApplicationWindow will result in corrupting the window's private data and subsequent crashes. Fixes: QTBUG-83738 Change-Id: Ia708edf29a0356a858ac27ff70125fc38932ba78 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QQuickLoader: prevent clearing initial properties after active = trueWang Chuan2020-05-052-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | After commit b6d88c73, we implement the method [disposeInitialPropertyValues] and clear the cache of initial properties actually. Since we also call this method after source loaded, it will cause loss of initial properties after active = true. Fixes: QTBUG-83895 Change-Id: Iaa500fff14dcaad79a9e68dcbac9f65fa8720456 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <hausmann@gmail.com>
* | Improve performance when dynamically adding items to a layoutJan Arve Sæther2020-05-043-25/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was especially noticeable when a Repeater was populating the children of a layout, and its model was dynamically changed: When the model was changed, the repeater removed one item at a time until all items were removed, then applied the new model and then added all the new items for the new model. The layout reacted to that by doing a full sync of the QML layout into the internal gridlayout engine each time an item got removed or added. For very large layouts (or layouts that have complex size hints to calculate), this caused a major slowdown. This patch fixes that by postponing the sync until we get a updatePolish(), basically replacing most calls to updateLayoutItems() (which does the sync) with a call to invalidate() (which schedules a polish). It will also get rid of some binding loop warnings due to this change. This means that there is a small change in behavior: impicitWidth, implicitHeight and Layout.{min,max}imum{Width,Height} might in some cases be incorrect until the updatePolish() have been done. (This is however consistent with how Row/Column/Grid behaves) The creation test in qmlbench was quite simple, so it did not suffer from the most severe performance issues, but we did not regress: > compareresults: auto/creation/layouts/delegates_rowlayout.qml: improvement by 3.91% auto/creation/layouts/delegates_columnlayout.qml: improvement by 6.59% auto/creation/layouts/delegates_gridlayout.qml: improvement by 1.83% Overall average of differences: 4.11% And for the gridlayout_large.qml (Repeater with 1000 dynamically changing items): > compareresults: auto/layouts/gridlayout_large.qml: improvement by 66477.78% Overall average of differences: 66477.78% [ChangeLog][Qt Quick Layouts] Performance improvements to Qt Quick Layouts. This has the small side-effect that size hints (implicitWidth/implicithHeight etc) changes are not immediately emitted after a layout has been modified (e.g item added) Pick-to: 5.15 Fixes: QTBUG-71839 Fixes: QTBUG-65121 Fixes: QTBUG-66017 Change-Id: I6922efe449134246df66b177992e4442747bc8fb Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Remove the 'windows' render loopLaszlo Agocs2020-05-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For compatibility, QSG_RENDER_LOOP=windows shows a warning and uses basic. For OpenGL proper, threaded is the default on Windows since Qt 5.5, so this will not affect there in any way. By default the windows loop was only used with ANGLE, or a non-standard opengl32 implementation like the Mesa llvmpipe shipped with the pre-built Qt packages. (and only on Windows, as the name suggests, even though the implementation of this loop is not tied to Windows in any way) For these we default to basic now. This will make no difference in practice: The windows render loop's value is that it takes the custom animation driver (advanced per frame, assuming that vsync-based throttling is active) approach from the threaded loop, while behaving like basic otherwise, thus providing smoother animations compared to basic, in theory. But due to its relatively little use (not the default since 5.5), ANGLE being removed in the near future, and not making much sense for the software rasterizer cases (those will have bigger problems than smoothly advancing animations, often providing no vsync, so they are better off with basic anyways), it makes no sense to invest into adding QRhi support for this loop too. Task-number: QTBUG-78578 Task-number: QTBUG-82997 Change-Id: I8ccd2e5e375799df5bb5018df247aa5b8197032a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | Fix building of declarative tests with disabled opengl moduleKai Koehne2020-05-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test is already guarded by qtConfig(opengl(es1|es2)?) but even if opengl is available, the opengl module might be missing (for instance because it's dependency qtwidgets is disabled). This amends 8a7e8190b7c2e3. Fixes: QTBUG-83775 Pick-to: 5.15 Change-Id: I0a37a3ed11817965c261ebced52dae132ce8bbfa Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Fix line number for follow-up lines in stringsChristian Stenger2020-05-011-0/+25
| | | | | | | | | | | | | | | | If a string ends with a line terminator follow-up lines had a wrong line number. Change-Id: I98a8f69cbc876e07b3fe83490d517bf7771c59b5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix lexer handling of escape sequences in stringChristian Stenger2020-05-011-1/+30
| | | | | | | | | | | | | | | | | | The lexer handled escape sequences inside string literals wrongly which could led to follow-up problems like wrong offsets or even lines of tokens. Change-Id: Ief14dda77f9079931a7d19ea549017a1d59c2d0b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | qmllint: Add flags for toggling warningsMaximilian Goldstein2020-04-301-1/+1
| | | | | | | | | | | | | | | | Enables all warnings by default and makes it possible to toggle individual ones using command line flags. Change-Id: Ie55f32f646fd9422313977969f9f00b59ee9ad99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Fix font-related test failures triggered by Qt Base updateEskil Abrahamsen Blomfeldt2020-04-292-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change f761ad3cd9ad1252f24b76ae413298dc7bed8af3 in qtbase exposes a pre-existing difference in measuring the height of QTextLayouts versus QTextDocuments when the leading is large enough to impact the font height. See QTBUG-82954 for details on this. Since the two were assumed to be the same, this change causes a test failure with certain fonts. To work around it, we expect the test failure for the case where the text format is RichText (and QTextDocument is going to be used internally), and we detect that the font exhibits the problem. For TextEdits, QTextDocument is always used, so we also expect failure there. Note that this is equivalent to the fix for the same issue in the QLabel test: c4ef0b92d5fb2c621e880347bd48d01b6f31eb24 Fixes: QTBUG-83839 Task-number: QTBUG-82954 Change-Id: Ic32e0d835480b42b68bb452301ec4bfa6ce30d3a Reviewed-by: Liang Qi <liang.qi@qt.io>
* | PropertyCache: Fix resolution of forbidden QObject methodsUlf Hermann2020-04-282-0/+83
| | | | | | | | | | | | | | | | | | Despite best intentions the code still hid methods of gadgets when those were derived from other gadgets. Pick-to: 5.15 Change-Id: I787300b2a22d6557608772d218e73b9af6f79652 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QQmlValueTypes test: import QtQuick to make font availableUlf Hermann2020-04-281-0/+1
| | | | | | | | | | | | | | The test relied on QtQuick being loaded by other tests before. Change-Id: Ide326b4e541b29289e37a27735a1cb47f700b0e2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | qmllint: Show filename in addition to line and columnFabian Kosmale2020-04-241-12/+14
| | | | | | | | | | | | Fixes: QTBUG-83684 Change-Id: If15a9498ae223dccfbafe88b14453a4b180247d9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-242-1/+158
|\| | | | | | | Change-Id: I77f3400914fbce58f98cb3a5602fd0cebf219ac6
| * Merge remote-tracking branch 'origin/5.14' into 5.15Liang Qi2020-04-222-1/+158
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/labsmodels/qqmltablemodel.cpp tests/auto/qml/qqmltablemodel/tst_qqmltablemodel.cpp This follows edc8512580fa16892dc13034e93300cc6a2bba59. Change-Id: I515d44d5d8309f4d7b911996c0ab65ea803176fa
| | * Merge remote-tracking branch 'origin/5.14.2' into 5.14Qt Forward Merge Bot2020-04-212-0/+157
| | |\ | | | | | | | | | | | | Change-Id: Icc410df82e57ed370ab0b80253074d495fc8c135
| | | * Merge 5.14 into 5.14.2Kari Oikarinen2020-03-108-25/+54
| | | |\ | | | | | | | | | | | | | | | Change-Id: I294cb27a59754f7090f9bc1a500faf0423571549
| | | * | TableModel: Allow a double to be added to a field seen as int previouslyAndy Shaw2020-02-282-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the type for a TableModelColumn can be seen as an int when it is in the first row, it is still possible that it is representing a double value in other rows. Therefore it should be allowed to add/change a row that would display a double for that column. Change-Id: I994a8ead595f836a20a4e82fbf94953b1aa4b7da Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | Add additional properties to FontLoader to help disambiguateEskil Abrahamsen Blomfeldt2020-04-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FontLoader only returns the family name, and there is no way to disambiguate fonts within the same family. This change adds the option of getting other properties from the loaded font to help with this. [ChangeLog][QtQuick] Added FontLoader.font property which is filled with a font query that matches the loaded font. This can be used to disambiguate when multiple fonts in the same family are loaded in the same application. Fixes: QTBUG-68829 Change-Id: If05e85a1ca8d93b93100345cb2d05cd1ad6c7549 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Test if a layout with "fixed" size still do a rearrange if neededJan Arve Sæther2020-04-221-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a layout doesn't change size, it should in many cases still rearrange its children. Pick-to: 5.15 Change-Id: I72ae893da5c561d282800f80c9ab0bec86c557a3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | | | | Update dependencies.yaml and adapt to API changes in qtbaseSimon Hausmann2020-04-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation callback does not have to perform the comparison anymore and the shared pointer of the private is not used in the API anymore. Also, the versionFunctions() has been moved out of QOpenGLContext and renamed QOpenGLVersionFunctionsFactory::get(). QHash doesn't keep iterators stable under erase(), so clean up the code relying on it, and avoid an intermediate QList at the same time. Task-number: QTBUG-74409 Change-Id: I90176be1067d88c8f2b1ea07198a06d432f5be9c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | | | QQuickRepeater: Fix interaction with PackageFabian Kosmale2020-04-222-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Amends 3b806a18cc665b5ae0e12d45fe170bfc3f00352a. Eric's change tried to tackle the issue by making the PartModel more well-behaved. However, this still left some issues, as exhibited by the linked bug. This time, we simply make the repeater more robust, and setup d->deletables if it's not done yet. Pick-to: 5.15 Fixes: QTBUG-71964 Change-Id: I58c80c84f73fddaea5d6030f92ffff219ecf2b71 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.15' into devFriedemann Kleint2020-04-223-0/+59
|\| | | | | | | | | | | | | | | | | | | Change-Id: Iafb7061945e011542fbf0f6ebe776f0a4187b0a4
| * | | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-04-202-0/+57
| |\| | | | | | | | | | | | | | | | | | Change-Id: I5d7acb2a3883104d6002f147b58977ff58aa3383
| | * | | OpacityAnimator: apply opacity animation to the first frame in SGWang Chuan2020-04-072-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using OpacityAnimator, an opacity node will be created and inserted into nodes tree to perform opacity animation. However, since the default value of opacity node is 1, the opacity animation will start from 1 even if we set it from 0 to 1. Fixes this issue by updating the value of opacity just after creating a new opacity node. Fixes: QTBUG-79199 Change-Id: I2e462f0c56892fda040836ffde6685145769e60c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | Blacklist tst_qquicktextedit::hAlignVisual on SLESFabian Kosmale2020-04-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76719 Change-Id: I0979134b8a8fe8f8460a13ef1338991126537413 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> (cherry picked from commit 395075816e77969b28ded88d027a398194d3e756) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | Prepare for new members in QQmlPrivate::CachedQmlUnitSimon Hausmann2020-04-211-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass the address of the entire structure through to the compiler, so that when adding new members we can easily access them. Change-Id: I5da75ba4e64d3e0e750a3ff3df4edbb88cdb6937 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-173-0/+64
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qmltyperegistrar/qmltypesclassdescription.cpp src/quick/items/qquickrendertarget.h Change-Id: I9e24d2252a35b8e74af89ad72af796df658167ca
| * | | | qmltyperegistrar: Correctly handle foreign and super classesUlf Hermann2020-04-163-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if there were multiple super classes, revisions were only collected for the first one. Also, properties and enums declared in the type itself were ignored when QML.Foreign was specified. Finally, we would previously re-set resolvedClass and re-sort the revisions on each super and attached type. Change-Id: Iccb939cae66a5c4e2e5c312359e389463df80b4e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | | qmltyperegistrar: Retain alias and isFlag information for enumsUlf Hermann2020-04-092-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id484c7bb1a3ed3b2bf593f6197664e4ee2ad4006 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | | Fix build with latest QHash from qtbaseSimon Hausmann2020-04-141-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | std: :reverse_iterator is not supported anymore on QHash's iterators. Change-Id: I755ef69e1c2cc9427a77c49ae2ff85055345ff12 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | | | Implement Qt.alpha()Maximilian Goldstein2020-04-142-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduces an easy way to get a version of a color with transparency (e.g. Qt.alpha("red", 0.5)). [ChangeLog][QML][General] Added Qt.alpha for easily modifying a color's alpha value Task-number: QTBUG-77635 Change-Id: Ic724e5fa503ca2ae5157a99eed1b5c913a39239f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | Allow redirecting QRhi-based rendering via QQuickRenderControlLaszlo Agocs2020-04-111-15/+589
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the Qt 6 TODO for using an externally-provided render target when rendering the scene via QRhi. And say hello to QQuickRenderTarget. This class exists to allow potentially extending later what a "render target" consists of. Instead of hard-coding taking a single void * in the setRenderTarget() function, it takes a (implicitly shared, d-pointered) QQuickRenderTarget, which in turn can be created via static factory functions - of which new ones can be added later on. The new version of QQuickWindow::setRenderTarget() takes a QQuickRenderTarget. QQuickRenderControl gets a new initialize() variant, and a few extra functions (beginFrame(), endFrame()). This allows it to, by using QSGRhiSupport internally, create a QRhi under the hood. As a bonus, this also fixes an existing scenegraph resource leak when destroying the QQuickRenderControl. The qquickrendercontrol autotest is extended, with a QRhi-based test case that is executed for all of the QRhi backends that succeed to initialize. This is the internal verification. In addition, there is a Vulkan-based one that creates its own VkDevice, VkImage, and friends, and then uses Qt Quick with the same Vulkan device, targeting the VkImage. This test verifies the typical application use case. (sadly, life is too short to waste it on writing Vulkan boilerplate for an on-screen version of this, but we have the D3D11 example instead) What QQuickRenderControl loses, when used in combination with QRhi, is the grab() function. This never made much sense as a public API: QQuickWindow::grabWindow() call this when the window is associated with a rendercontrol, so as a public API QQuickRenderControl::grab() is redundant, because one gets the same result via the standard QQuickWindow API. It is now made private. More importantly, reading back the content is no longer supported, unless the 'software' backend is in use. The reasoning here is that, if the client of the API manages and provides the render target (as abstracted by QQuickRenderTarget), it is then expected to be capable of reading back the content in whatever way it sees fit, because it owns and manages the resource (e.g. the texture) in the first place. Providing fragile convenience functions for this is not reasonable anymore, and was questionable even with OpenGL, given that it is not future proof - what if the target is suddenly a floating point texture, for instance? The software backend case makes sense because that relies on private APIs - and has no render target concept either - so there the same cannot be achieved by applications by relying on public APIs only. Another new class is QQuickGraphicsDevice. This is very similar to QQuickRenderTarget, it is a simple container capable of holding a set of of native objects, mostly in the form of void*s, with future extensibility thanks to the static factory functions. (examples of native object sets would be a ID3D11Device + ID3D11DeviceContext, or a QOpenGLContext, or a MTLDevice + MTLCommandQueue, or a number of Vulkan device-related objects, etc.) This allows one to specify that the QRhi created under the hood (either by QQuickRenderControl or by the render loop) should use an existing graphics device (i.e. it is basically a public wrapper for values that go into a QRhi*InitParams under the hood). QQuickRenderTarget and QQuickGraphicsDevice are both demonstrated in a new example: rendercontrol_d3d11. We choose D3D11 because it is reasonably simple to set up a renderer with a window, and, because there is known user demand for Qt Quick - external D3D engine interop. Passing in the custom engine's own ID3D11Device and ID3D11DeviceContext is essential: the texture (ID3D11Texture2D) Qt Quick is targeting would not be usable if Qt Quick's QRhi was using a different ID3D11Device. Task-number: QTBUG-78595 Change-Id: I5dfe7f6cf1540daffc2f11136be114a08e87202b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* | | | | QQuickTableView: add functions to get current rows and columnsRichard Moe Gustavsen2020-04-091-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This API can be used to query and iterate the currently loaded rows and columns inside the view. [ChangeLog][QtQuick][TableView] Added the properties leftColumn, rightColumn, topRow, and bottomRow, which can be used to query which part of the model is currently visible inside the view. Change-Id: I06f99cc1e8da1004dc8614977f149192e1880ba4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | QQuickTableView: add cellAtPos() functionsRichard Moe Gustavsen2020-04-091-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][TableView] cellAtPos(x, y) has been added to query which cell is under the given position. Change-Id: I69523868158b589ea3bb9facba815000d2a058d7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-0931-38/+856
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4executablecompilationunit.cpp src/qml/jsruntime/qv4executablecompilationunit_p.h src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlpropertycachecreator_p.h src/qml/qml/qqmltypecompiler.cpp src/qml/qml/qqmltypedata.cpp tests/auto/qml/qmlformat/tst_qmlformat.cpp tools/qmllint/scopetree.cpp src/qml/qml/qqmlapplicationengine_p.h Adjusted tools/qmllint/findunqualified.cpp to use newer API Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
| * | | | QQuickTableView: fix crash in tableLayoutToString()Richard Moe Gustavsen2020-04-071-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function QQuickTableViewPrivate::tableLayoutToString() returns a string used for debugging the loaded table. If the table is empty, it will crash/assert while trying to read data out of an empty vector. This patch will check for this case before creating the string. Change-Id: I47c01b3c8447ccc7424fe475f38e22ff70c681d8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Frederik Gladhorn2020-04-022-0/+74
| |\ \ \ \
| | * | | | Merge remote-tracking branch 'origin/5.14' into 5.15Frederik Gladhorn2020-04-012-0/+74
| | |\| | | | | | | | | | | | | | | | | | | | | Change-Id: I2193fb62d998f130c33adda340b0da45f7b418fb
| | | * | | Fix QQuickMouseArea getting stuck in pressed state when hiding in pressFrederik Gladhorn2020-03-312-0/+74
| | | | |/ | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 78c1fcbc49f56463064eef738a475d9018357b24 we stopped giving the exclusive grab to hidden or disabled items with is good. But the change did not take into consideration how mouse area handles its internal state. As a simple example: A mouse area that would set itself hiddin in the press handler, would continue to have d->pressed == true, which means it would not react to any future press events. The fix is to let mouse area check in its change handler whether it has become invisible. The test also checks that enabled behaves the same way. There is no action needed, since mouse area does completely custom handling of enabled (maybe something to fix in Qt 6), disabling a mouse area doesn't disable its children for example, it doesn't invoke QQuickItem::setEnabled at all. Due to this circumventing the common behavior, by chance disabling a mouse area in the on pressed handler works. Fixes: QTBUG-74987 Change-Id: Idb8499b3e5bcb744fbba203fdea5c46695bd5077 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| * | / | Do not match for line numbers in the source code in ignoreWarning()Jan Arve Sæther2020-04-021-3/+3
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | It makes it very volatile to source code changes.. Use the RegExp variant of ignoreWarning() instead. Change-Id: I9a9a26e844d5e7e30289d3843c89a9e6724f9f71 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| * | | Fix signal emission order for zero-duration animationsJan Arve Saether2020-03-313-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The order for non-zero-duration animations are: * started() * runningChanged(true) * stopped() * runningChanged(false) * finished() This patch tries to ensure that zero-duration animations have the same signal emission order. The problem was that when setRunning(true) was called on zero-duration animation, it would call itself (setRunning(false)) lower in the call stack in order to immediately stop again. This had the implication that we could emit stopped() even before started() was emitted (since the recursive call to setRunning(false) would actually complete before the ancestor stack frame setRunning(true) was completed) To fix this we emit started() *before* we call start() on the animationInstance. There is still a bug in that runningChanged(true) is still not emitted for a zero-duration animation, but this patch should improve the current behavior in the sense that stopped() is not emitted _before_ started(). Task-number: QTBUG-48193 Change-Id: Ic2bc85e648e6746f6a058e2e9136515e7fdb6192 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| * | | qmltyperegistrar: Record header file names in qmltypes filesUlf Hermann2020-03-302-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We will need them to find the types in C++ code. Change-Id: Id00c6d855adbb767a0be8a9469fbe47447ccec8b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | qmltyperegistrar: Accept more file extensions as headersUlf Hermann2020-03-305-3/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, even if the file does not appear to be a header, still try to include it. People use strange file names. Change-Id: I2db7bd6aa14007a8b458c3860ba0553bb3b384b7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-286-23/+29
| |\| | | | | | | | | | | | | | Change-Id: If7b3f7902eb18d586d8b721e77f4dfedc87cfb9a
| | * | Make tst_qquickcanvasitem significant again; fix image size roundingShawn Rutledge2020-03-055-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - the test items must be visible, so that waitForRendering() works - arcTo::test_paint tried to render an out-of-bounds arc, which resulted in rendering nothing. Now renders within the 100x100 canvas. - painted() is not emitted the first time the Canvas is rendered. - Canvas.save() saves relative to the directory from which the test is run, while Canvas.loadImage() loads relative to the test data directory in this autotest (other tests are loading red.png for example). So we need to use absolute paths to test loading and saving in the directory where the executable is. - canvas.getContext('2d').getImageData(8.5, 8.5, 8.5, 8.5) now triggers different rounding behavior in QRectF::toRect(), after qtbase 88e56d0932a3615231adf40d5ae033e742d72c33: it becomes QRect(9,9 8x8). The assert in qt_create_image_data() needs to accommodate that. - Fixed another pedantic warning in qt_create_image_data a few lines above: if it creates the image itself, it needs to round the qreal width and height values. This reverts commit a23ee5c0de0d91859e1e76e64073861347dd9861 and amends 424cfef3cc3c140df51905713fa3849562bc494d and d142b2d212ea09a7919a0a2761ee9c04d5c9bda8. Task-number: QTBUG-41043 Change-Id: I825c2c5a2bbc8d5324c3ba41a681aa68bc25a159 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Blacklist a few more canvas testsShawn Rutledge2020-03-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-41043 Change-Id: I3a48439d30d9ec1cd908197c8d63984c95d336e3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>