aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Auto-test-export QQuickIconLabelPrivateMarc Mutz2022-01-291-1/+1
| | | | | | | | | | It's used in tst_qquickiconlabel.cpp, thus breaking ubsan builds unless exported. Change-Id: I44192fafc7cfcc57e6eccaf0d7df37b510e6d290 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7e3b966bf88c2316516f24b0800d4edcf705d5b9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* doc: Fix a typo in a See Also link from QQuickText::boundingRect()Shawn Rutledge2022-01-281-1/+1
| | | | | | | Change-Id: I2209e43206258e8b3a118e011a9d1eb8e7a61bd5 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit fe5493492350c1e46d184e7595c521ed795ea54c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qquickwindowmodule: Properly expose Visibility enumMaximilian Goldstein2022-01-281-2/+3
| | | | | | | | | | | Previously the foreign Visibility enum was not properly exposed leading to it not being represented in qmltypes. Fixes: QTBUG-99311 Change-Id: I20d865328af6fe4d807e611cf69d496b3b574551 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 0caeae246d7a4c04f35e2f4af69f676cdcbe46c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use up-to date LGPL license headerKai Köhne2022-01-2722-242/+308
| | | | | | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. See also 5d4679289bc for a similar commit in the past. Change-Id: Icbe5eea7bb7b9c5d46cdd56fa3b177d2e22a5fa9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit f3e4ecfbffa19facb12800ae41f261ff3bfdac63) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document qmltc output formatAndrei Golubev2022-01-276-23/+323
| | | | | | | | | | | | Make understanding qmltc output easier by showing how it works on a trivial example. Add a paragraph on the generated code location as an addition Fixes: QTBUG-100051 Change-Id: I0fa0f2c6c60fef7accbe855159275591d9e8bbc6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 8ec6b990e13c8b41d0415af83c5890ef7a9ee227)
* qmltc: Rename CMake command's argument FILES -> QML_FILESAndrei Golubev2022-01-274-11/+11
| | | | | | | | | | This way we make it consistent with qt_add_qml_module() Fixes: QTBUG-100214 Change-Id: I9f38a8ba3dec978ccdf4ea937ff662ae2449e582 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 97123dbe6755a787e93797f717f8ebf193352b85) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qmltc: Do not search for qmltypes in non-TARGET libsUlf Hermann2022-01-271-0/+4
| | | | | | | | | | If we haven't built the library ourselves, we can't find its qmltypes this way. Change-Id: I2dba9cfa7a3574df5a34a6cfbd5d34aae9515171 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 0d799cc0ddf851c64c15441f4774784e3179d1f2) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Add revision to QQuickItem::ensurePolished()Shawn Rutledge2022-01-271-1/+1
| | | | | | | | | It's new in 6.3. Amends 18794487a5bf303a60bda7047550048f7d38a86a Change-Id: I903b3e04091d7bce3217b90c23b823575bd9097b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 453df21f4c29ea5f507deb31089c0ad255897f24) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Avoid duplicated qt.labs.qmlmodels documentationKai Köhne2022-01-271-2/+4
| | | | | | | | | | The dir is already part of qtqmlmodels.qdocconf Fixes: QTBUG-99974 Change-Id: I99a97358798fd08bdb95bcc9dad3932511f24dc7 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> (cherry picked from commit c45034803b73cee9530edd56c2da0e2bf021c846) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Query the redirect rt size only once in renderSceneGraphLaszlo Agocs2022-01-271-3/+3
| | | | | | | | | | | | ...because this is not just a simple getter but has to perform checks about the validity of the QRhiTextureRenderTarget with regards to the referenced texture and renderbuffer objects. Therefore, calling it once is better than twice. Change-Id: I3e442c601d3a1ee3591d05c9a1dfe6ba4957e1ff Reviewed-by: Christian Strømme <christian.stromme@qt.io> (cherry picked from commit 5615adbca98c52a04c1caacb022f1b64f4c5aeca) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Imagine Dial: remove unnecessary bindings for background sizeOliver Eftevaag2022-01-271-5/+0
| | | | | | | | | | | | | | | | | | It's unnecessary to explicitly set the width and height for the background, since it will get resized anyway in QQuickControlPrivate::resizeBackground(). The fillMode will already ensure that the NinePatchImage is scaled uniformly. This patch also fixes an issue with the QQuickDial not positioning the handle correctly with the Imagine style. Fixes: QTBUG-100089 Change-Id: Icc3716df6d83df78f526ef77cc60d007c2c38f12 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit dd55dc7e3d20d12af333731448346a58b5d0ba19) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickRenderControl ctor: fix style and let parent default to nullptrShawn Rutledge2022-01-271-1/+1
| | | | | | | | | Amends 8c0b1e06d9679676d12ff92db981198077eeda76 Change-Id: I82e0e10aece2870cc99144db6ba93a831919730e Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6de733f23feef5b5163f8fa6c0ade9016e59e7ef) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make qmltc-processed targets depend on qmltypes of linked QML modulesAndrei Golubev2022-01-261-0/+19
| | | | | | | | | | | | | | | Be safe in a multi-threaded build by making sure that all relevant qmltypes are available before we start to compile code with qmltc Unlike other tools, qmltc by design only cares about explicitly linked QML modules. Using non-explicitly-linked ones would typically result in C++ compilation errors as linker would be unable to find symbols Change-Id: I504c5c14fbba1f225d5904034f50fec99602c678 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 549fad86bc68ef948330eb28c96791dd1daadbd3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickFontDialogImpl: remove binding loopOliver Eftevaag2022-01-261-1/+1
| | | | | | | | | | | Replace a binding on 'height', with a binding on 'visible' instead. The end result should be the same anyways, since the binding on 'height' would either be implicitHeight or 0. Change-Id: I0362b88efa47347d0a2b05bce366947264e253cd Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 6cc966262de0f973e5a94bce339f7d6f64f069ff) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add qmltc to QtQuick's tools and utilitiesAndrei Golubev2022-01-261-0/+15
| | | | | | | | | | | | | This practically looks like the only place that is reachable with a random walk from the starting documentation page. Otherwise, the only option to discover qmltc docs is to know the 'qmltc' term and use it in the search, which is not exceptionally friendly Change-Id: I117aea19434c3ee19a053b5f1126abb1cd09310f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 64ec9d4468a50fd30618e2fd067ef4cd905c5290) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Adjust default max call depth for QNXUlf Hermann2022-01-262-3/+10
| | | | | | | | | | | QNX by default has smaller stacks than other platforms. Change-Id: Ia83d4e12c0fd24c51069777db2283d456c49800f Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io> (cherry picked from commit 7680fc7beed9c9f8e3883ac1796ef332cf40a4c8) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: State that you should type-annotate methodsUlf Hermann2022-01-251-7/+21
| | | | | | | Change-Id: I0c4d6e7d69e15d56e9af36a4fee11c40959946f2 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit c0179382063f3b408891edaa40b4def09546d64c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickTreeView: be able to expand rows that are not yet visible in the viewRichard Moe Gustavsen2022-01-241-6/+8
| | | | | | | | | | | | | | | | | | If the app expands a row in TreeView, that row will for a brief moment be expanded in the proxy model, but not in the view, until the view is polished. For that reason, when determining if a row can be expanded or not, we should check the state of the proxy model, and not the view. Note: if the application needs the state of the view to reflect the state of the proxy model immediataly after a call to expand, forcePolish() is always possible. Task-number: QTBUG-91374 Change-Id: I5b85e0b5c3b32d17f93409153041df3fc2437424 Reviewed-by: Andy Shaw <andy.shaw@qt.io> (cherry picked from commit a43912865e294f2014f03eb7073ecd9ecf387623) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlJS::Dom::PathIterator: fix relational operators in C++20 modeMarc Mutz2022-01-241-2/+2
| | | | | | | | | | | | | | | The missing const makes operator==(const X&) (aka op==(X&, const X&)) and its automatically reversed version (operator==(const X&, X&)) ambiguous. Ditto op!=. Fix by making them const. Change-Id: I8ea17f8d36984bd4f9eaa2f195df6b9408aba618 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 9585d6bcb709df83fbadca3fe0a970c47f88ce22) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Pass C++ sources to pre-created qml module targetsAlexandru Croitor2022-01-241-0/+3
| | | | | | | | | Previously they were silently discarded. Change-Id: I3ab4d050ea4649dec7e53f27c8044037bb49cddc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit 65e4c76b9fa128aa372e34a3e663950636d6cdb6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* CMake: Fix lookup of Python for qtdeclarativeAlexandru Croitor2022-01-241-7/+6
| | | | | | | | | | | | | | | | | | | Always use FindPython instead of find_program because the former looks for Python in more locations (like the Windows registry). We switch to FindPython instead of FindPythonInterp because the latter is deprecated, and the former is available in our minimum support CMake version (3.16). Because find_package is called in configure.cmake that is called by a function() call, we need to make the found interpreter a cache variable to make it available outside of the function. Fixes: QTBUG-99273 Change-Id: Idb6620a01b4b5764f130f9dc5780d73cd2151965 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e0eb75b2a0578f4ef401bb6eaa8c4f320ffa2078) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix Clang 10 -Werror,-Wdeprecated-enum-float-conversionMarc Mutz2022-01-243-3/+3
| | | | | | | | | | C++20 deprecated these. We don't seem to -Wno-error that warning, but the fix is simple, so I guess we don't have to. Change-Id: I3774295b0985369ab531e9f7a2a0c18983180554 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 2cc336bde4833b9ff99699f65ea30aabe6b7b41b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Handle ID lookups of incomplete types correctlyUlf Hermann2022-01-221-3/+3
| | | | | | | | | | | Incomplete types are generally stored in some wrapper type. We cannot just assign to the accumulator. Also, we already know whether we have an ID lookup there. No need to determine it again. Change-Id: I1f9fd9f147c44975df33fe862523987d8e711905 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3747c02fe64fbf5496dc540402dddadb1fa33c12) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use qt.qml.states logging category instead of STATECHANGE_DEBUG envShawn Rutledge2022-01-213-24/+19
| | | | | | | | | | | | | | | | | - It should not be a warning: it's for debugging. - It's nice to have the logging category instead of "default" in case you have %{category} in your QT_MESSAGE_PATTERN. - The env var didn't even have QT or QML in it. [ChangeLog][QtQml] The new qt.qml.states logging category is useful for debugging states and transitions. It replaces the STATECHANGE_DEBUG environment variable. Task-number: QTBUG-100117 Change-Id: If67e21488a66867645f3a395941fcc92d3ea7bbb Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 3fc68053db3acd9f7bef23d3aef1f7ac874e73dc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Add C++ name also for types with no export candidatesUlf Hermann2022-01-211-2/+6
| | | | | | | | | | | Even if the type is only exported in a newer version of the module, we still need to know about it in an earlier version, in order to resolve base types. Change-Id: Ibc7940308e3c4aaebf9871a159e1d85f43cd7693 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 24e5b9090b513861e77dcb17b8e4d75f0bdf8651) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlProperty: Prohibit ID lookup on explicitly given objectUlf Hermann2022-01-211-1/+2
| | | | | | | | | | | If an object is given, we should only use that object. Amends commit 21f15ede606df028479335c64c333db5fb1bb3f7. Task-number: QTBUG-100110 Change-Id: I51c0a44750c31984ba4937fb1cd2405dd93fcc19 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 44ca135c5a4d02ab29b57a3f15b84850aafb1cec) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use the deprecation macro for CustomCompileStepLaszlo Agocs2022-01-211-1/+6
| | | | | | | Change-Id: Ie0752cdec61373f75c312995de414ca96e0695c4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 3a46d09c544d445258b96413074cea335a3b18a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tooling: Add isList to ParameterMaximilian Goldstein2022-01-211-0/+1
| | | | | | | | | | | isList is a possible property of Parameters in qmltypes files and is used by QtCharts, for example. This adds it to our tooling module so qmltypes using it pass qmllint's tests. Change-Id: Ie25e8550ecc3fa84e0150cbf05df3631337f504d Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit 3d12c5a6cac27ebffe4b7e7c5e5e1d595c9e08a9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Respect revisionsUlf Hermann2022-01-2111-160/+253
| | | | | | | | | | | | | | | | | | | | | | | The only place where revisions matter is at the boundary between composite and non-composite types. The revision of the first composite type inherited from determines which members of all composite ancestors are available. Therefore, store the revision together with the base type and pass it through the imports to have it available. Then use it to check availability of methods and properties. The test exposes two further problems, which are fixed, too: 1. If no method is found to call, we need to generate an error in the type propagator. We don't know what the call will result in, after all, and the code generator should reject it. 2. We need to check the right scopes for hasOwnMethod(). Otherwise we might not find methods that are available. Fixes: QTBUG-99128 Change-Id: I4c320b8dfb490b140d7b8c16e6b638b32f156faa Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit e19d48d07310708e56cb379124dff193c1a7fa71)
* Further tighten checks around QML_COMPILE_HASHUlf Hermann2022-01-212-4/+12
| | | | | | | | | | Log the differing hashes in case of a mismatch. Task-number: QTBUG-99608 Change-Id: Id85306d3cfdb08d235c8717b441105c5d0b68cf3 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit ed6b31389ac554287b4e00a6ad743e6ebf72160f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* TabBar: allow wheel events to change currentIndexNoah Davis2022-01-212-0/+26
| | | | | | | | | | | | | Setting wheelEnabled to true allows wheel events to increment or decrement the currentIndex. We keep track of the total amount of angleDelta so that touchpads and high resolution mouse wheels don't change the currentIndex too rapidly. Fixes: QTBUG-99619 Change-Id: I9bda828338ee5136efcdd6abeca8e5be15da0822 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 2ead10bf55733defe58616de7fe2c28452d00c93) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickListView: Stop overlap for section and firstItem delegatesOliver Eftevaag2022-01-202-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: The first delegate after a section delegate would have the same position as the section delegate, if the section delegate is invisible during initialization. In case the section delegates become visible later on during program execution, the delegates would be re-positioned again in the QQuickListViewPrivate::layoutVisibleItems function. But this would not call setPosition for the first item (delegate). It would only call setPosition for all delegates after the first one. This would mean that the position for the first delegate would never be updated, after the delegate was first created. Solution: Call FxListItemSG::setPosition() for the first item in QQuickListViewPrivate::layoutVisibleItems, just like we're already doing for all the items after the first one in the for-loop. Fixes: QTBUG-94848 Change-Id: I34a5ada336ab507b31e3675a1c11eba066fa139a Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit 3aad05bc09f40d81df7748cbc246974230a3ca17) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document qmltc toolAndrei Golubev2022-01-199-0/+866
| | | | | | | | | | | | | | | Add initial qmltc tool documentation with introduction, compilation process picture, description and limitations To simplify the description, we can consider some simple application. The same app can additionally become a test scenario for qmltc and a showcase of its capabilities Task-number: QTBUG-84368 Change-Id: If6d586a8c68f48d17133b25170d0fff627e2066c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit de30f10aeb1ccf495cf39b3910e89d60f3dc591a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Inline the pre-checks for QQmlInterceptorMetaObject::interceptUlf Hermann2022-01-182-87/+100
| | | | | | | | | | | | | | In most cases we won't intercept. Calling a function just to figure out that there are no interceptors or that the call type doesn't match is expensive. Also, better encapsulate the class and initialize members inline where possible. Change-Id: Id545c98bc52690c75014b1283edb72a241750960 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 7b00dd860728fa078dac78359811b7c718d5e20f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* SequenceObject: Define length accessors on the prototypeUlf Hermann2022-01-181-76/+71
| | | | | | | | | Re-defining them for each single sequence object is quite expensive. Change-Id: Ia7a602aada6f9904dd3a72ad5788482576170d9e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 615406f09a89ef8e0ec820084e646fc911f1535a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Use QVariant as last fallback for type mergesUlf Hermann2022-01-181-1/+1
| | | | | | | | | | | | The two types are equivalent in what we can store in them. However, as var properties are considered to be QVariant, falling back to QVariant results in fewer type conversions when returning from binding functions. We rarely want to handle QJSValue explicitly. Change-Id: I0afed723e02982e28b33e35671224fd04689d09c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit cee66a1514156b0a8d656b8183638088fa152cc5) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Handle context push/pop in dead codeUlf Hermann2022-01-181-2/+28
| | | | | | | | | | Otherwise we end up with unmatched curly braces in the generated code. Change-Id: I4c24d4062a8ed54cd6a9ecb43dfd2b5d0a26c9e1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 6a54c6013d9037f5c75d47f5e03d6871591e53b2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Construct multi-part URIs with '.' rather than '/'Ulf Hermann2022-01-181-1/+1
| | | | | | | | | | | This is how URIs are defined and how we store them in our caches. Without this, we cannot find modules with multi-part URIs imported using -i. Change-Id: I86b02b2c2102a2d4edd8c20388c6cd9b1e92b0ff Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit b245faae89f3b76890a9b49a2a1a5ee4b1568d28) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QmlCompiler: Optimize pointer to bool conversionUlf Hermann2022-01-181-10/+13
| | | | | | | | | | We only need to compare with nullptr for that. So far it did a {to|from}ScriptValue. Change-Id: Ie09fd0e912a1e4ca695c7126b8cbf87a470d921c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit f489647323c0ffa1b04d4947825034371d9ad1a4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQmlJSScope: Remove dead codeUlf Hermann2022-01-183-30/+26
| | | | | | | | | | | The only type needed for resolving enums is builtin "int". The base type of a composite type is always identified by QML name. Trying to resolve it based on C++ names does nothing at best. Change-Id: I943e2bdac75b9258c5eafaaa8760993e61e59d99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 5431bacc8a1525d258cffd03dbb32bb7ed0b3b14) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* ShaderEffect: Make uniform setting saferLaszlo Agocs2022-01-171-39/+43
| | | | | | | | | | | | | | | | | | ...to better match the Qt 5 behavior. For example, trying to assign a Qt.point() to a vec3 works in Qt 5, setting the 3rd component to 0, because it just does a blind call to glUniform2fv. In Qt 6 this was not done initially, and the data copy is based on the value's size, so one either gets an assert in debug builds, and perhaps a crash or some strange behavior in the shader in release. Make this safer. The handling of QTransform->mat3 was broken as well, although it is unlikely anyone ever used that in practice. Fix it so that we properly map the 9 floats to the 4-float-per-column layout. Change-Id: Ia4a24bff0e54d94ddb2f5db276f0ed0a2cde0efd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> (cherry picked from commit c4f49a9e1f2c5a7819495f567f5ffe32d0eb468b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Port users of QMutableEventPoint::from() to new static settersMarc Mutz2022-01-164-29/+27
| | | | | | | | | | In QQuickItem, added an opportunistic std::move() as a drive-by. Task-number: QTBUG-99615 Change-Id: Ib9426ae7e749036541d5f97824800636b5ccfb5e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit f988168432068f04c0f9a0c485bc1c6584f0aa5e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Doc: Enable zero warning limit for documentationVenugopal Shivashankar2022-01-1610-0/+30
| | | | | | | | Fixes: QTBUG-98116 Change-Id: I3d0a2ede380fd60bbe9c4e2852c4da3b737180ec Reviewed-by: Topi Reiniö <topi.reinio@qt.io> (cherry picked from commit 37213acd75729a0945145864135709bddde88a85) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Re-allow retrieval of list properties in QQmlJSCodeGeneratorUlf Hermann2022-01-151-5/+0
| | | | | | | | | | It's not particularly slow. It probably was when we were using QQmlListReference or JavaScript arrays. Change-Id: I1a4575a5b84cdfb732a6c3615d00bbe2abaffc94 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> (cherry picked from commit bd0f4459ce31b6c5f232d60e7cdc3d9e0cb84ad7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmake: Find metatypes files infixed with build typeUlf Hermann2022-01-151-8/+27
| | | | | | | | | | | | | | | | | | There is no clear mapping between qmake and CMake build types. Therefore, apply a heuristic to find the best one for a given build. Conversely, if we have an infix build, the explicit infix is missing from the metatypes file names. Therefore, strip it in qmltypes.prf, too. Furthermore, remove the special case for building Qt modules with qmake. This is rather unlikely to work. Task-number: QTBUG-91706 Change-Id: I6f43225e94930fc960d51792b7b7b1a5db8de1e8 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 9ca66d7a4042bbd008b493cf82a6b5d69be26443) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickAbstractButton: fix crash on destructionUlf Hermann2022-01-142-0/+12
| | | | | | | | | | | If we listen for size changes we also need to remove the object listened to when it's deleted. Fixes: QTBUG-99644 Change-Id: I613855ebd986b1e67685088020b88d8b070659cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit 720ffaeb60d43123522066e1de3a69ad551644aa) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Dialogs: Declare dependency on QtQuick typesYuya Nishihara2022-01-142-0/+4
| | | | | | | | | | | | | | | Otherwise qmllint in user code would report missing types. No type found for property "nameFilters". This may be due to a missing import statement or incomplete qmltypes files. QuickTemplates2 has this dependency properly so it should be intact. Change-Id: I13fadddb053874cc615f071eec473d5641b12d1a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> (cherry picked from commit 07caa0109b8e1be942e9b47ac0ed80f3e68ef67a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QQuickFileDialog: fix deprecated implicit capture of this by [=] (C++20)Marc Mutz2022-01-131-1/+2
| | | | | | | | | | | | Since we can neither rely on the C++20 replacement, [=,this], nor use [&] here, name all variables explicitly. Amends a318e6f354c8c4c504c4da42737268bf9f1bae9c. Change-Id: Iecc8e9653b2e2f728b1dda7c34e48facc76ce835 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> (cherry picked from commit ce443cd2c3db71ac81416bda6ac61b2251ccc3ad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qqmljstypepropagator: Add compiler error for unknown function callsMaximilian Goldstein2022-01-131-0/+2
| | | | | | | | | | | Previously we would not generate an error when an unknown function was called. Change-Id: I31845a642afe0fd6038228c4aabf2ef5c6f1140e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> (cherry picked from commit fddd82345ae63f1769f5fc9e486cfdccea4d0124) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't rely on transitive include of qeventpoint_p.hMarc Mutz2022-01-136-2/+7
| | | | | | | | | | | It will be dropped from qevent_p.h. Task-number: QTBUG-99615 Change-Id: Id4eee3036a873f0e021b30a8d43b2c4df25dc53c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit bec4d008c22340b1913c1871ae57a4b9b675acad) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>