summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Do not use deprecated QtFuture::makeReadyFuture()Ivan Solovev2023-04-111-3/+3
| | | | | | Task-number: QTBUG-109677 Change-Id: I09d78b3479978878fc98aca6bbc6e1316001a912 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Improve backward supportAllan Sandfeld Jensen2023-02-142-0/+26
| | | | | | | Do both variant conversions and qjsonvalue conversions. Change-Id: I655395aa64c83ef62e8062d0820fdff437ebb156 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add server-side support for custom convertersArno Rehn2023-02-092-0/+52
| | | | | | | | | Automatically tries to convert server-side values to/from QJsonValue. Carries on as usual when the conversion fails. Fixes: QTBUG-92902 Change-Id: I89ae7c3bc8490223c9fab41ca513d9277483692e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix project structure and auto registryMichal Klocek2023-02-035-29/+8
| | | | | | | | | | | | | | | | | | | Create QtWebChannelQuick and move the required sources, so auto registry works and qml types files and friends are auto generated. This makes things inline what other modules do. This change has a side effect as qqmlwebchannel.h will change its module, however this is semi-pulibc header, hopefully only used by QtWebEngine. [ChangeLog] Created new QtWebChannelQuick which holds qml sources. Task-number: QTBUG-110795 Fixes: QTBUG-99959 Change-Id: Ic8aa72f070d6a9e23d918a1210f4df62df739397 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* tst_webchannel: port from raw and shared pointers to unique_ptrMarc Mutz2022-12-251-12/+14
| | | | | | | | | | | | | | Avoids the need for qDeleteAll() in the case of raw pointers. Avoids overhead for non-shared objects in the shared pointer case. Since unique_ptr is a move-only type, use a container (std::vector) and loop constuct (ranged for loop) that can handle it. This removes the only use of QSharedPointer in this module. Change-Id: Ic3fe90403eb3f28f1e2e370a3648bc522880a10d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Add wrappers to optionally convert incoming dataØystein Heskestad2022-11-111-1/+58
| | | | | | | | | | | | | | | | | Wrappers can be added as a third argument to WebChannel constructors or by explicitly calling addConverter. They can be added by supplying their name or by supplying a function. If the function is not applicable it must return undefined to proceed to to the next wrapper. Data is transmitted as JSON when sent over the WebChannel. Because JSON does not have a date, type QDateTime objects are sent as ISO 8601 text strings. The "Date" converter converts such strings to ECMAScript Date objects. Fixes: QTBUG-98490 Change-Id: I83bb7476b50838359db5b981f500871142fa41f0 Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-3/+3
| | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: I34d5ddf6742eda92ae291d2fd0ced98fcee92b7b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* tst_webchannel: Make conversion tests data drivenArno Rehn2022-09-052-70/+58
| | | | | Change-Id: Ifb160804b9f0d6c908c894e14fcd6a9a025a8b83 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Purge remaining usage of Q_NULLPTRJohannes Kauffmann2022-08-293-5/+5
| | | | | | | | | As a drive-by, also removed some usage of "0" for a null pointer constant. Change-Id: I4d2566d620bffa79ad953a14ad7aba96bfb3e935 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-235-5/+5
| | | | | | | Task-number: QTBUG-105718 Change-Id: I99e928ef0cb271ef28692d0936230ecf0fd08392 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-282-4/+4
| | | | | Change-Id: I5e2551c5572bbb6063290d5c6d0b143cf3cff50e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-075-0/+15
| | | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I28932fdec21ec9cd2ad33d0ecd7baa7c1e5dcd36 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-1014-381/+31
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: Id704376bd7d5a127ad3e9bf09f9abedcf2b0f498 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Move qml test data to correct locationAssam Boudjelthia2022-05-186-1/+1
| | | | | | | | | | | | | The qml test data in CMakeLists.txt is expected to be under data folder but the qml files are put directly under the test project root dir and thus they're not packaged. Pick-to: 6.2 6.3 Task-number: QTBUG-88846 Change-Id: Ib9eb022d95c193aafc3718902e1aed9dd8d743f8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Revert "Blacklist: test cases blacklisted in qml:"Pasi Petäjäjärvi2022-04-011-13/+0
| | | | | | | | | | This reverts commit 93c9222095f8582059cffef0c0d025c4b5ab118b. Reason for revert: Fixed in aec6b0075863bff181d1d3dfdf1399264de01f67 Task-number: QTBUG-101521 Change-Id: I74a6ccc6b6520d704fbf02f0f1735f3b28b6fe15 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* Remove .prev_CMakeLists.txtKai Köhne2022-03-224-73/+0
| | | | | | Pick-to: 6.3 Change-Id: I78d6a6b2d245743f1cce18955ed3fc05a054f9fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Blacklist: test cases blacklisted in qml:CI Insignificant Platforms Monitor Bot2022-03-071-0/+13
| | | | | | | | | | | | | - tst_multiclient::compile on qnx - tst_bench::compile on qnx - tst_webchannel::compile on qnx - tst_webchannelseparation::compile on qnx Pick-to: 6.2 Pick-to: 6.3 Task-number: QTBUG-101521 Change-Id: Ic2c81a883140f79d4e6fdb2c55e13788cef1cd74 Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
* Re-enable cmake build test for qtwebchannelJuha Vuolle2022-01-112-14/+35
| | | | | | | Task-number: QTBUG-92967 Pick-to: 6.2 6.3 Change-Id: Ie104331b7dd375fae3b448de7767550ffb9f4c29 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Include <QProperty> explicitlyMarc Mutz2021-11-082-0/+2
| | | | | | | | Don't rely on the transitive include of qproperty.h by qobject.h. Pick-to: 6.2 Change-Id: I180394ed09dae1bd3106171c17dbe035f6328806 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Transparently handle QFuture<T> method return typesArno Rehn2021-09-273-0/+140
| | | | | | | | | | | | | When a client invokes a method returning a QFuture<T>, QWebChannel will now automatically attach a continuation and send the contained result after the QFuture<T> has finished. [ChangeLog] Transparently handle QFuture<T> method return types Task-number: QTBUG-92903 Change-Id: I4069d51e79447dee249bb8af52a16e4496484093 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* CMake: Bump almost all cmake_minimum_required calls to 3.16Alexandru Croitor2021-09-221-1/+1
| | | | | | | | | | | | | Needed for subsequent change that will check and error out if the version is lower than 3.16. We do that to ensure all policies introduced by CMake up to version 3.16 have their behavior set to NEW. Pick-to: 6.2 Task-number: QTBUG-95018 Change-Id: I4596b919217fd77f293f882dd81927121c221707 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Fix QML files in tests and examplesBalazs Egedi2021-09-095-20/+20
| | | | | | | | | | | | - Removed the import versions - Changed the implicitly defined properties in Connections - Ported qmls to Qt6 - Dialog icon support is incomplete, so no icon in Dialog for now Pick-to: 6.2 Pick-to: 6.2.0 Change-Id: I2dab3a0e715d447004aa408476bcfd638599b012 Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Remove outdated qmake pro-filesØystein Heskestad2021-07-195-68/+0
| | | | | | Task-number: QTBUG-95167 Change-Id: I199e41cd2bd582b3f4d47b6d516fa2f506f93855 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Make blockUpdates bindableØystein Heskestad2021-05-202-16/+34
| | | | | | | | [ChangeLog] Make blockUpdates bindable Task-number: QTBUG-93601 Change-Id: I7a5e06ecb3258b11988343321b78ffaab1d48dc0 Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Handle per-transport client idle statusØystein Heskestad2021-05-203-11/+57
| | | | | | | | [ChangeLog][QMetaObjectPublisher] Handle per-transport client idle status Task-number: QTBUG-92927 Change-Id: I5a06261e6dddb0fc0fae9f73b280c61cf5a2b52d Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Add tests for nullptr, QVariantHash, and QVariantMap in testWrapValuesØystein Heskestad2021-05-201-0/+31
| | | | | Change-Id: I76678df71d9a3c976e1722fd655d796050562501 Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Remove two compilation warnings in test on macOSØystein Heskestad2021-05-121-2/+2
| | | | | | Change-Id: I4d05e00b02ca88f961b06ee0ee0d2109ef9a4d55 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Make property update interval configurable and add testsØystein Heskestad2021-05-052-0/+101
| | | | | | | | [ChangeLog] Make the property update interval configurable Fixes: QTBUG-92928 Change-Id: I0b02ae0c0879c1a3891d5807c1ff8c1f619841b2 Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Use QProperty observation to push property updates to clientsArno Rehn2021-04-225-41/+102
| | | | | | | | | | | If the property is BINDABLE but lacks a NOTIFY signal, the client will have no way to register a callback for change notifications. Document this behavior as such. A future patch could synthesize signals for purely BINDABLE properties on the client side, but this needs some more thought. Change-Id: I5e723e294dc01890956fee179fb3ba30aecf8cc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix up the recently added test for QProperty/QWebChannel interactionArno Rehn2021-04-162-6/+19
| | | | | | | | | | | | | | | The recently added code was not quite conformant to the coding style and did not properly use Q_OBJECT_BINDABLE_PROPERTY together with a notify signal. This commit fixes both. The commit also adds a test to verify that changes to a QProperty are actually transmitted over QWebChannel. At the moment, this relies on notify signals. A follow-up patch will use onValueChanged() to propagate changes of properties without a NOTIFY signal. Task-number: QTBUG-91757 Change-Id: Ia5a323cba02dc72df774beeba445d40140d7af7f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Handle signals in the registered object's threadMilian Wolff2021-04-161-3/+1
| | | | | | | | | | | | | | | | | | | | | Do not call `sender()` from a different thread. As the API documentation indicates, that is not supported and can lead to crashes as experienced on the CI frequently. Instead, we now have per-thread SignalHandlers and use those to get notified about signals and metacall events. Moving a registered object into a different thread isn't supported once it was registered. But the object can be deregistered, moved, and then re-registered. [ChangeLog] Signals from objects living in a different thread than the QWebChannel are now handled correctly. Task-number: QTBUG-51366 Change-Id: I1edb0694b946a494b6c0d4a8a6dc6b452dcb2c7a Reviewed-by: Arno Rehn <a.rehn@menlosystems.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add test for QProperty over QWebChannelØystein Heskestad2021-04-162-0/+64
| | | | | | Task-number: QTBUG-91757 Change-Id: I45eb5aed2a1254fe2553a1cfc2475ccdb39252b1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Re-generate CMake project filesJoerg Bornemann2021-03-154-10/+65
| | | | | | Change-Id: I7973833fa7b4000cb8f6e1a1fc0a8c560fe16a3b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev"Allan Sandfeld Jensen2021-01-296-0/+94
|\
| * Merge remote-tracking branch 'origin/wip/cmake' into devAllan Sandfeld Jensen2021-01-296-0/+94
| |\ | | | | | | | | | | | | | | | | | | Regenerating and fixing as needed. Fixes: QTBUG-90661 Change-Id: Ief9f044d4b9ea2ce8130b11031fb93b6e673fbdd
| | * Regenerate projectswip/cmakeAlexandru Croitor2019-11-252-7/+4
| | | | | | | | | | | | | | | | | | | | | Change-Id: Ibdadef34b1b7d4ea98140feed171c409eb8bafde Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | * Add cmake supportJüri Valdmann2019-09-234-0/+89
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-78190 Change-Id: Ibdfbcb479ce1af6370b9148516cef6f64e7c1abb Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Stop using deprecated QVariant::type()Allan Sandfeld Jensen2021-01-291-4/+4
|/ / | | | | | | | | Change-Id: I46c782de038e973eae54f6f187ed606d18708c41 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Fix TextWebChannel::testInvokeMethodConversion with latest qtbaseJüri Valdmann2020-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVariant's comparison operator has been changed to no longer perform type conversions, except for primitive numerical types, which causes the test to fail in the QJsonValue case. The comparison QCOMPARE(retval, args.at(0).toVariant()) fails because retval is QVariant(QJsonValue, QJsonValue(double, 1000)), while args.at(0).toVariant() gives QVariant(qlonglong, 1000). Change args.at(0).toVariant() to QVariant(args.at(0)) to ensure that both QVariants contain a QJsonValue. Change-Id: I5c4102645b5c705ca5b68dc7d308f68c6630b1d5 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Fix infinite recursion when wrapping a self-contained object twiceArno Rehn2020-08-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous unit test for self-contained objects only wrapped the test object once. After wrapping, a different code path is taken which still exhibited infinite recursion. This patch addresses both the unit test and the infinite recursion. To fix the problem, a boolean in the ObjectInfo struct is toggled to indicate whether the object in question is currently being wrapped. If that is the case, the recursing code path is skipped. [ChangeLog][General] Fixed infinite recursion when dealing with self contained objects. Fixes: QTBUG-84007 Pick-to: 5.15 Change-Id: Ie0898fb5f28cec91587897835ff937672d60f2a1 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Use QList instead of QVectorJarek Kobus2020-06-292-9/+6
| | | | | | | | | | | | Task-number: QTBUG-84469 Change-Id: Ide3fa7a558b456354703dd7fd5ee414647e24934 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-05-142-6/+48
|\ \ | | | | | | | | | Change-Id: I6417958acf66455b993c65f51b58f15955aa95f4
| * | tst_webchannel: Don't use QSignalSpy for inter-thread signalsMilian Wolff2020-04-151-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes data races reported by helgrind due to direct signal connection within QSignalSpy without any sort of serialization. ``` ==840094== Possible data race during write of size 4 at 0x1FFEFFD160 by thread #3 ==840094== Locks held: none ==840094== at 0x4F7DE5C: QListData::detach_grow(int*, int) (qlist.cpp:121) ==840094== by 0x125380: QList<QList<QVariant> >::detach_helper_grow(int, int) (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x125598: QList<QList<QVariant> >::append(QList<QVariant> const&) (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x127CEC: QSignalSpy::qt_metacall(QMetaObject::Call, int, void**) (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x5149278: QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) (qmetaobject.cpp:316) ==840094== by 0x518BE13: QMetaObject::activate(QObject*, int, int, void**) (qobject.cpp:3825) ==840094== by 0x518B571: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3660) ==840094== by 0x1281F5: TestObject::propChanged(QString const&) (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x1298BB: TestObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x5183FEC: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:520) ==840094== by 0x5184FFB: QObject::event(QEvent*) (qobject.cpp:1260) ==840094== by 0x513F8D7: QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) (qcoreapplication.cpp:1256) ==840094== ==840094== This conflicts with a previous read of size 4 by thread #1 ==840094== Locks held: none ==840094== at 0x1213FF: TestWebChannel::testAsyncObject() (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x128E03: TestWebChannel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (in /ssd2/milian/projects/qt5/src/qtwebchannel/build/tests/auto/webchannel/tst_webchannel) ==840094== by 0x514D345: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.cpp:2308) ==840094== by 0x4DBE6E2: QMetaMethod::invoke(QObject*, Qt::ConnectionType, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) const (qmetaobject.h:122) ==840094== by 0x4DB735A: QTest::TestMethods::invokeTestOnData(int) const (qtestcase.cpp:941) ==840094== by 0x4DB7EA8: QTest::TestMethods::invokeTest(int, char const*, QTest::WatchDog*) const (qtestcase.cpp:1140) ==840094== by 0x4DB92DE: QTest::TestMethods::invokeTests(QObject*) const (qtestcase.cpp:1484) ==840094== by 0x4DB9F3F: QTest::qRun() (qtestcase.cpp:1922) ==840094== Address 0x1ffeffd160 is on thread #1's stack ==840094== in frame #3, created by TestWebChannel::testAsyncObject() (???:) ``` Change-Id: Ie0d18e1d7ec970fd7fb46a5ef10699d239008f53 Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io>
| * | Restore compatibility with custom QVariantList/QVariantMap convertersMilian Wolff2020-04-152-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QVariant::toValue<QVariantList> does not honor explicit custom converters for a sequentially iterable container to a QVariantList. This breaks compatibility with Qt 5.12.3 and before, where the old code path using QVariant::toList() used the custom converter. Do the same for QVariantMap. This patch restores the compatibility with old code. The real fix will target the QVariantList converter code in QtCore - this is just a hotfix within Qt WebChannel for now. Task-number: QTBUG-80751 Change-Id: Ic70c6a353aad43ddbaefbc6626a0af87bd0d024f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | | Make test resistant to type simplificationAllan Sandfeld Jensen2020-05-071-1/+1
| | | | | | | | | | | | | | | Change-Id: I594db4d2d1625545ac523380c3870254a2800d1a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Skip changes made while iterating over connections for emitAndrew Webster2020-02-211-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If changes are made to the connections while iterating over them during an emit, these new changes should be ignored until the next emit. If not, the following things could happen: * newly added connections could be called for the current emit * an existing connection may not be called at all New connections added to the list are already ignored because forEach caches the length before processing an array. However, if an item is removed during forEach, the current index is not adjusted, which will result in next item being skipped if the removed item is before the current index. This is dealt with by creating a new list during disconnect with the diconnected item removed. This way the list that forEach uses is not modified. This logic is slightly different than QObject, which uses a linked list. If handlers A and B have been attached to the same signal, and handler A disconnects handler B, handler B would still be called, even if it was connected after handler A, which is not the case for QObject. A more complex solution may be required if this behavior needs to match QObject. This also removes an error message when disconnect fails to find any matching connection. This more closely matches QObject. Change-Id: Ief04426a962362055022f450d9767d4b5fe152a1 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-311-0/+6541
|\ \ \ | |/ / | | | | | | Change-Id: I937cdd3f37537bf9f7416e7491263518bf95ff45
| * | Add binary compatibility file for qtwebchannel 5.14 branchMilla Pohjanheimo2019-12-161-0/+6541
| | | | | | | | | | | | | | | | | | | | | BC file built against 5.14.0 added. Change-Id: Ie372b2971dc4fd373363b47bbb74f0d1e1de3bee Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-171-0/+2
|\ \ \ | |/ / | | | | | | Change-Id: I79bf29f0c75f7d30450b0e328ccf7bd78831e056
| * | Skip TestWebChannel::testAsyncObject()Ulf Hermann2019-12-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Blacklisting the test won't help as it frequently crashes. Task-number: QTBUG-74611 Change-Id: Ie7ef03c751af501d662596ea150e572c814fed82 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>