summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-153-5/+270
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * Add test to verify that bools get properly converted.Milian Wolff2016-07-132-0/+33
| | | | | | | | | | | | | | | | | | This test passes and seems to indicate that the signal-delivery has an issue, or that the issue lies on the JavaScript side. Change-Id: Ic2436147b3af49d35dc556da57aed3e54408f1f9 Task-number: QTBUG-54074 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * Properly unwrap QObject signal parameters on the JavaScript side.Milian Wolff2016-06-281-5/+14
| | | | | | | | | | | | | | | | | | | | This enables you to pass `QObject*` parameters via signals to the JavaScript side. The object will be serialized and then unwrapped as needed now. Task-number: QTBUG-54243 Change-Id: Ie8a6d14eb1351f14f1855d242ceb3b3f8262152d Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
| * Make passing objects from website to server possibleKai Dohmen2016-06-212-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | 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-262-4/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Enable calling C++ functions taking QJson arguments via webchannel.Milian Wolff2016-05-252-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to convert the QJsonValue arguments to QVariants, which then failed to call a C++ function which expected on of the three QJson data types, i.e. QJsonValue, QJsonObject or QJsonArray. Instead, we now detect these three cases and manually convert the QJsonValue as needed. [ChangeLog] C++ functions taking arguments of type QJsonValue, QJsonArray or QJsonObject can now be called via the Qt WebChannel. Change-Id: I94e0c8937ca35e2ecd3554f7ddf2d4e5a3328570 Task-number: QTBUG-48198 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Updated license headersAntti Kokko2016-01-2012-205/+145
|/ | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I1c2917ddcb2436477aefde3dc640155d5131a664 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Support subclass property getters and setters.Pierre Rossi2015-07-083-0/+212
| | | | | | | | | | | | | | | QDialog for instance adds a setter for the modal property already exposed by QWidget. Object.defineProperty requires configurable set to true in order to add that setter at a later stage. Adds some reusable autotest logic with a soft dependency on QJSEngine to test some of the C++/JS integration aspects. Task-number: QTBUG-46548 Change-Id: Ibd49274f7d334c068c4006fb09417abf911c24e9 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Fix wrap registered object issueLutz Schönemann2015-05-152-0/+76
| | | | | | | | | | | | | | | | When wrapping a registered object the code generated a new ID for an already known object. That new ID wasn't stored but returned to the client including the objects information. That resulted in a new created object on client side but the remote object (on the server) was not accessible. This patch fixes the issue by just returning the known ID of a known object. Because the client already has a local representation of that object it does not have to unwrap the object description. Change-Id: I31964823c84c84fd7ebce4386865c18fb5518be7 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Update copyright headersv5.5.0-alpha1Antti Kokko2015-02-1712-72/+72
| | | | | | | | | 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-045-27/+70
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix crash on signal after deregistrationLutz Schönemann2014-12-032-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implemented a remove method in SignalHandler that allows us to remove and disconnect an object from SignalHandler w/o decrementing the connection counter until it hits zero or deleting the object That same functionality was used to remove an object from internal lists when receiving a destroyed signal from an object. In case of deregistering an object we haven't received a destoryed signal but simulated reception of that signal and so that code was not called in that case. Change-Id: Ie20cf628a2de028375f5d29f913682e25ebf8d44 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
| * Make objects inside properties accessible.Milian Wolff2014-12-021-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make the tests less flaky and don't send empty property updates.Milian Wolff2015-01-162-28/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests have been flaky on the CI. And indeed, running the tests locally under valgrind, which heavily influences the timings, I could reproduce failures on my local machine as well. The failure was due to multiple things, but most notably boils down to intermittend property update noficiations. To reduce that, the myFactory.lastObj property is propagated up. This way, any change to that property won't be propagated to the clients and influence the test. Furthermore, the failing tests are hardened by also checking the server messages, which is crucial to correct the flow of messages. Finally, a bug was found, where an empty property change could be broadcasted to all clients, when only a specific client's object got its properties changed. This is also fixed by this patch now. Change-Id: I2c7ba53253e2841db1a290872dacb097a7b984cf Reviewed-by: Bernd Lamecker <bernd.lamecker@basyskom.com> Reviewed-by: Risto Avila <risto.avila@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* | Do not broadcast signals or property changes of wrapped qobjectsBernd Lamecker2014-12-194-4/+368
| | | | | | | | | | | | | | | | | | | | | | 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-153-41/+215
| | | | | | | | | | | | | | | | | | | | | | 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-2/+2
|/ | | | | | | | | | | | | 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>
* Never manually connect to the destroyed signal of any object.Milian Wolff2014-10-171-22/+10
| | | | | | | | | | The web channel always connects to that signal automatically for internal book-keeping purposes. Thus we do not have to connect to the signal for wrapped objects. This simplifies the tests and reduces the IPC traffic for wrapped objects. Change-Id: Iaf8d9ce0b87874917cdcdf9013e21a53ee36b53a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixing failing testcasesLutz Schönemann2014-08-261-4/+21
| | | | | | | | Some testcases do not consider all messages. These changes make the test wait at specific points until these messages are sent. Change-Id: Ie8f4b9492fefade0be91e7f829824db39d61ddee Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Update license headers and add new licensesJani Heikkinen2014-08-2611-198/+110
| | | | | | | | | | | | | | - 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>
* Get rid of setTimeout calls in qwebchannel.js client code.Milian Wolff2014-08-262-25/+6
| | | | | | | | | | | | This was a historic artefact which should not be required anymore. Back then it was added when trying to improve the perceived performance of the webchannel on an embedded device. Nowadays, using the built-in WebKit IPC mechanism instead of WebSockets, paired with the rest of the code cleanup and other changes, it should not be required anymore. Change-Id: I4b2d76d84aaf92e12592a0b2bcf94710b697846e Reviewed-by: Lutz Schönemann <lutz.schoenemann@basyskom.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixing property update for wrapped objectsLutz Schönemann2014-08-191-0/+30
| | | | | | | | | Returned QObject pointer got wrapped correctly but a wrong QJsonObject was given to initializePropertyUpdates() method. Change-Id: I157b862ba2a90e87c295beb3c02fff932aac83c6 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Call unwrapQObject for every response we getLutz Schönemann2014-08-081-8/+41
| | | | | | | | | | | | The JS lib will miss to add QObjects to the local object descriptions when receiving a new description and the user has not registered a callback function. This patch makes the lib execute unwrapQObject for all responses received from a function call. Change-Id: I72d872d65a7e7bec1d7e6ffb1eea674d0f6e50d7 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Fix namespace build of testFrederik Gladhorn2014-08-042-0/+6
| | | | | | Change-Id: I66b102f0076d8ab39f871ce2be300a1e33228eac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Enable the QML tests even when QtWebKit is not available.Milian Wolff2014-08-032-4/+6
| | | | | | | | The tests don't depend on QtWebKit anymore, so they should be run even without QtWebKit installed. Change-Id: Id60ebec861b29b73522fba670b1a0c19375cb826 Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
* Properly disconnect a transport from the QtMetaObjectPublisher.Milian Wolff2014-08-012-0/+14
| | | | | | | | | | | | | | This fixes a bug, where messages from the transport would still be send to the QtMetaObjectPublisher even though it was previously disconnected. I'll refactor this code eventually to get rid of QtMetaObjectPublisher alltogether and merge its code into QWebChannelPrivate where appropriate. Change-Id: Ie0c35bd81a5e633bdcb6be55b64f947d4a545a59 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Lutz Schönemann <lutz.schoenemann@basyskom.com>
* Refactor JavaScript QWebChannel to take an external transport object.Milian Wolff2014-07-301-2/+1
| | | | | | | | | | | This assimilates the JavaScript side to the QML/C++ side. We get rid of the automagic WebSocket code. Instead, users pass in the WebSocket from the outside, if they want to use that for communication. In the QtWebKit/QtWebEngine cases, we will pass in our custom IPC objects. Change-Id: I15e15b5130f99dc8b39dfbfa8cd3d8b2d34dbbc0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com> Reviewed-by: Lutz Schönemann <lutz.schoenemann@basyskom.com>
* Refactor and streamline API and IPC protocol.Milian Wolff2014-07-298-362/+275
| | | | | | | | | | | | | | | 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>
* Explicitly distinguish between JavaScript Client and QML Client.Milian Wolff2014-07-182-17/+17
| | | | | | | It worked before, but this patch makes the code more explicit. Change-Id: Id7cf90cb3e2488106e08077e9a8165112734dd88 Reviewed-by: Michael Bruning <michael.bruning@digia.com>
* Adapt to rename to QtWebChannel and rename resource path as well.Milian Wolff2014-07-175-5/+2
| | | | | | | | | | This is a minor cleanup commit. Renaming the .pro file is required for qt.pro to find it. The rename of the resource path makes it more explicit by using the module name. Change-Id: Ib724882d02d2a8aea7468ef984ed573dca1d3e7b Reviewed-by: Michael Bruning <michael.bruning@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Make the QWebChannel QML API publically accessible.Milian Wolff2014-07-1512-19/+158
| | | | | | | | | | 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-0421-420/+326
| | | | | | | | | | | | | | | | | | | | | | 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>
* Do not return a function for property getters on the HTML side.Milian Wolff2014-07-033-4/+4
| | | | | | | | | This simplifies the usage and lets properties be used just like normal JavaScript properties. This is possible since the properties are cached on the HTML side. Change-Id: Ic60076f4596cd8df063567dfbd630e5bd6403119 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Add cmake test, adapt test directory layout and point to dev branches.Milian Wolff2014-07-0326-8/+32
| | | | | | | | | | | The auto tests are now located in tests/auto instead of directly in tests/. This is required to ensure the cmake test is found. Furthermore, the sync.profile is updated to point to refs/heads/dev, as we target Qt 5.4 with this new module. Change-Id: I1e6e99968b7081b5774eaf30319cac1fbaed35c2 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
* Send response data only to target client.Milian Wolff2014-03-214-32/+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>
* Use an enum for message types instead of strings.Milian Wolff2014-03-213-14/+26
| | | | | | | | | | | This further reduces the network traffic and thus leads to a small performance boost. Personally, I also think this code is a bit nicer to read and grasp. Change-Id: I943c621142e9982f0e52d24e3a0976428856541b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Refactor QML test code and add a test for multiple websocket clients.Milian Wolff2014-03-215-50/+234
| | | | | | | | | This will allow us to refactor the handling of multiple clients without breaking the functionality. Change-Id: I277eb5d7337d398fdf0694ef539d3b6ab7e5d332 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Make the underlying transport mechanism of the webchannel pluggable.Milian Wolff2014-02-0616-62/+141
| | | | | | | | | | | | | | | | | | | | | 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>
* Mark QtWebKit as optional module dependency.Milian Wolff2014-01-311-1/+1
| | | | | | | | | | | | | | The current CI system fails to build the webchannel when QtWebKit is included in sync.profile, so we ignore it for now and adapt the QMake build system to only include the declarative tests when webkit is found. As discussed with tronical, sifalt and sahumada, the qtqa scripts will need to be adapted to cope with optional dependencies of non-qt5 modules. Change-Id: Id89b763ef2697e9e72eb4064c150971b13ebccc3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fixup license headers of the files written by me.Milian Wolff2014-01-167-58/+96
| | | | | | | | | | | | 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>
* Properly convert JSON data to target type of function parameter.Milian Wolff2014-01-102-0/+55
| | | | | | | | | | | | | | | | | | | This used to work but broke in one of the last few commits apparently. Now we add a proper unit test to ensure it stays working. The issue was that JSON only knows e.g. numeric types stored as double. When we then try to call a method taking an int with the VariantArgument that tries to convert the double to int, we failed and produced an invalid QVariant which then converts to 0. Now we use the appropriate API to convert the JSON data to the correct target type before calling the method. Furthermore, it became clear that we can greatly cleanup the VariantArgument thanks to that. It now is reduced to just a QVariant wrapper class with an implicit cast operator to QGenericArgument. Change-Id: Ieaf60f548ea9584e7d760f9cd935da455787f376 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add declarative object-registration API to QML WebChannel.Milian Wolff2014-01-101-5/+5
| | | | | | | | | | | | The new registeredObjects list property is now preferred over the old imparative registerObject/registerObjects API. Items that are added to the list need an attached WebChannel.id property which holds the identifier under which the object is published to remote clients. Change-Id: I96a8047b9a85e27f3fd48c900180c22ebd20eb35 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify usage of QWebChannel on the server side.Milian Wolff2014-01-083-77/+38
| | | | | | | | | | | 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>
* Make test_property less flaky by skipping idle messages.Milian Wolff2014-01-081-8/+4
| | | | | | | | These messages are somewhat unpredictable in order and as such we skip them instead of relying on their order. Change-Id: I24c082ea1afe6ede1a8058195f01ffba1e6ca8e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify QWebChannel usage by merging webchannel.js and qobject.js.Milian Wolff2014-01-0810-65/+44
| | | | | | | | | | | The code now resides in a single qwebchannel.js file and there is only a single callback-nesting required to setup a MetaObjectPublisher connection. The server-side will be simplified in the next step. Change-Id: Ib5fc77a03c2b281c61af91713411eed571ec6108 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow running of QML tests without needing "make install" first.Milian Wolff2014-01-081-2/+2
| | | | | | | | In addition to these steps, the developer must symlink the qmldir from the source directory to <his build-folder>/qml/QtWebChannel. Change-Id: Ieb1131edc907c98d9ce9134760f14633b07eb080 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize: Use property-indices instead of names for notifications.Milian Wolff2014-01-081-0/+4
| | | | | | | | | | | | | | | 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>
* Cleanup: The QtQuick2 test does not need Qt += declarative.Milian Wolff2014-01-071-1/+1
| | | | | Change-Id: Ibd9a696a86939530cd08d57a9ef9cbeb3125bbd8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Optimize client initialization by using QJson directly.Milian Wolff2013-12-271-33/+99
| | | | | | | | | | | 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-273-35/+193
| | | | | | | | | | | 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>