aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVectorJarek Kobus2020-06-2517-37/+34
| | | | | | Task-number: QTBUG-84469 Change-Id: I4c3353c00a566023503fbc178ba8454391dc334c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use qt_enable_autogen_tool to explicitly enable AUTOMOCMårten Nordheim2020-06-242-1/+22
| | | | | | | | Otherwise it will depend on the moc executable existing already during configuration/generation. Change-Id: I9b3f0ef42ba6ecf5eeb59e92fd6dad553c5c47af Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* CMake: Fix tst_qqmlmoduleplugin for MinGWCristian Adam2020-06-245-0/+6
| | | | | | | | | | | | | Some of the pro files didn't have the CONFIG += plugin line, which resulted in pro2cmake generating shared libraries for the respective plugins. The shared libraries had the "lib" prefix on MinGW, which caused the plugin loading mechanism to fail. Task-number: QTBUG-84886 Change-Id: I240967d918db13be45cf9b79bfcc989e9b826937 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Add links to examples in scenegraph docsLaszlo Agocs2020-06-242-0/+8
| | | | | Change-Id: I00192314cdb954acdd4f933eec912cffab3584c6 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Fix up the Scenegraph section in examples.qdocLaszlo Agocs2020-06-241-8/+6
| | | | | | | | Add the newly introduced custommaterials example. The list was out of date in other ways as well, fix it all up. Change-Id: I4dc6911930b834a8ac9992042605ceebcb5e450c Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* New custom material examplePaul Olav Tvete2020-06-2413-3/+749
| | | | | | Fixes: QTBUG-78577 Change-Id: I280ffeda4bba1a9c170feb1ffa4b6c95eb0e6d28 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-06-241-2/+2
| | | | | Change-Id: I07f537fadb6c0174f6238350d3acd5fac59441a2 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qmllint: Properly process qmldir imports and dependenciesUlf Hermann2020-06-247-105/+112
| | | | | | | | | | | | | | | | | | We don't want to pick the dependencies from the qmltypes files. Rather, parse them directly from the qmldir. Do process versions, too. Also, import explicitly given qmltypes files only once, and don't expose QML types from dependencies as actual types. Hide them behind an inaccessible prefix. For the inaccessible prefix to work, we need to import the C++ class names without the prefix. The prefix doesn't make sense for C++ names anyway. In addition, properly process version-less imports. Change-Id: If582ad271db35351d219332c319571a814628fe0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Discern between "auto" and versioned imports in qmldirsUlf Hermann2020-06-2427-76/+280
| | | | | | | | | | | | | You can now import the latest version, a specific version, or, "auto" which is the same version as the parent module. [ChangeLog][QtQml] You can now procedurally add module imports to modules, using qmlRegisterModuleImport(). However, actual import statements in qmldir files should be preferred wherever possible. Fixes: QTBUG-84899 Change-Id: I3b32dd8b07a19d31b6538b9a6bb436840862f345 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Don't leak QQmlBoundSignalExpressions in signaltransition.cppUlf Hermann2020-06-241-5/+8
| | | | | | | | | We need to adopt them, not addref the newly created object. Fixes: QTBUG-83214 Pick-to: 5.15 Change-Id: Ic8660e65d4b7c7698657f6b2806b5478f7f15ea1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Replace QQmlBoundSignalExpressionPointer with QQmlRefPointerUlf Hermann2020-06-2410-150/+24
| | | | | | | They do the same thing. Change-Id: Ia35832e6175728e7480d09caba6d3833718d9e80 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlPropertyCache: Don't retrieve metaObjectOffset() twiceUlf Hermann2020-06-241-1/+1
| | | | | Change-Id: I233fc368a26d7a571a32829dcd6149096dfe2e07 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-06-231-2/+2
| | | | | Change-Id: Iacc84326aa0f1ae84f51a3a75049b0ad41c365d0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qqmlobjectcreator: Fix a typo in translation stringLiang Qi2020-06-231-1/+1
| | | | | | | | Pick-to: 5.15 Fixes: QTBUG-85165 Change-Id: I052e97be398791f54f6b5c106ffe364f3457359a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Document how to use CMake for Qt QmlKai Koehne2020-06-235-79/+25
| | | | | | Task-number: QTBUG-73058 Change-Id: Ic27cfdf76b8f77c9834baaeaf449434bf5f28416 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* qqmlecmascript: modify test to return type which is actually unknownFabian Kosmale2020-06-231-1/+3
| | | | | | | | This is necessary after the change to QMetaMethod, which now uses compile time information to return the (meta) return type. Change-Id: I9f0bf4fd174c7000273b6d3c65ec3ebf8f2c46f8 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* tst_qqmlecmascript: QList is now QList again (not QVector)Fabian Kosmale2020-06-231-1/+1
| | | | | Change-Id: Ib3b7437fcf3696111563cc1b5f9440b6b0d9c75e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove QQuickPointerDevice in favor of QPointingDeviceShawn Rutledge2020-06-2339-559/+270
| | | | | | | | | | | | | | ...and generally deal with changes immediately required after adding QInputDevice and QPointingDevice. Also fixed a few usages of deprecated accessors that weren't taken care of in 212c2bffbb041aee0e3c9a7f0551ef151ed2d3ad. Task-number: QTBUG-46412 Task-number: QTBUG-69433 Task-number: QTBUG-72167 Change-Id: I93a2643162878afa216556f10808fd92e0b20071 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Move resetOpenGLState out of QQFBOGiuseppe D'Angelo2020-06-237-82/+202
| | | | | | | | | | | | | QQFBO is not the only client of resetOpenGLState. Although in theory third-party GL code that integrates with QtQuick should reset its state, in practice it doesn't. By making resetOpenGLState only available into QQFBO, now we're blocking a Qt5->6 upgrade path. There's also no compelling reason for this function to be in QQFBO at all, so move it out to as a free function in a ad-hoc new namespace. Change-Id: Ic8e5c7e244db37a5b6257d516e6aea3a9db44898 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2020-06-231-2/+2
| | | | | | Change-Id: I769ad245ae463f761bd417cfdb272950ac944c7c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add graphics instance and device basics to QQuickWindow docsLaszlo Agocs2020-06-231-0/+39
| | | | | Change-Id: I21fc32bfabfc297d6c345eb9c6647b0d8bb2113e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* MultiPointTouchArea: don't emit canceled() during ordinary touch releaseShawn Rutledge2020-06-221-2/+3
| | | | | | | | | | | Amends 0012f8bd152a36a67abc696465f27d612625b5d9. For some reason tst_QQuickMultiPointTouchArea::inFlickableWithPressDelay()'s check QCOMPARE(flickable->property("cancelCount").toInt(), 0); passed on Qt 5, but we get a canceled() signal in Qt 6. Task-number: QTBUG-78818 Change-Id: Ib77bc4fc5774bd697247351c274bb5deb8cc4009 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Defer setting a QVulkanInstance on the windowLaszlo Agocs2020-06-222-10/+13
| | | | | | | | ...to createRhi(). There is no need for the VkInstance before that point. Change-Id: I87f4e8154e96409bccd7844f1bf80b957bb54d69 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Do not resolve URLs when assigning them to a propertyUlf Hermann2020-06-2228-121/+133
| | | | | | | | | | | | | | | We don't know in advance if a URL is part of the source code and should be relative to the current element, or if it is part of the application data and should not be touched. [ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or intercepted anymore when assigning them to a "url" property. Instead they are resolved and possibly intercepted when used to access an actual resource. Fixes: QTBUG-76879 Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename setSceneGraphBackend to setGraphicsApiLaszlo Agocs2020-06-2224-39/+78
| | | | | | | | | | | | | | | | ...and fix up the docs. The string-based setSceneGraphBackend() stays of course (the docs have been enhanced, however). The GraphicsApi enum-based overload is now renamed to setGraphicsApi(). Using the same name for both functions is a historical artifact, reflecting the evolution (5.0 - 5.8 - 5.14). In 6.0 we can give it a more appropriate name, since it does not have much to do with "backends" from the user's perspective. Change-Id: Id75dbf81f50a148797e5b5de9be4000153737473 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add test for rendercontrol + rendererinterfaceLaszlo Agocs2020-06-223-6/+232
| | | | | | | | | | Also add support for doing QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Unknown). This becomes relevant especially in tests, where we may request a specific graphics API, but then want to switch back to the default behavior. Change-Id: Ib09c411432fc37bd4d36ce55d54d20af3f83860a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* tst_qquickwindow: Add basic rendererInterface testLaszlo Agocs2020-06-221-51/+110
| | | | | | | And remove some dead code. Change-Id: Ic49acb1241020dea4ebff829d335d3b98716bbc0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Emit new frame signals from the software backendLaszlo Agocs2020-06-223-0/+28
| | | | | | | Introduce an autotest case too. Change-Id: I658b09b6e4e5b30cdc2174fdf21f60adf93e44ff Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QQuickWidget: do not crash when failing to make context currentLaszlo Agocs2020-06-221-1/+5
| | | | | | | | | | | | | | | ...in createFramebufferObject(), e.g. upon resizing. Certain systems have a problem with OpenGL contexts during resizing, according to user reports. We do not know why makeCurrent() would fail, so we cannot prevent the failure, but we can check the result of makeCurrent() and not go on doing GL stuff (which would almost certainly crash) without a valid context. Task-number: QTBUG-83319 Pick-to: 5.15 Change-Id: I50a4f4e06d636fa0ee41fb9b80e720500711854f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Doc: Update QML connection inline snippetPaul Wicking2020-06-221-1/+1
| | | | | | | | Pick-to: 5.15 Fixes: QTBUG-85177 Change-Id: I52f0f8a24e53051aff984cabd414bbfa73fe098e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qqmltypecompiler: Be more careful when resolving enumsFabian Kosmale2020-06-223-4/+77
| | | | | | | Task-number: QTBUG-83703 Pick-to: 5.15 Change-Id: I60c0811e47e0cd3b63b3ddfebb9bb6e9ab7f4f40 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Revert "Decode directory separators in source URLs"Ulf Hermann2020-06-225-25/+19
| | | | | | | | | | | | | | | | This reverts commit 7ec30c51b287159377761338fe6d3b48706d74ee. We don't want to half-decode directory separators on assignment. This just introduces inconsistency down the line. [ChangeLog][QtQml][Important Behavior Changes] Percent-encoded directory separators in URLs are not automatically decoded on assignment to url properties anymore. This was obviously not a good idea to begin with. Fixes: QTBUG-81244 Change-Id: I1938abbe8aada88beff0d628397674255e8b2472 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix QQmlContext::nameForObject Qt 6 todoFabian Kosmale2020-06-202-3/+2
| | | | | Change-Id: I41949ea39a84c58ab261688b431f62ce864f49e2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove non-const overload of QQmlApplicationEngine::rootObjectsFabian Kosmale2020-06-202-14/+0
| | | | | Change-Id: Icb4ba3d282bb556236dd9415ab3ccf9163965808 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Move a misplaced include to help no-pch buildsLaszlo Agocs2020-06-192-1/+1
| | | | | Change-Id: If3ffc6d80234e1e89a7e4e057768edffe8b84d29 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add getters for rendertarget/device/configLaszlo Agocs2020-06-192-0/+52
| | | | | | | | | | | All the classes are implicitly shared, as is the Qt standard, so just return them as is by value. This is useful when applications split up their logic and so certain settings are set from different places. (we see this a lot in practice with QSurfaceFormat for instance) In this case it is helpful if they can query what they previously stored via the setter. Change-Id: Id133df8a48d22b896754e6e47a4047ba374597ef Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make it possible to specify device extensions in a future proof mannerLaszlo Agocs2020-06-1917-33/+473
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow the pattern of QQuickRenderTarget and QQuickGraphicsDevice. This makes it possible to integrate with real world frameworks, such as OpenXR, that, especially with Vulkan, expect this level of configurability. (i.e. one pulls the list of extensions to be enabled on the device, that then needs to be taken into account by Quick, otherwise it will end up with a VkDevice that is not usable by OpenXR) Same goes when integrating native Vulkan rendering into an application: if certain extensions need to be enabled on the VkDevice, today that can only be done with an environment variable which is not entirely ideal. These issues are now solved by a new simple (and extensible) container QQuickGraphicsConfiguration, which is associated with the QQuickWindow. When applicable, the scene graph will then pick up the relevant settings. Expand the related docs everywhere. Also rename the vulkanInstance() to defaultVulkanInstance() to emphasize that it is the instance that is used for normal QQuickWindows, and is not provided when redirecting via QQuickRenderControl. While we are at it, include another obvious candidate: the use-depth-buffer flag. It turns out that Quick3D's Overlay render mode can be pretty problematic if Quick writes to the depth buffer. In order to avoid relying on environment variables (QSG_NO_DEPTH_BUFFER), we now provide a proper API for controlling that as well. Change-Id: Iefdb62c1f53de8bd34e3f0d393b00c5020d6188a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix up exposing the swapchain to Quick3DLaszlo Agocs2020-06-193-4/+30
| | | | | | | | | | Quick3D is broken in combination with QQuickRenderControl. This is because just exposing the swapchain is not enough - there is no swapchain with QQuickRenderControl. Rather, one needs access to the command buffer and render target then. Change-Id: I6c06ad3d83ab0018b9f985073757a3378dbce24b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix typos in QQuickGraphicsDevice docsLaszlo Agocs2020-06-191-3/+3
| | | | | Change-Id: I1cee45abe31c4499bc4a598bc913943ec7f1f134 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* qmllint: search methods and properties also in attached typeEvgeniy A. Dushistov2020-06-194-22/+76
| | | | | | | | | | | | | | I changed the strategy of traverse via related types. Before: traversal happens only via linked list type -> type->superClass After: traversal via binary tree formed by attachedType and superClass I use pre-order strategy, current type, then all attached types, then all super classes Fixes: QTBUG-84861 Change-Id: I4a8fce869bc541de6900514d29575174d2753f02 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove comment that is no longer validEskil Abrahamsen Blomfeldt2020-06-191-2/+0
| | | | | | | | | In a8d357761dbf74cbdc72348be6c655cafb745ff2, we added the removed bit to the batch and implemented the suggested optimization, so this comment is no longer valid. Change-Id: I2a5c82f0ace206a989ef8c6d0c2c2b87dc83ad6f Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Improve a qHash implementationGiuseppe D'Angelo2020-06-181-2/+2
| | | | | | | Fixup the signature and improve qHashMulti. Change-Id: I701a0f43ff0533269964334767dc220b8fd48188 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix SceneGraphRendererFrame event for the Quick ProfilerLaszlo Agocs2020-06-181-0/+7
| | | | | | | | | | The Creator view only works correctly when each event has the pre-defined number of data points. So record the Binding timestamp, which went missing in the RHI port at some point, to get correct results. Change-Id: Iac2f458ac0264a6afd4bb91e56b19e7ac7343816 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Lock all type modules of the same URI when importing a pluginUlf Hermann2020-06-183-6/+21
| | | | | | | | | | | | | A plugin may provide multiple versions of the same types. If we don't lock them all, a further plugin may later mess with the ones we didn't lock. The code clearly attempts to prevent such a situation. Of course, a plugin may still register types under a wholly different URI, and sidestep this mechanism. However, in contrast to exposing multiple major versions from the same plugin, this is not recommended. Change-Id: Ib8d8bbeec8e738020c6d07aedcc4664157b80dcf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix outline shader with transparent fillEskil Abrahamsen Blomfeldt2020-06-182-2/+2
| | | | | | | | | | | | | | | | A bug snuck in via e8d9bc1bcada7d94af5a33d64a9afc860ede5b84 in one of the outline shaders where we would actually fill the entire glyph with the style color instead of just drawing the border. Since we were drawing the fill on top afterwards, this wasn't visible in a normal test, but when the fill color is set to transparent it showed. This changes the alpha channel-based outline shader to match the old code as well as the code in the red-channel based one. Task-number: QTBUG-69301 Change-Id: I2f9d4b9426577c331866172fc6f7240f379efef2 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* qmlformat: Fix nested ifsMaximilian Goldstein2020-06-184-19/+88
| | | | | | Fixes: QTBUG-85077 Change-Id: Ia2fec64a389fd7355f3fcf9438408b021c5abef4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove broken profiler/trace points in the scenegraphLaszlo Agocs2020-06-183-87/+2
| | | | | | | | | | | | | | | As the todo note says: this profiling is all wrong Not reporting something is better than reporting something bogus. The other profiling points, f.ex. in the render loops, seem to work as expected and give reasonable results in the QML Profiler view in Creator. The autotest needs fixing because there is no SGContextFrame events left with the rhi code path either atm, just like with the software backend. Change-Id: Iee2d3feb586108db50c83c6c03ea415384561ede Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* qmltyperegistrar: Always register version x.0 of the moduleUlf Hermann2020-06-181-2/+7
| | | | | | | | | | If version x.y exists for y > 0, we can assume that version x.0 also exists, even if no types have been specially registered for it. This helps with making empty modules importable. Change-Id: I3f5209db5836fd889b3ebec63fa348b76738a825 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlMetaTypeData: Use a better container for the type modulesUlf Hermann2020-06-183-58/+77
| | | | | | | | | | | We often want to retrieve all type modules of a specific URI, no matter what version. Use a sorted vector to make those available without iterating all modules. Also, use a unique_ptr rather than manual memory management. Sorting the pointers should be fairly cheap, and we also don't have to store the keys anymore. Change-Id: I132c2ec3817afab1d60c3ba832d0b907ff6bfeb0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Refactor QQmlMetaTypeData::VersionedUri a bitUlf Hermann2020-06-181-7/+10
| | | | | | | | The hash function should take a seed, and properly combine the hashes, both operator== and qHash are better defined as friends. Change-Id: I770a725b72477689a654078da6f57f750a85abbd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>