aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Allow redirecting QRhi-based rendering via QQuickRenderControlLaszlo Agocs2020-04-1139-135/+3729
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-094-8/+177
| | | | | | | | | | | | 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-093-0/+144
| | | | | | | | [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 "Merge remote-tracking branch 'origin/5.15' into dev"Qt Forward Merge Bot2020-04-0976-212/+1329
|\
| * Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-04-0976-212/+1329
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * Avoid deprecated TouchPoint rect accessors in MPTA and QQWinPrivShawn Rutledge2020-04-072-3/+4
| | | | | | | | | | | | | | | | | | | | | Followup to 0124f73dfb779924e46eb8b319358dbbd5af2577 Change-Id: I8fa2e2fc8eae7a789a9d5e846f34c767c688b0e1 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * QQuickTableView: fix crash in tableLayoutToString()Richard Moe Gustavsen2020-04-072-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * Add missing include to d3d11underqml exampleLaszlo Agocs2020-04-071-0/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ib1891a509dccdbe071ce71058aaa58887ddfeb8e Reviewed-by: Jonas Karlsson <jonas.karlsson@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | * Add qmltypes for Qt.test.qtestrootUlf Hermann2020-04-064-52/+130
| | | | | | | | | | | | | | | | | | | | | Somehow this was missed when moving to static type registration. Change-Id: I33f0567449f7bce62b0cb71b9d4f0862ed801e59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * qmltyperegistrar: Follow the private includes setting in qmltypesUlf Hermann2020-04-062-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the file names need to be prepended with "private/" in order to be usable, that also holds for other tools that want to use them. Therefore, also add the prefix to the qmltypes files. We won't have a chance to figure this out again at a later point. Furthermore, don't add file entries for types we cannot register anyway. Change-Id: If04297db419e364f472b8ec627c599c0cbb4ffd9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * CMake: Fix double inclusion of CMake plugin targetsAlexandru Croitor2020-04-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 99ace38d22c640e37bb1a41095ee3b126169816a, all plugin files are included automatically, not only the ones ending in Plugin.cmake. Thus the extra inclusion done by the QmlConfigExtras file should only be done if strict mode is set. This fixes errors of the following type when doing find_package(Qt5Qml) add_library cannot create imported target "Qt5::QTcpServerConnectionFactory" because another target with the same name already exists. Amends 99ace38d22c640e37bb1a41095ee3b126169816a Amends 2f2dd3b0c28db210ea1f00d569f6c1626894c5f4 Task-number: QTBUG-83282 Change-Id: I205036092bff9925aa95472f0aa6a212f0372227 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| | * TableView: Clarify the rows/columns docs about inserting/removingAndy Shaw2020-04-031-6/+11
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82904 Change-Id: Ib44122fd0c2e5fc83cfef1368ed4ec0f3b1951af Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | * Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Frederik Gladhorn2020-04-023-0/+80
| | |\
| | | * Merge remote-tracking branch 'origin/5.14' into 5.15Frederik Gladhorn2020-04-013-0/+80
| | | |\ | | | | | | | | | | | | | | | Change-Id: I2193fb62d998f130c33adda340b0da45f7b418fb
| | | | * Fix QQuickMouseArea getting stuck in pressed state when hiding in pressFrederik Gladhorn2020-03-313-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | | fix -no-feature-translation buildTim Jenssen2020-04-022-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I817564e979d4c69f4d7ebd2c9e1d8cddf0727c13 Reviewed-by: Ulf Hermann <ulf.hermann@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>
| | * | | Add doumentation for nullish coalescingMaximilian Goldstein2020-04-022-0/+6
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83145 Task-number: QTBUG-81615 Change-Id: I87a2053aa560b434b6282f5dad852537ac0342cf Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | Doc: explain how to receive mouse press and release eventsv5.15.0-beta3Mitch Curtis2020-03-311-0/+11
| | | | | | | | | | | | | | | | | | | | Change-Id: Icd6df727597659b81612a57a3e7e2e5b31adfef6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Fix signal emission order for zero-duration animationsJan Arve Saether2020-03-314-8/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-306-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-306-11/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * | QQuickPointerTouchEvent::touchEventForItem(): avoid deprecated accessorsShawn Rutledge2020-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | Change-Id: Ifdf42f77ac3f79690e81392d85cd19667cc37f17 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-289-29/+39
| | |\| | | | | | | | | | | | | Change-Id: If7b3f7902eb18d586d8b721e77f4dfedc87cfb9a
| | | * Flickable: add nullptr check (crash seen only in release mode on windows)Nick Shaforostov2020-03-261-0/+3
| | | | | | | | | | | | | | | | | | | | Change-Id: I2ac42ded0c2ed4dc3937a57f69109f10b19f9cc7 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * PinchArea: document the pinch parameter for its signalsGiuseppe D'Angelo2020-03-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter was described in the documentation but missing from the signatures. Change-Id: Ie2718c9f2ac945ac7c8ea1555d097b426d9fba2a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | | * QV4Engine: Avoid memory leak in toVariant conversionFabian Kosmale2020-03-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should really backport this to 5.14. Someone will hit it. (cherry-picked from commit 78fd438f158839ffebcd52cc7974eac28489dbdd) Change-Id: I2c713fd759ac40aaaac0c0943edb993d3e27686b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | | * Make tst_qquickcanvasitem significant again; fix image size roundingShawn Rutledge2020-03-056-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
| | * | QQmlTableInstanceModel: Restore draining behavior of Qt 5.14Ulf Hermann2020-03-272-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.14 model items are directly deleted when draining the reusable items pool, rather than calling deleteLater() on them. This may be slightly more efficient and due to some unknown side effect the deleteLater() call creates a memory leak. Restore the direct delete in drainReusableItems(). Fixes: QTBUG-82000 Change-Id: Ia1027b1004c04e8aceaa5ff16a600849c46bf470 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * | Remove comments about renaming and removing properties for Qt6Jan Arve Sæther2020-03-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the record, my argument for not acting upon these comments was that they seems to be missing a key issue: OrientationSensor does not offer a superset of the features of QQuickScreen::orientation. Therefore, it cannot just replace QQuickScreen::orientation: An OrientationReading is the output from the sensor itself regardless of any settings that was made in the OS to for instance lock the UI to landscape only. And this seems to be the point of the QScreen::orientation: It's supposed to be the "virtual/locked" orientation we get when we ask the OS (which might not reflect the true physical orientation, since it might be overridden by the OS due to e.g. landscape locking). The original author agreed with this argument, and agreed that the comments can just be removed. Change-Id: I2df0ae9debc6b6177f0e4ee6efb60c03da726e15 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | qmltyperegistrar: Use target instead of template nameMaximilian Goldstein2020-03-264-17/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the fact that multiple targets may be present in the same directory we have to ensure they all get a unique qmltypes. Fixes: QTBUG-82710 Change-Id: I4d7966035644b68f7d3330a4c974369503c48bf2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | tst_qqmllanguage: Avoid use after freeUlf Hermann2020-03-261-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently we're poking into the unit data during the last evaluate(). We need to keep it alive until then. Change-Id: I3a08766503a3508720b3ac154171e6fc8bd280d1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Doc: Fix typo in linkPaul Wicking2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-83099 Change-Id: I8cbf2680021836a9e43c225211cf9b479445452e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
| | * | qmltyperegistrar: Accept extra foreign types filesUlf Hermann2020-03-269-5/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you add your own libraries with metatypes, qmake cannot determine where to look for their metatypes.json files. Add a qmake variable that allows the user to specify them. Fixes: QTBUG-82709 Change-Id: I3f5685146c134c89e541e4097ff3928de9af2aee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * | qmlformat: Fix inconsistent if statementsMaximilian Goldstein2020-03-254-6/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should now produce more consistent output for if statements. Fixes: QTBUG-82261 Change-Id: I39da0c80c4aadc2c5bdef32953c34ed9f0708a9e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | QML: Avoid cyclic references between ResolvedTypeRefence and CUUlf Hermann2020-03-257-51/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compilation unit keeps a list of references to used types. Usually those are references to types in other compilation units. However, in the case of inline components they can be references to the same compilation unit. In that case we should not addref() the compilation unit, as that forms a cyclic reference. Fixes: QTBUG-82768 Change-Id: I29d28f3a4780aad4fabd4aa2ed02ca0d0108987e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | qmlformat: Improve comment attachmentMaximilian Goldstein2020-03-256-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fixes UiPublicMember nodes having a newline between comment and first node - Implements a Front_Inline type so comments at the beginning of object definitions are handled properly Fixes: QTBUG-82259 Change-Id: I0b40290037ce88a9ffe16390d72cbf3d704db41a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * | qmlformat: Add option for alternative line endingsMaximilian Goldstein2020-03-252-10/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows user to decide between native (default), macos (\r), unix (\n) or windows (\r\n) line endings. Fixes: QTBUG-82258 Change-Id: Ie1eb365085815cbbebbf0d026c6f72f0ef2acb9d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| | * | Check that QJSValue to set conversion worksFabian Kosmale2020-03-243-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, fix the check to actually test the correct capabilities by using the containerCapabilities function; testing _iteratorCapabilities only worked by chance so far. Task-number: QTBUG-82743 Change-Id: I64f20c6bf1e47737c7b927f79e1e78c1a1603741 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | tst_qqmllanguage: Don't leak malloc()'d unit dataUlf Hermann2020-03-241-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When intrusively playing with compilation units, we need to play by the rules and actually free them when we are done. Task-number: QTBUG-82768 Change-Id: I75ac0d01d48922a6a214df0c9d2345e27fb39bff Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * | Add standard casing for FolderListModel::fileUrlMichael Brasser2020-03-242-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-82298 Change-Id: Iad95b7a90c2c247c44b8656b0fd104843bd4fa8c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * | Resize offscreen window when QQuickWidget is resizedMitch Curtis2020-03-243-9/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a typical Qt Quick application, when a window is resized, the contentItem of that window is resized with it, and then the root item. QQuickOverlay in qtquickcontrols2 listens to size changes in the contentItem (QQuickRootItem) via addItemChangeListener(), as a cheap way (e.g. no signals) of knowing when to resize background dimming effects. It resizes the dimmer item to the size of the window. The first problem with QQuickWidget is that it only ever resizes the root item when using the SizeRootObjectToView resize mode, and not the contentItem. The second problem is that the root item is resized (via updateSize()) before the window itself even has a size (which happens in QQuickWidget::createFramebufferObject() via the call to d->offscreenWindow->setGeometry()). To demonstrate the second problem in detail, consider the following widget hierarchy (written in everybody's favorite language: QML): QMainWindow { QQuickWidget { QQuickWindow { // QQuickWidgetPrivate::offscreenWindow QQuickRootItem { // QQuickWindowPrivate::contentItem Page {} // QQuickWidgetPrivate::root } } } } The QMainWindow starts off as 200x200. When the window is resized, QQuickWidget::resizeEvent() is called. The first thing it does is call updateSize(), which in the case of SizeRootObjectToView, resizes the root item to 300x300. This causes QQuickOverlayPrivate::itemGeometryChanged() to be called, and the dimmers are resized to the size of the window, but the window still has its 200x200 size, as it is only updated later, when QQuickWidget::createFramebufferObject() is called. This patch fixes these issues by ensuring that contentItem and the window itself are resized along with the root item. As to why such manual intervention is necessary: from what I can see, it is because it's an "offscreen" window. This means that QWindowPrivate::platformWindow is null, and setGeometry() takes a different path that presumably results in no QResizeEvent being sent to the QQuickWindow. As QQuickWindow relies on resizeEvent() being called to resize its contentItem, the contentItem is never resized. With a typical Qt Quick application, all of this works as expected. Change-Id: I7401aa7a9b209096183416ab53014f67cceccbe4 Fixes: QTBUG-78323 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
| | * | rhi: Remove broken assertLaszlo Agocs2020-03-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recent patch for enabling the command buffer be specified already during the sync phase changes the behavior so that the m_currentFrameCommandBuffer may already contain a non-null value when we get to the render phase. Just remove the assert. Change-Id: I7f1e0d8cd6a307f64425ac4ce9dd056a89e7eed2 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | * | Remove mindless cast, 'errorOccurred' was never ambiguousTimur Pocheptsov2020-03-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-82605 Change-Id: I67b7088b97ebbf7cfef7a21a3987de7f8810b12c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| | * | qmllint: Fix typoFabian Kosmale2020-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-82992 Change-Id: I6cb79b5736f283f68ec0a94c4494e4ca592b16d4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * | Trade memory for performance in PropertyUpdater::doUpdateFabian Kosmale2020-03-242-11/+8
| | | | | | | | | | | | | | | | | | | | Change-Id: I0117029ecbe7fc369c15fcd8a44f93797e95ab3e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | | Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-04-091-2/+2
|/ / / | | | | | | | | | | | | Change-Id: I99cfd169e255511ac8d7d29a7951dd123af86129 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | CMake: Fix QML_MODULE_INSTALL_DIR directory for non-prefix buildsLeander Beernaert2020-04-081-0/+10
| | | | | | | | | | | | | | | | | | Change-Id: Iba763eb1bb5da2b5ec263108c9841ecd9063fbea Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | QQuickTableView: add function: itemAtCell(const QPoint)Richard Moe Gustavsen2020-04-083-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a function to the API to let the application get the item loaded for a specific cell. [ChangeLog][TableView] A function 'itemAtCell()' has now been added to let the application get the delegate item loaded for a specific cell. Change-Id: Ie84ef44ea2a0a901487812c4d611b98d4c86ee22 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>