aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QML: Warn about variables being used before their declarationUlf Hermann2021-02-117-22/+71
| | | | | | | | | | | | | | | | | | This collides with injected signal parameters. qmlcachegen cannot tell those cases apart. [ChangeLog][QML][Important Behavior Changes] QML warns about JavaScript variables being used before their declaration now. This is almost always a mistake. It is particularly dangerous in the presence of injected signal parameters because qmlcachegen cannot identify a name collision between an injected signal parameter and a variable being used before its declaration. It therefore miscompiles such code. You can turn off the deprecation warning using the "qt.qml.compiler" logging category. Pick-to: 6.1 Task-number: QTBUG-89943 Change-Id: I8a9424ca8c6edd562402fe5c560ba7e8344b5585 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickWidget/Documentation: Mention the need to set the graphics APIFriedemann Kleint2021-02-111-3/+7
| | | | | | Pick-to: 6.0 Change-Id: I3b60586604003e360070a0d481e1a3df2e087e5c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* SoftwareImageNodes: Initialize member variableDavid Edmundson2021-02-111-1/+1
| | | | | | | | | | | m_pixelRatio is not set in the constructor It seems the method setDevicePixelRatio is always called, so there are no ill effects, but without setting it we still read uninitialized data creating warnings when used with a memory checker. Change-Id: Iadfe07600d027dddb98fdd755b4022b2b81547a8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* QHashedString(Ref): Use QStringView internallyFabian Kosmale2021-02-113-99/+28
| | | | | | | | | | | | | | | We cannot store a QStringView internally, as that would increase the size of our objects (QHashedString(Ref) does not support strings with sizes that do not fit into 32bit, thus it can store the hash and the size in one 64 bit block). What we can however do is to construct a QStringView on demand (which is cheap), and use its methods. The benefits are twofold: We get rid of some accidental complexity in qtdeclarative; and the code in QStringView is actually SIMD optimized. Change-Id: I2445a2d5a16b253f4971d7f3be0e1b274326eacb Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-111-2/+2
| | | | | Change-Id: I4543fd6e7e37c44f3dd97c202914708431e7a989 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-111-2/+2
| | | | | Change-Id: I897549d359b14ca65a560f7f0754b3a6342a4a81 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Enable tests of manually registered typesAlexey Edelev2021-02-102-9/+5
| | | | | | | | | Enable tests of 'qt_manual_moc' and manually registered types for cmake build Fixes: QTBUG-84906 Change-Id: I98b8902d4a2b70d4e1e218d8bfdedce25be1abc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* 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. Pick-to: 6.1 Change-Id: I5dec0a5a5e990f413ee65bf2eba2ea1087e0ea28 Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Restore String size assertFabian Kosmale2021-02-101-0/+2
| | | | | | | | | Just like all of the other datastructures in qv4compileddata, changing the size of String would require an inrcement of QV4_DATA_STRUCTURE_VERSION. Change-Id: I462d04204255946d309d245bc20b044ba9d222d7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QV4::Lookup: update comment about gc assumptionFabian Kosmale2021-02-101-0/+1
| | | | | Change-Id: I13304631a9870874fb130cd9e6598065fc952a71 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlPropertyPrivate: Remove documentation about flags parameterFabian Kosmale2021-02-101-3/+0
| | | | | | | The parameter is gone since 3bc239a0f16fb93f84def55a5980ef8561e7a7b4 Change-Id: Iae411b61f27efd60b489dbc219ef0ad07ad19938 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use QQmlBinding::Ptr typedefFabian Kosmale2021-02-101-7/+7
| | | | | | | | | | Instead of spelling out QExplicitlySharedDataPointer<QQmlBinding>. That is consistent with all other code, and makes grepping for binding pointers easiers, as they now all end with Binding::Ptr. Change-Id: I19018732a699368200f129cecf869ece1c8b1a7f Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix QJSValue string parameters used in signalsMaximilian Goldstein2021-02-103-1/+33
| | | | | | | Pick-to: 6.1 6.0 5.15 Fixes: QTBUG-86482 Change-Id: If938fad22f51b08fe3cb20b94634efe46a1eed47 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-101-2/+2
| | | | | Change-Id: I7be2664bc75037d4575d2df7d0cd56c775512562 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Support and prefer QML_IMPORT_PATH over QML2_IMPORT_PATHUlf Hermann2021-02-106-41/+54
| | | | | | | | | | The 2 is meaningless. Task-number: QTBUG-85064 Change-Id: I9f140155d274c691b5eab1285d9b7153f9f93a87 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-101-2/+2
| | | | | Change-Id: Icbbddf19c5302196a56f5920de41ef0a2cec23b2 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-091-2/+2
| | | | | Change-Id: I83c4e4060be7ba21c6913a56fd9c5abb30527a29 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Use QLibraryInfo::QmlImportsPath rather than Qml2ImportsPathUlf Hermann2021-02-0910-17/+17
| | | | | | | | | The "2" is meaningless and there is a better name available now. Task-number: QTBUG-85064 Change-Id: I65d26b06712ed7dcf2825f16dffaa6060dd86985 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* 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 Pick-to: 6.0 6.1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Update type registration flowchartUlf Hermann2021-02-093-0/+3
| | | | | | | | | You're not supposed to call the registration functions manually. Pick-to: 6.1 Fixes: QTBUG-90718 Change-Id: I829800132484dea670657ed1679357fe58d0ddf9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Reimplement Math.hypot() using QHypotHelperEdward Welbourne2021-02-091-21/+6
| | | | | | | | As part of adding qHypot() in qtbase, we now have a robust efficient implementation of arbitrarily-many-parameter hypot(), so reuse it. Change-Id: Iafd0eee84f3271c37003431a5f2b1a62d7ef6f86 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-091-2/+2
| | | | | Change-Id: Ia705027476ce825945586437f913b64b0e65e459 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* qqmlengine: Fix some warnings not being displayed correctlyMaximilian Goldstein2021-02-091-8/+8
| | | | | | | | Use noquote() for qqmlengine warnings. Fixes: QTBUG-86595 Change-Id: Ibe161cb164b9fa2511e4bc02237de5d81172e114 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-091-2/+2
| | | | | Change-Id: I5caea7656f965663c090aa2292bc0c09826833dc 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
| | | | | | | Pick-to: 6.0 6.1 Fixes: QTBUG-90038 Change-Id: Ic01b5d097e0b9e6720bcec7ccb18c22abb5418f4 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-081-2/+2
| | | | | Change-Id: Id68a6e4c85e0ba6d80ebb13c53a1a6ed74c84b63 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* QQmlInterceptorMetaObject::intercept: Avoid metatype<->id ping-pongFabian Kosmale2021-02-081-4/+3
| | | | | | | | | | There is no need to extract the metatype id to know whether the type is valid (aka != UnknownType). Moreover, as we already have a metatype, there is no need to do the typeid -> metatype lookup. Task-number: QTBUG-88766 Change-Id: I5f9512aa6e06b0d89be8d3cad970f12319dab156 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmlplugindump: Fix overload ambiguityMaximilian Goldstein2021-02-081-5/+6
| | | | | | | Fixes: QTBUG-89955 Pick-to: 6.1 6.0 5.15 Change-Id: I89ce8a146c0ce07c8e308783f79677575458c71c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qjsengine: Clarify to/fromScriptValue documentationMaximilian Goldstein2021-02-081-0/+2
| | | | | | Fixes: QTBUG-89956 Change-Id: I96439433b1f172e933c6c56daae639be7e18b931 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* 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. Pick-to: 6.0 6.1 Change-Id: I40058ada6a6a5eb745ae559e8c9ed474fd41f75c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Update dependencies on 'dev' in qt/qtdeclarativeQt Submodule Update Bot2021-02-081-2/+2
| | | | | Change-Id: I19330ec04d0b29656a05a5995ffb70361df226e2 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. Pick-to: 6.1 6.0 5.15 Task-number: QTBUG-41867 Change-Id: I016d2d76f4ebf731f5bfc931ba616ee5d074bc65 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* 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. Pick-to: 5.15 6.0 6.1 Change-Id: Ic937a6d7aea65368cceb1405bb81ef1502d988a5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add "we mean it" warning to private headersVolker Hilsheimer2021-02-054-0/+44
| | | | | | | Fix warning from configure step. Change-Id: I5afeeeeabf1cb22149e1df3cecb27c6cf4a0567f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* qqmlproxymetaobject: Support invoking methods and slotsMaximilian Goldstein2021-02-055-31/+63
| | | | | | | Previously this just failed silently and returned garbage data. Change-Id: Ia8b72836aa0ccfd50fd18b0f813c2bf3a00801c5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Use a QDoubleEndedList for the children of animation group jobsUlf Hermann2021-02-0516-146/+408
| | | | | | | | | | This way it's fundamentally impossible to add the same animation job to two different group jobs. The pointers are not exposed anymore and no one can re-order the jobs. Task-number: QTBUG-90401 Change-Id: Iebff4b64960c853915dd32714acd144fc5cdc00d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* 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 Pick-to: 6.1 6.0 5.15 5.12 Change-Id: Ibd0ad21e8d3af4760604c3ff37dc46101d5f49ad Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix link error to Qt CreatorNico Vertriest2021-02-051-1/+1
| | | | | | | | Link to Exporting from Design Tools Task-number: QTBUG-90439 Change-Id: I4c0b6bc899a48bb2aa2c4ad083e8b2ee9f9a41ce Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* tst_qquickdesignersupport: blacklist tests that segfault on QEMUSamuli Piippo2021-02-051-0/+7
| | | | | | | Pick-to: 6.1 Task-number: QTBUG-90869 Change-Id: I70abb1baa2b919880bc711ee00d5fdbaef69301d Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* 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. Pick-to: 6.1 Task-number: QTBUG-63185 Change-Id: I293e9b32078bf2567fbb9773cedf6777ad182a69 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Invalidate external renderpass descriptors from Quick3DLaszlo Agocs2021-02-053-0/+19
| | | | | | Pick-to: 6.1 6.0 Change-Id: I362b35b3d038d4fb24fab0e73cb120027f2308ea Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* fix a commentJiDe Zhang2021-02-051-1/+1
| | | | | | | | | | There is no the QQuickWindow::setBackend() function, only QQuickWindow::setSceneGraphBackend() and QSGContext::setBackend() are available, assume it is the public one. Change-Id: If5c4650d96919715abce92aec30f474518139ce6 Reviewed-by: Liang Qi <liang.qi@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* qquicktextinput: ensure we update IM when cursor changes positionRichard Moe Gustavsen2021-02-041-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Normally the cursor will change position inside a text input after receiving a touch or a keypress event. But it can also change position by sending it a QInputMethodEvent. But as it stood, we would in that case not inform the platform input context about it, which meant that the IM state in QQuickTextInput would be different from the IM state in QPA. A bug on iOS could be seen from this when dragging the cursor around using the magnifier glass. In that case QIOSTextResponder would move the cursor in QQuickTextInput using QInputMethodEvents. But since this would not be forwarded back to UITextInput, the result would be that if you e.g pushed backspace on the input panel, you would delete the character at the position the cursor had before the drag. This patch will ensure that we update platform IM state whenever the cursor changes position from QInputMethodEvents. Pick-to: 6.0 5.15 Fixes: QTBUG-72757 Change-Id: Ic39c60fbce982f80d014befddbb2d4439ddeea4f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* 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. Pick-to: 6.1 Change-Id: I687718ae9b4fabbf6456597a475507d2ec1a1f45 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Qt.labs.folderlistmodel: Register old versions declarativelyMaximilian Goldstein2021-02-042-14/+2
| | | | | | | Register old versions declaratively so the plugin can be truly optional. Change-Id: I0f5774d90788208dfce7928a45a904fc6595faa1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Import property benchmarks from private repoMaximilian Goldstein2021-02-048-0/+361
| | | | | Change-Id: If45bf9bfcfee127263a2c0e49cfa55e12f9a6d0f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtQuick.Shapes: Make plugin optionalMaximilian Goldstein2021-02-044-9/+15
| | | | | | | | Mark plugin as optional and move out initialization code as to allow use with the QML compiler. Change-Id: I4c93168ebd42b6625fbf4c045beac4dcf41aafa6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* qmllint: Fix segmentation faultMaximilian Goldstein2021-02-034-1/+23
| | | | | | Pick-to: 6.0 Change-Id: Ie04ad4221b25628687c2575facf90488b83d21bf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQuickListView: Add autotest so that animated delegate does not crashJan Arve Sæther2021-02-033-0/+60
| | | | | | | | | | This is separate from the fix, since the test is supposed to also be merged into dev. (Where the fix was not needed) Task-number: QTBUG-86567 Pick-to: 5.15 Change-Id: I2cf1a4b11eed4fe356588aeff322d3a432f0fe83 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix compiler warning, QJsonArray does not return referencesVolker Hilsheimer2021-02-031-6/+6
| | | | | | | | | Clang warning on macOS: warning: loop variable 'classInfo' is always a copy because the range of type 'const QJsonArray' does not return a reference [-Wrange-loop-analysis] Change-Id: I7657d85fe44b5e106ead6d26d4481256e7ccfc71 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>