path: root/tests/auto/qml
Commit message (Collapse)AuthorAgeFilesLines
* 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 <>
* 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 <>
* Update license headers and add new licensesJani Heikkinen2014-08-269-162/+90
| | | | | | | | | | | | | | - 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 <> Reviewed-by: Milian Wolff <>
* 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 <> Reviewed-by: Simon Hausmann <>
* 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 <>
* 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 <>
* Enable the QML tests even when QtWebKit is not available.Milian Wolff2014-08-031-3/+5
| | | | | | | | The tests don't depend on QtWebKit anymore, so they should be run even without QtWebKit installed. Change-Id: Id60ebec861b29b73522fba670b1a0c19375cb826 Reviewed-by: Milian Wolff <>
* 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 <> Reviewed-by: Lutz Schönemann <>
* Refactor and streamline API and IPC protocol.Milian Wolff2014-07-296-358/+271
| | | | | | | | | | | | | | | 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 <>
* 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 <>
* 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 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 <> Reviewed-by: Oswald Buddenhagen <>
* Make the QWebChannel QML API publically accessible.Milian Wolff2014-07-159-8/+143
| | | | | | | | | | 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 attached property everywhere, independent of the web browser technology. Change-Id: I032a9326841d505c2f77959a240bbfc71e94b6e8 Reviewed-by: Sean Harmer <>
* Refactor code to use QWebChannelAbstractTransport and QtWebSockets.Milian Wolff2014-07-0419-394/+318
| | | | | | | | | | | | | | | | | | | | | | 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 <>
* 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 <>
* Add cmake test, adapt test directory layout and point to dev branches.Milian Wolff2014-07-0319-0/+1086
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 <>