aboutsummaryrefslogtreecommitdiffstats
path: root/src/webchannel/qmetaobjectpublisher_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QWebChannel: give friendship to tst_bench_QWebChannel the idiomatic wayMarc Mutz2024-03-011-1/+3
| | | | | | | | | | | | | | | | | | | | Don't put the tst_ class into the QT_NAMESPACE lest it changes the name in the CI -qt-namespace builds and messes up statistics (unlikely, being a benchmark, but anyway). This requires forward-declaring the tst_ class at global scope and using a FQN in the friend declaration to avoid the friend declaration declaring a separate class in QT_NAMESPACE. Amends dccba9bbfdb893fb51c7ef52b7cf0e605eb2d13d, but that just inherited the issue from the existing code. Created QTBUG-122927 to track the original issue. Task-number: QTBUG-122927 Pick-to: 6.7 Change-Id: Ia6d3932f061eee7b6741ac875932a7e15120d830 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Cleanup: move QWebChannel benchmarks into a separate subdirectoryIvan Solovev2023-10-161-0/+1
| | | | | | | | | | | | | Benchmarks should not be a part of common test-cases. We normally have a different tests/benchmarks subdirectory for them. This commit moves benchmarks from tst_webchannel into a new benchmark. This requires defining a new class as a friend of QWebChannel and QMetaObjectPublisher. Change-Id: I4b5b182d5c25648d0bc6ac46e1415f9742b9ff37 Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* QMetaObjectPublisher: use new way to QMetaObject::invokeMethodThiago Macieira2022-08-251-3/+7
| | | | | | | | | | | The new API isn't limited to 10 parameters. It also does its own parameter matching, which we use here to locate the method to be called. I don't think that was necessary, though, because we sort the methods to be called in order of preference. Fixes: QTBUG-105596 Change-Id: I36b24183fbd041179f2ffffd170268620633a72b Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Use SPDX license identifiersLucie Gérard2022-06-101-38/+2
| | | | | | | | | | | 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>
* Fix missing includesVille Voutilainen2022-05-171-0/+1
| | | | | | | | There's been recent header refactorings, this fixes the fallout. Pick-to: 6.3 6.2 Change-Id: I632f652ed12e151af6d1ad09c3ace510f60747ab Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Include <QProperty> explicitlyMarc Mutz2021-11-081-0/+1
| | | | | | | | 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>
* Make blockUpdates bindableØystein Heskestad2021-05-201-1/+5
| | | | | | | | [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-201-6/+33
| | | | | | | | [ChangeLog][QMetaObjectPublisher] Handle per-transport client idle status Task-number: QTBUG-92927 Change-Id: I5a06261e6dddb0fc0fae9f73b280c61cf5a2b52d Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
* Make property update interval configurable and add testsØystein Heskestad2021-05-051-1/+22
| | | | | | | | [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-221-3/+60
| | | | | | | | | | | 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>
* Handle signals in the registered object's threadMilian Wolff2021-04-161-1/+4
| | | | | | | | | | | | | | | | | | | | | 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>
* Fix infinite recursion when wrapping a self-contained object twiceArno Rehn2020-08-171-1/+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-291-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Ide3fa7a558b456354703dd7fd5ee414647e24934 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Unwrap QObjects embedded inside argumentsAndrew Webster2019-09-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts QObjects that are embedded inside ECMAScript objects into the actual QObject that they represent. For example, if an array of QObjects is passed as an argument to a method, the method will received a QVariantList where the items are QVariants of type QObjectStar. Method: void processObjects(const QVariantList &list); Call from ECMAScript: theObj.processObjects([qobj1, qobj2]) Prior to this patch, the method would have received a list containing QVariantMaps with keys from the QObject EMCAScript wrapper (e.g. __objectSignals__, __propertyCache__, etc.). After this patch, it will receive a list containing QVariants with QObject* inside. QVariantMaps are converted to QObjects if they have a property called "__QObject*__" set to true and an "id" property. "__QObject*__" is the same identifier for retuned objects and is now added in a toJSON method at the client. Change-Id: I5cafcddb9df0141977a574aaed4ce7c3ea2d0767 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Implement actual overload resolutionArno Rehn2019-03-291-0/+38
| | | | | | | | | | | | This implements host-side overload resolution. If a client invokes a method by its name instead of its id, the overload resolution tries to find the best match for the given arguments. The JavaScript client implementation now defaults to invocation-by-name, except when a method is invoked by its full signature. In that case, the invocation is still performed by method id. Change-Id: I09f12bdbfee2e84ff66a1454608468113f96e3ed Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Always rebuild the class info for wrapped objectsMilian Wolff2019-03-251-6/+1
| | | | | | | | | | | | When a new transport is accessing a previously wrapped object, we used to send potentially outdated property values. [ChangeLog][QWebChannel][General] Send current property values when another transport is accessing a previously wrapped object. Fixes: QTBUG-62388 Change-Id: I5cd5772b42c3cb9860e945bb85f77f0e3b6d6ea0 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Convert QObjects in QVariantMapsAndrew Webster2019-02-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | QObjects that are present in an array are already converted to an object identifier. This does the same for variant maps, which end up as ECMAScript objects. This allows QObjects put into a QVariantMap to be properly deserialized. For example, if a property is declared as such: Q_PROPERTY(QVariantMap propName READ propName CONSTANT) And propName is: QVariantMap propName() const { QVariantMap map; map.insert("theProperty", QVariant::fromValue(someQObject)); return map; } The "theProperty" property will now properly refer to the object. Change-Id: I3c6e71b860f6825a31eb337aeffa55302287c8ff Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Replace Q_DECL_OVERRIDE with overrideKevin Funk2017-09-211-1/+1
| | | | | Change-Id: I8661063408d17c80a04433beda595061e89b5ba8 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-211-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/webchannel/doc/src/index.qdoc src/webchannel/qwebchannelabstracttransport.cpp Overlapping changes to documentation; constructed hybrid. src/webchannel/qmetaobjectpublisher.cpp tests/auto/webchannel/tst_webchannel.cpp tests/auto/webchannel/tst_webchannel.h Both sides made additions; in the same place. Change-Id: Iff12970978b70946dc3e1290841aca2d35c9c1d0
| * Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-0/+9
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alleged Conflicts: examples/webchannel/chatclient-html/doc/src/chatclient-html.qdoc examples/webchannel/chatclient-qml/doc/src/chatclient-qml.qdoc examples/webchannel/chatserver-cpp/doc/src/chatserver-cpp.qdoc In each case, the two sides agreed byte-for-byte. Not quite sure what git thought the conflict was ! Change-Id: I5da9695b667f4112848c520b630ab1304d61cea3
| | * Make passing objects from website to server possibleKai Dohmen2016-06-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you get an object from the server and want to pass it back to the server via a function the id of the object is passed instead of the whole json object. On the server side QMetaObjectPublisher::invokeMethod now looks up the object in QMetaObjectPublisher::wrappedObjects by the passed object-id. Task-number: QTBUG-50075 Change-Id: Id0df2dfaa79bcba12ca48391ae7537ac1a086898 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| | * Fix setting properties of QJson{Value,Array,Object} type.Milian Wolff2016-05-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the previous issue, where these types were not properly converted to QVariant when invoking a method, we manually do the conversion now to get the desired behavior. The culprit is again that QJsonValue::toVariant converts an object e.g. to a QVariantMap, and not to a QVariant containing a QJsonObject. [ChangeLog] QObject properties of type QJsonValue, QJsonArray or QJsonObject can now be set via the Qt WebChannel. Task-number: QTBUG-48198 Change-Id: I5d574b1a5cffd6d6ad9b555f2a3e872b9c3425a7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove deleted transport objectsKai Dohmen2016-05-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a QMultiHash which maps transport objects to wrapped object ids. transportRemoved iterates over all matching wrapped objects and removes the passed transport object from their transports-vector. If the transports-vector is empty after removing the passed transport object the objectDestroyed will be called on the wrapped object. transportRemoved will be called either on the transports destoryed signal or on disconnecting the webchannel from it. Without this changes the QMetaObjectPublisher::wrappedObjects and ::registeredObjectIds would only be cleaned up if the website calls deleteLater on QObjects but not on website reloads. Task-number: QTBUG-50074 Change-Id: If294564fee2406edd7fb578852aeb269cac23a92 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | | Fix typoFrank Meerkoetter2016-04-131-1/+1
|/ / | | | | | | | | Change-Id: I8da406c190ed3e3f925c50ede6c7b845033837b9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1Liang Qi2016-02-151-0/+11
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I42bfb38e5a9bf03b43636309fe9e29e8d772bb06
| * Add the "We mean it" warning to private headersv5.6.0-rc1v5.6.0Sergio Martins2016-02-091-0/+11
| | | | | | | | | | Change-Id: I34bcf2e4a2d66c9cb126c2edae79a45064b82a67 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Updated license headersAntti Kokko2016-01-201-14/+20
|/ | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I2fe282e6b9d52f9635cd69e3e8de53724cbb8b0a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersv5.5.0-alpha1Antti Kokko2015-02-171-6/+6
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Iebed549451f58a9fbdd86adf5d0340412d7766d7 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com>
* Merge branch '5.4' into devMilian Wolff2015-02-041-4/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge required extensive conflict handling because the bug fix in 5.4 to properly wrap and forward QObjects referenced by published objects' properties clashed with some feature additions in dev, namely the client separation logic. All unit test pass for me locally now again. Conflicts: .qmake.conf src/webchannel/qmetaobjectpublisher.cpp tests/auto/qml/tst_webchannel.qml Change-Id: If3d00e13b265c6ab9fb2c38023014f97f8e7779b
| * Make objects inside properties accessible.Milian Wolff2014-12-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to the support for factory-methods, we must wrap objects in properties to make them accessible to clients. This patch adds the required code for that. Besides support for simple properties that reference an object, this patch also adds support for list properties that contain objects. The client-side unwrap of properties is delayed until all objects are initialized, as a property might reference another registered object. Change-Id: I9fb90a8eab4c66d2f4231fdb482e0d97d128df3e Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Do not broadcast signals or property changes of wrapped qobjectsBernd Lamecker2014-12-191-13/+21
| | | | | | | | | | | | | | | | | | | | | | Signals and property changes caused by dynamically created qobjects (qobjects returned from a method call at runtime) should not be broadcasted to any client but only sent to clients which know these qobjects. Also added testcases for the changes. Change-Id: I9aacfa9e7e9df9314b44c6ba8e7339a2069e3c37 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Separate registered and autoregistered QObjectsSumedha Widyadharma2014-12-151-1/+9
| | | | | | | | | | | | | | | | | | | | | | Currently, a new client gets a list of _all_ registered QObjects, whether they were explicitly registered or not. This leaks internal information which the clients cannot use right away anyway. Change-Id: I4b25a731e9bc2d646f903057b409aecd34dc7f11 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Do not broadcast initialization data to all clients.Milian Wolff2014-12-081-5/+1
|/ | | | | | | | | | | | | Instead, send the data as a response to the initialization request message. This simplifies the code and makes it more predictable, as we do not spam all clients with initialization broadcasts anymore. Note that the pending initialization "feature" is removed, but I don't see a need for it anymore. If you want to delay client initialization, do it on the client side. Change-Id: I1ab71fd6c9e809ccb6085f1a3fbac3eb9b2e910b Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-261-18/+10
| | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Furthermore we need to update the sync.profile to not point to the dev branch in order to integrate this patch in the CI. Change-Id: I06b5496b5d865e2da4808532362616429c969658 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Remove unused #include statementSumedha Widyadharma2014-08-131-1/+0
| | | | | Change-Id: Ic51555b34823354092a5a4e8583c51d50a1aded8 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Refactor and streamline API and IPC protocol.Milian Wolff2014-07-291-7/+26
| | | | | | | | | | | | | | | This patch removes the obsolete API support to send raw messages using a QWebChannel. Instead, it is encouraged to directly use WebSockets or navigator.qt. By doing so, we can cleanup the code considerably. While at it, the transport API is adapted to work on QJsonObject messages, instead of QStrings. This will allow us to use more efficient formats in e.g. QtWebKit or QtWebEngine. One could also implement a JSONRPC interface using a custom transport then. Change-Id: Ia8c125a5558507b3cbecf128a46b19fdb013f47b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* Make the QWebChannel QML API publically accessible.Milian Wolff2014-07-151-1/+1
| | | | | | | | | | This is required for proper QtWebKit/QtWebEngine integration, as otherwise these modules would have to redo a lot of the QtWebChannel QML API. Furthermore, without this, we could not use the WebChannel.id attached property everywhere, independent of the web browser technology. Change-Id: I032a9326841d505c2f77959a240bbfc71e94b6e8 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Refactor code to use QWebChannelAbstractTransport and QtWebSockets.Milian Wolff2014-07-041-8/+7
| | | | | | | | | | | | | | | | | | | | | | This is a quite big changeset, but necessary to get the roadmap implemented that was discussed at QtCS. With this patchset landed, the QWebChannel does not depend on QtWebKit anymore, not even for the tests. Rather, we will introduce the dependency in the other way (i.e. QtWebKit will optionally use QtWebChannel if available). For the pure Qt/C++ use-case, we ship a utility implementation of a QWebChannelAbstractTransport that uses a QWebSocket for the server-client communication. This way, we can get rid of the custom WebSocket implementation. The tests are refactored to run the qwebchannel.js code directly inside QML. Integration tests for QtWebKit/QtWebEngine as well as examples will be added to these repositories. Change-Id: Icc1c1c5918ec46e31d5070937c14c4ca25a3e2d6 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Fix public headers for use with QT_NO_KEYWORDSPierre Rossi2014-06-261-1/+1
| | | | | | | | | QtWebEngineCore has to build that way, so we better make sure the two can play nicely together. Change-Id: Ibab5a2d042b3c8ea230922aeca6768ffec2ca452 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Send response data only to target client.Milian Wolff2014-03-211-5/+5
| | | | | | | | | | | | | | Before, the response was sent to all clients in a broad-cast and had to be filtered on the client-side. This required additional client identification data to be added to all requests and responses. Now, we keep track of the transport and transport-internal client and only send the response to that client. This is very benefitial for multi-client setups but also reduces traffic for single-client setups and thus their performance. Change-Id: Ia1ef5e031b0058222083d352a8aa28a7d566a6ca Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Mark some constructor as explicitSergio Ahumada2014-03-191-1/+1
| | | | | | Change-Id: I92c5b00d5bbcc08a241ed0382c13b6bf2676ca6f Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Make the underlying transport mechanism of the webchannel pluggable.Milian Wolff2014-02-061-10/+7
| | | | | | | | | | | | | | | | | | | | | This enables us to optionally use navigator.qt instead of a WebSocket, which is nicer setup-wise and is also slightly faster: navigator.qt: 284.0 msecs per iteration (total: 2,840, iterations: 10) WebSocket: 295.8 msecs per iteration (total: 2,959, iterations: 10) The baseline is ca. 203 msecs, which would mean a performance boost of ca. 12.7%. Furthermore, this sets the fundation to eventually add a WebEngine transport mechanism. The WebViewTransport should also be removed and instead the WebView itself should directly implement the WebChannelTransportInterface. Change-Id: I368bb27e38ffa2f17ffeb7f5ae695690f6f5ad21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation when building with namespaced Qt.Milian Wolff2014-01-311-0/+4
| | | | | | | | Wrap everything in the QtWebChannel module with the Qt namespace or use the Qt namespace where appropriate. Change-Id: I1ef2b2f5eb22ec5e04ca76c034ef8ebf4043b899 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixup license headers of the files written by me.Milian Wolff2014-01-161-3/+2
| | | | | | | | | | | | Some tests referenced Nokia in their license even though that was never the case. The tests where written completely by me after Qt Nokia times. What is missing are the examples which are still mostly original work by Noam back then in Nokia times. The rest was (re-)written by me completely since then anyways. Change-Id: Ib423fb3459bcc1f7464a02de4fd82ddfd614d282 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify usage of QWebChannel on the server side.Milian Wolff2014-01-081-6/+56
| | | | | | | | | | | This is achieved by hiding the MetaObjectPublisher completely as private API. The QWebChannel is the only publisher API and now handles both the socket as well as the publisher internally. This now allows us to create a proper QML api in the new QmlWebChannel. Change-Id: I3096364af8485353ca9bc19df4a81a8e4552c3d7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize: Use property-indices instead of names for notifications.Milian Wolff2014-01-081-2/+2
| | | | | | | | | | | | | | | This reduces the traffic as the indices are usually much smaller than the property names. As such, the benchPropertyUpdates gets a speed boost of about 9% (or 10ms vs. 11ms). As we need to transmit the index during initialization that degrades its performance slightly by ca. 4% (13ms vs. 12.5ms). Considering that the initialization only takes place once whereas the property updates potentially often, this is a good tradeoff. Change-Id: If7df3e360f1528b7d7aa26c63ce851363ae9fd6a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize client initialization by using QJson directly.Milian Wolff2013-12-271-3/+3
| | | | | | | | | | | Before, we constructed QVariant maps and lists and then converted them to JSON to send the data to the webchannel. By obsoleting the conversion step, benchInitializeClients shows a good performance boost of ca. 19% (11.81ms vs 14.58ms). Change-Id: Ief8e8127207a046f481488a478cd6a18fa0ebffe Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Port MetaObjectPublisher benchmarks to C++.Milian Wolff2013-12-271-0/+176
This allows us to remove the public API for the tests and allows for more tests and benchmarks in the future. To achieve this, we re-use the new qmetaobjectpublisher_p.h, which then also must be exported. Change-Id: I3c33b2f5be6cc674cd3092667151dd8da2263cf5 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>