| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This is again trying to reproduce the issue described in the bug report,
but it also passes for me. Still, it's good to have this tested in
more depth.
Change-Id: Ibaaefd7359d558c3b59af3d86a1260ab06caa598
Task-number: QTBUG-54074
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
It worked before, but this patch makes the code more explicit.
Change-Id: Id7cf90cb3e2488106e08077e9a8165112734dd88
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|