| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
|
|
|
|
|
|
|
|
| |
The JavaScript API page is important to the rest of the documentation
but there was no link to it.
Task-number: QTBUG-40756
Change-Id: Id741a67ac2b57e21da548c2961c622c7516ac8cf
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
As the examples include files with extension that are not
included in the global Qt documentation config, add them
to the module's .qdocconf to get the files listed in the
example documentation pages.
Change-Id: Ifc3bf473b67d6acc795ce3f951f0c5269d69b69c
Task-number: QTBUG-40831
Reviewed-by: Milian Wolff <milian.wolff@kdab.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>
|
|
|
|
|
|
|
| |
qwebchannel.h:60:101: error: extra ‘;’ [-Wpedantic]
Change-Id: I7623b68ace59431266ca6a48bfa23bc306363e7e
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
| |
-added 'qtdoc' to the depends variables in
qtwebchannel.qdocconf file
Task-number: QTBUG-40756
Change-Id: Ida3e1aa1237bcd91f0280d1969c2361f4ee70405
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: Ic51555b34823354092a5a4e8583c51d50a1aded8
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To fix issues related to example documentation and to follow Qt
convention, do the following changes:
- Rename examples/qwebchannel to examples/webchannel
- Move example-specific documentation to correct location(s)
- Include generic 'Running the Example' instructions
- Add the module name to example title, fix links
This ensures that example docs are built and the example manifest
file generated correctly.
Change-Id: I284e0b13db95a6738d72258735018b59156cc7da
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
If QtWebChannel is used with a synchronous transport it can
happen that the clients idle state is wrong because the clients
idle message is received before the idle state is set to
'false'.
This patch changes the order of setting the idle state and
broadcasting the property update message to avoid that problem.
Change-Id: I7762b5279febb99d3cb2e110ec9306596fc71e14
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>
|
|
|
|
|
|
|
|
|
|
| |
This is a small sample of a command line chat client which
shows how to use QWebChannel with NodeJS.
See included readme for instructions on how to execute it.
A known port has been introduced to make this work.
Change-Id: If430703f8c2267df758df9d5978509675c8aea9d
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Install qwebchannel.js file and also copy it to the build dir.
This makes the examples subdirectory self-contained and useable when
compiling it from the install directory. Making individual examples
self-contained would cause too much code duplication, so it was not
done.
Change-Id: Ifeb5eac7d05b92779d24cb4da413f3fb173f992d
Reviewed-by: Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
|
|
|
|
|
|
| |
Change-Id: I66b102f0076d8ab39f871ce2be300a1e33228eac
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
| |
These issues were raised by Sze Howe Koh in code review 89965 of
change I259c204e. This change set does not yet include any comparison
to the old Qt WebKit bridging functionality. I'll hand this in later.
Change-Id: Idc7df0e02bfcda3c3fcf1a4e147c1dfac4f18a64
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using stringified pointers to identify
objects this patch creates UUIDs (version 4) for
every object that get's wrapped by QMetaObjectPublisher
Especially when using QtWebChannel to publish an
interface to the network it comes to the point
that you don't want to publish internal memory
addresses
Change-Id: I7e3fec7497d63572cfba72a5dacc10542aef415c
Reviewed-by: Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Michael Bruning <michael.bruning@digia.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>
|
|
|
|
|
|
| |
Change-Id: I0a0e05cf1a6e36a7c9b26dfbe5fc083cd5d0ad2b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I908f06bdcea1dfa422cf70817df48cdb1d290690
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Please proof-read it and tell me what needs to be improved. I assume
most people will probably not use the QWebChannel directly. Rather, they
will only consume its features indirectly through the integration in
QtWebKit/QtWebEngine. Thus the documentation here is for QWebChannel as
a library. User-end documentation should be added to QtWebKit, I think.
Change-Id: I259c204e24331271b8dc74ea11695988234a79d3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.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>
|
|
|
|
|
|
|
|
| |
The module.export allows qwebchannel.js being included and used from
within a nodejs environment.
Change-Id: I3db6ba85e8d3406031c0262815e50aca0f214ace
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
| |
QWebChannelPrivate was declared as struct, even though it is defined as
class later on. Clang emits a warning in such cases.
Change-Id: Ia5988d229d41f02493035e2502955e92079f2baf
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
| |
This module will be shipped with Qt 5.4.0, so set the version
accordingly. Furthermore, the warning_clean flag is added to CONFIG.
Change-Id: Id8936dc496bf585f838842bcc29fff238523927b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
|
|
|
|
|
| |
Change-Id: I700f1e1d6508dd4d861bec4f5aa15b666d6eecc0
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
__define[SG]etter__ are non-standard.
Object.defineProperty is the standard way to do this.
See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__
Change-Id: If58e420fe84ef2fbb005838955fabf9d96f225b0
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
| |
This fixes builds with Qt built without the widgets module.
Change-Id: I280b1443c3333d9d199d0b4fe7ee43bffb9c5e6e
Reviewed-by: Simo Fält <simo.falt@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 useful for integration into QtWebKit.
Change-Id: I80d79c0ed8a627d62ee45090d7bceca22fdf56ce
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
|
|
|
|
|
|
|
| |
It is not required anymore.
Change-Id: Ifb76ed515193591a09a81b73edee12703d16d04c
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The utility QWebChannelAbstractTransport implementation based on the
QtWebSocket has no big value. Instead, it would pull in the QtWebSocket
link-time dependency into QtWebKit/QtWebEngine, which is not desired.
Considering that the WebSocket usecase is minor, and only few people
will ever use it, we agreed that having the code in the example alone
is enough.
Change-Id: Ica038329a1d684f33e805fc296e9dff71b1446ba
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.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>
|
|
|
|
|
|
|
|
|
|
|
| |
Do not ignore all .* files by default, if there is any file that
should really be ignored then it should be added explicitly in
the future.
Change-Id: I94a6524d05d87745c8a197e1142a60bf70d17f16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
The former was just the private implementation of the latter. This way,
the code structure is more understandable to newcomers and follows
existing best-practices.
Change-Id: I07cf64370553f4c2de349b5f01e90b31112fee58
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Add space between type name and & or *.
Change-Id: I64bfe20510cb43ee0a0b6e08bd433fc657e925a0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
| |
Change-Id: I92c5b00d5bbcc08a241ed0382c13b6bf2676ca6f
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the custom WebSocket server implementation and replaces
it by a dependency on the QtWebSockets module.
Sadly, the QtWebSocket module does not yet support custom protocols.
Also, there is quite some boiler plate code required, something which
I want to simplify upstream in the QtWebSockets module later.
Change-Id: I8066418fb1857d23b8593c443bc9a98ded917a99
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
|
|
|
|
|
|
|
|
| |
The transport interface should outlive the web channel or unregister
itself before being destroyed.
Change-Id: I77eaa26a4e1985d83cc3f19d07830cf0ca48ee7c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This text can then be used in the future for proper qdoc integration.
Change-Id: If75b98c0aa1aa131b52542c97a5c2bf382171729
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|