aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update dependencies on '6.1' in qt/qtdeclarativev6.1.0-alpha1Qt Submodule Update Bot2021-02-121-2/+2
| | | | | Change-Id: I099a7ec091133eadf297b643405c33a367acfd03 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-111-2/+2
| | | | | Change-Id: I5d4450618f0560e66ffb4a293184bc8ba62bb5fc Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qmlformat: Use a struct to hold the command line optionsFurkan Uzumcu2021-02-101-80/+112
| | | | | | | | | | | | | | | | Keeping the parser and the code that uses the command line options in the same function increases the number of lines for the same function, making it harder to read, and the number of arguments for parseFile function, makes it harder to understand and maintain. This commit adds an `Options` struct to hold on to the command line options and a build function to create the `Options` object. Change-Id: I5dec0a5a5e990f413ee65bf2eba2ea1087e0ea28 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 1c35c8f71eb6863498548c6724f82be01d872b33) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Fix QJSValue string parameters used in signalsMaximilian Goldstein2021-02-103-1/+33
| | | | | | | | Fixes: QTBUG-86482 Change-Id: If938fad22f51b08fe3cb20b94634efe46a1eed47 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit e887f25dd6c4c9630a7367c3a2ed95a284191843) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-101-2/+2
| | | | | Change-Id: I4da607ae33bc57003608a96e69e3acc6ef2cd233 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-101-2/+2
| | | | | Change-Id: Ia5acd50b6ed827c75ec0ed0d49524604515b056f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Make tst_qmldiskcache::regenerateAfterChange() pass on big endian systemsDmitry Shachnev2021-02-091-3/+2
| | | | | | | | | | | | | | We cannot use reinterpret_cast here, because testUnit->constants() returns a pointer to quint64_le data, which needs to be converted to native endianness first. Here I used the QV4::Value converter that accepts quint64, so this conversion now happens implicitly. Change-Id: Iff6e3e4554af8890e61cb06e6fd79339c7a14653 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit dab0d62b655ce9a476993de2558a573a5066288c) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-091-2/+2
| | | | | Change-Id: I2185bd43dcc23e5fe63741bb9ec2b8a257ff0934 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Update type registration flowchartUlf Hermann2021-02-093-0/+3
| | | | | | | | | | You're not supposed to call the registration functions manually. Fixes: QTBUG-90718 Change-Id: I829800132484dea670657ed1679357fe58d0ddf9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 707f7603fbb6bce60ed532cd42ff2dc9ae39e611) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-091-2/+2
| | | | | Change-Id: I1a5794aec93ecbb9e522c761c06617ba6e7a09c6 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Return errors if validation of inline components failsUlf Hermann2021-02-082-1/+20
| | | | | | | | Fixes: QTBUG-90038 Change-Id: Ic01b5d097e0b9e6720bcec7ccb18c22abb5418f4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 001596d472557bca08eb93159e724301dea88ad6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qmlplugindump: Fix overload ambiguityMaximilian Goldstein2021-02-081-5/+6
| | | | | | | | Fixes: QTBUG-89955 Change-Id: I89ce8a146c0ce07c8e308783f79677575458c71c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 40eaa9509b1c2e430b7617e1b42aa66214ad80df) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* QSGBatchRender: avoid crash if buffer shrinksFabian Kosmale2021-02-081-2/+2
| | | | | | | | | | | | | The QRhiBuffer does not shrink; thus we can end up with buffer->buf->size > buffer->size. This would subsequently lead to an out-of-bounds memory access, and a crash. Fix this by using the uploadStaticBuffer overload which takes the size. As a drive-by, remove pointless QByteArray::fromRawData call. Change-Id: I40058ada6a6a5eb745ae559e8c9ed474fd41f75c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit f0a51eef5696782ec325b20f14cfe353d0a58d20) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-081-2/+2
| | | | | Change-Id: I87ebeb16a3f15e745ed82172d493b76e577900d8 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Do less work when there are no active ImageParticle particlesMichael Brasser2021-02-063-8/+29
| | | | | | | | | | | Don't mark geometry and material as dirty if there is nothing to change. Task-number: QTBUG-41867 Change-Id: I016d2d76f4ebf731f5bfc931ba616ee5d074bc65 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> (cherry picked from commit e3cb305a6a19bf394c1068a7e483e1c95e11c22b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-061-2/+2
| | | | | Change-Id: I6ca89bd2d0091de0ab47fa3112f6ee7cdb45ff7d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-061-2/+2
| | | | | Change-Id: I3f05d616ba0f0e2970acf1486646a0c2e14aef21 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QQuickItemParticle give() method kill particleFabio Falsini2021-02-053-1/+7
| | | | | | | | | | | | | | | Currently removing an item connected to a particle only invalidate the particle that will be reused for the next item set. This has the effect that the new item inserted appears in the same position as the old one just removed. This patch force killing the particle to assign next item to a new particle starting from initial position. Change-Id: Ic937a6d7aea65368cceb1405bb81ef1502d988a5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d0b1bef8b889ab852eaf906fdc9cd4219238872e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-051-2/+2
| | | | | Change-Id: I0f3e8ebb6d3462a3a9a6fac1d4e4b20e44ae281a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QSequentialAnimationGroupJob: Protect against self-deletionUlf Hermann2021-02-053-10/+50
| | | | | | | | | | | | setCurrentAnimation() can indirectly delete the animation group job itself by invoking the animation controller. Use the RETURN_IF_DELETED mechanism to avoid the resulting dangling pointers. Task-number: QTBUG-90401 Change-Id: Ibd0ad21e8d3af4760604c3ff37dc46101d5f49ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> (cherry picked from commit 680f28b08f65ad38c8d5498b5738231b2a2779a3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qquickitemlayer: skip tests when running on offscreen platformSamuli Piippo2021-02-051-12/+40
| | | | | | | | | | More tests fail on offscreen platform when tested on QEMU on CI. Task-number: QTBUG-63185 Change-Id: I293e9b32078bf2567fbb9773cedf6777ad182a69 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 34477bdbb00b351fe254fc42155e876d06b0c994) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* tst_qquickdesignersupport: blacklist tests that segfault on QEMUSamuli Piippo2021-02-051-0/+7
| | | | | | | | Task-number: QTBUG-90869 Change-Id: I70abb1baa2b919880bc711ee00d5fdbaef69301d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> (cherry picked from commit 1e8cb40d24402c9d0b6290cc251244ba0ec882d4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-051-2/+2
| | | | | Change-Id: I14cba90924c274d22d6c0261a8005024eb6ff5af Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Invalidate external renderpass descriptors from Quick3DLaszlo Agocs2021-02-053-0/+19
| | | | | | | Change-Id: I362b35b3d038d4fb24fab0e73cb120027f2308ea Reviewed-by: Andy Nichols <andy.nichols@qt.io> (cherry picked from commit 93fe74ca433850e505f8f8940e99f3bf6a6dc050) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Don't hide the inputMethod when finishing the editAndy Shaw2021-02-041-2/+0
| | | | | | | | | | | | | | There is no reason to hide the inputMethod explicitly when finishing the editing. This will be taken care of for us by the platform plugin and will account for a situation where Qt Quick Controls 2 will check if the item had focus when it is in an popup being closed at this point too. Change-Id: I687718ae9b4fabbf6456597a475507d2ec1a1f45 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> (cherry picked from commit 6da66ff611902d8c4d485568d746f49c69f1330f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update dependencies on '6.1' in qt/qtdeclarativeQt Submodule Update Bot2021-02-041-2/+2
| | | | | Change-Id: I6733cc40d2726b751bac5d90932fa7c05754013b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QQmlIRLoader: Actually load RequiredPropertyExtraDataFabian Kosmale2021-02-033-0/+24
| | | | | | | | | | | | | | | If a QML component wants to mark properties of its "parent" component as required, it can do so via required propertyName The information about those properties is stored in a RequiredPropertyExtraData data structure. This structure is already serialized to disk in the QQmlIRWriter. However, we neglected to restore it so far in the loader. Fixes: QTBUG-90538 Pick-to: 5.15 6.0 Change-Id: I789daff9bc881e4f35c942c77f5116b5284de81b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmltyperegistrar: Fix handling of default propertiesUlf Hermann2021-02-023-26/+120
| | | | | | | | | Default properties are always local. There is no way to declare a default property for a foreign type as the default property is queried directly from the classinfo at runtime. Change-Id: I30efb6fba190957ac2a4ad86da437f209cd1f3ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove superfluous include directiveFriedemann Kleint2021-02-021-1/+0
| | | | | | | | | | | It is not conforming to the include conventions (module missing) and thus breaks the Qt for Python doc build. Introduced by 48b4c1f450109b148f03f62574d78b460859c4a1. Pick-to: 6.0 Change-Id: I1ff56a967c457f1909b7f6e2e430458e3a3f47c9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make the internals of QQuickAnimatorController privateUlf Hermann2021-02-022-1/+6
| | | | | | | | | | No one should mess with those. All the pointers have complicated ownership semantics. We can just befriend the test instead of making it all public. Task-number: QTBUG-90401 Change-Id: I6c4adbab7046b40db7f4628780ef928445ea3eb2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix Math.round edge-caseAllan Sandfeld Jensen2021-02-021-3/+6
| | | | | | | | | Round 0.49999999999999994 correctly Task-number: QTBUG-90444 Change-Id: I0e8a19fb52540c6e976308089a782f1f472bc77f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add 'MANUAL_MOC_JSON_FILES' support by 'qt6_qml_type_registration'Alexey Edelev2021-02-021-1/+6
| | | | | | | | | | | Pass the 'qt6_qml_type_registration' function's 'MANUAL_MOC_JSON_FILES' argument to 'qt6_extract_metatypes', if specified. Align the 'qmltyperegistrar' test to modifications in the 'qt_manual_moc' and 'qt6_qml_type_registration' functions. Task-number: QTBUG-84906 Change-Id: I6b23526e1cc4633f55536871cbb7bc6d891f1dea Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove obsolete folders in qmlcompilerDavid Skoland2021-02-022-2/+0
| | | | | | | | | | These were only present because qmake wanted them, but since qmake is no longer supported in dev, these can be removed. Folders: QtBootstrap and QtQmlDevTools Change-Id: I0426b43590eb90f97453429a5d5baac035a7d3c4 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* qmltyperegistrar: Do not add extensions to local anonymous typesUlf Hermann2021-02-022-10/+3
| | | | | | | | | If we generate a local anonymous type, then that's the local part of a QML_FOREIGN local/foreign couple. Any QML.Extended in there belong to the foreign type. Change-Id: Ic1706045eff03dd7b1b553240596ffc21818c8bd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* quickwidgets: fix build with -no-feature-messageboxNick Shaforostov2021-02-011-1/+3
| | | | | Change-Id: I51fb3064f12a0740434091ba696924090deaf839 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-011-2/+2
| | | | | Change-Id: I81ac79e033e5a5c2024363ef33659226571f7b8a Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Doc: Fix documentation warnings for Qt QuickTopi Reinio2021-02-014-20/+16
| | | | | | | | | | | - Source code for several QML modules has moved, adjust documentation configuration accordingly. - Comment out \instantiates commands referring to internal/undocumented classes. Task-number: QTBUG-90439 Change-Id: I360c8a5c02c5a03b84c77010f399d1a0e36b1263 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
* QuickTest: Do not recurse forever on inline components in enumerateTestCasesFabian Kosmale2021-02-016-1/+132
| | | | | | | | | | | | | | | | | | | | In TestCaseCollector::enumerateTestCases, we visit the super compilation unit of QML tpyes to check if they might be instances of TestCase. However, in the case of inline components, the super unit is the current compilation unit, and we would recurse endlessly. This does not address the issue that an inline component might actually inherit TestCase. However, as this only affects the enumeration output and does not actually affect test execution, this is not that much of an issue. It should also be noted that the enumeration also fails in any case where TestCases are loaded dynamically (with a loader), so the method is not 100% accurate even in the absence of inline components. Fixes: QTBUG-90740 Task-number: QTBUG-90762 Pick-to: 5.15 6.0 Change-Id: I7e133d62c4f62fc46e9bd3999ff755f7ded3c386 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlCompiler: Allow for multiple extensions per objectUlf Hermann2021-02-0113-59/+227
| | | | | | | | | | | | | | | | | | | Previously, the assumption was that each object could only have a single extension object. As proven by the new qqmllanguage test this is not the case. Each registered object in the type hierarchy can have its own extension. Therefore, adjust the algorithms that generate qmltypes and iterate the extension objects when analyzing them. This leads us to the realization that anonymous types can in fact meaningfully carry extensions and implement interfaces. Adapt qmltyperegistrar accordingly. For the test to compile, however, we need to realize that the class declaring interfaces needs to befriend all potential subclass's QmlInterface structs. Fix that, too. The rabbit hole went deep. Change-Id: Ia451897e927e03b95c3062e829edf1dfcd216613 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Prefer qHypot() over sqrt(a sum of squares)Edward Welbourne2021-02-012-1/+2
| | | | | | | | | It's apt to be more accurate and may even be optimised. Comment on a benchmark where we could use Math.hypot(), but that would break comparison with Qt 5 results. Change-Id: I7c37dd3df82fdef18e7ebb0e1548198afd256faa Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Drop JavaScript root object members from builtins.qmltypesUlf Hermann2021-02-011-1593/+7
| | | | | | | | | | | | | | | | | | Those are not actually accessible from C++, and the description we had was incomplete and misleading. There was no way to know that the "Math" type, for example, was the type of a member of the global object called "Math", but the "float" type was not. Furthermore the types given for parameters and return values were only approximations. JavaScript's type coercion allows us to use a number of other types, too. There certainly is a place for a proper description of the global object, but such a description should be generated from the actual JavaScript root object as found in an actual QJSEngine. Furthermore, we do need better syntax to describe it. Change-Id: Ia573436df04ca967381e1e13dbd42a70bcc60979 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use QDateTime as internal name for the builtin date typeUlf Hermann2021-02-011-17/+21
| | | | | | | | | | | | | | | | | | | | | The internal name serves as hint to the C++ class. This is the same as the internal name of url, for example. The internal name is not exposed to QML. So, from a language perspective, we can choose any name there. All the JavaScript methods of the Date prototype are not actually available on QDateTime. Due to the magic conversions the QML engine does in the background, much of them work in practice. Yet, when generating C++ code, we would need another conversion step to make them available. In order to express part of this, we introduce a second type for the JavaScript Date object. In the future we might link them via some "converts to" property. Then tools could know that creating a QJSManagedValue from a QDateTime (or QUrl etc) results in a richer API with additional methods. Change-Id: I13f66a37d985dbd3581d8bb84937adbbc31286fd Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Drop widgets dependency from quicktestUlf Hermann2021-02-012-37/+2
| | | | | | | | | | | | | It was introduced for QtQuick.Controls 1 back when it was still called QtDesktopComponents. QtQuick.Controls 1 is deprecated and also doesn't use the widgets mode anymore. I can't think of any other use for it, but loading QtWidgets produces a number of unwelcome side effects in the tests. Change-Id: I4b7e53a9b906c428d84926302bf629b826d900c4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix cmake dependencies around qmltypes filesUlf Hermann2021-02-011-1/+8
| | | | | | | | | | | | qmltypes files are generated by qmltyperegistrar, and conditionally consumed by qmlcachegen. In turn, the C++ files generated by qmlcachegen must not declare any moc'able constructs as that would be a circular dependency via the metatypes.json files. Codify this condition as a SKIP_AUTOGEN property on the generated C++ files. Change-Id: Ied2ca6ad202dd20039bca9823ef1de4fffcf64d5 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* tst_qqmlecmascript: Adjust to QObjectCompatProperty change in qtbaseFabian Kosmale2021-02-011-2/+2
| | | | | | | Fixes: QTBUG-90786 Change-Id: Id05afbeb18b7c30246a29b95673a1319649f389f Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-011-2/+2
| | | | | Change-Id: Iaa526f4399a77d07e93a3fb7035334460ac1f5f0 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Move implementation of functions declared in qqml.h into qqml.cppUlf Hermann2021-01-292-74/+76
| | | | | | | | It makes no sense to have them qqmlengine.cpp. Change-Id: I138807c7650ec7aef4c6e8833e8bac8a6f179d1c Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* QmlCompiler: Generate AOT functions in same order as interpreted onesUlf Hermann2021-01-291-34/+71
| | | | | | | | Otherwise various internal indices may be off, in particular the internal classes. Change-Id: I3c2a6b8150590fc41ec55bf2dfbc989078ddce42 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML value types: Properly apply the QML_EXTENDED trick everywhereUlf Hermann2021-01-291-0/+5
| | | | | | | Without this, the properties of those types are invisible to tooling. Change-Id: Iffd05643a650d03993d9fe1a3783fe3db8c33f0b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QmlCompiler: Retain anonymous types in qmlnamesUlf Hermann2021-01-291-0/+7
| | | | | | | | | Prefix them with $anonymous$ so that we cannot accidentally find them. If we don't keep them, they may be deleted when their last strong reference goes out of scope. Change-Id: I24ca795f9d9c4ecea074019db41a3ca0618f8e81 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>