aboutsummaryrefslogtreecommitdiffstats
path: root/src/webchannel/qwebchannel.cpp
diff options
context:
space:
mode:
authorArno Rehn <a.rehn@menlosystems.com>2021-08-18 13:46:11 +0200
committerArno Rehn <a.rehn@menlosystems.com>2021-09-27 15:58:16 +0200
commitd711fc874dacb2eeeed085dafc2a07d870cae8ba (patch)
treee09bab05dbf4a3d4f7746ed51d85d7db00360491 /src/webchannel/qwebchannel.cpp
parentc45b1c4f73ec70ce990574b66eff47cb94a80ea6 (diff)
Transparently handle QFuture<T> method return types
When a client invokes a method returning a QFuture<T>, QWebChannel will now automatically attach a continuation and send the contained result after the QFuture<T> has finished. [ChangeLog] Transparently handle QFuture<T> method return types Task-number: QTBUG-92903 Change-Id: I4069d51e79447dee249bb8af52a16e4496484093 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Diffstat (limited to 'src/webchannel/qwebchannel.cpp')
-rw-r--r--src/webchannel/qwebchannel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/webchannel/qwebchannel.cpp b/src/webchannel/qwebchannel.cpp
index 4752891..b268e95 100644
--- a/src/webchannel/qwebchannel.cpp
+++ b/src/webchannel/qwebchannel.cpp
@@ -66,6 +66,9 @@ QT_BEGIN_NAMESPACE
On the client side, a JavaScript object will be created for any published C++ QObject. It mirrors the
C++ object's API and thus is intuitively useable.
+ QWebChannel transparently supports QFuture. When a client calls a method that returns a QFuture,
+ QWebChannel will send a response with the QFuture result only after the QFuture has finished.
+
The C++ QWebChannel API makes it possible to talk to any HTML client, which could run on a local
or even remote machine. The only limitation is that the HTML client supports the JavaScript
features used by \c{qwebchannel.js}. As such, one can interact