| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: I5a200b078a6d3485cd6277f79902aca8021b6770
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
| |
Highlighted examples will show up prominently in the Qt Creator Welcome
screen.
Change-Id: I59f55ff9e3e7ff737dcbe22b9265eb7149588358
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qwebchannel.js is used by examples, which so far tried to copy it
directly from the library source directory. However, in the case of an
installed prefix build of Qt, the library sources are not available.
This patches therefore moves the qwebchannel.js file to the examples
directory, which is installed including sources.
The obvious alternative would be copying the file inside the source tree,
but that causes code duplication and a maintenance burden that we want to
avoid.
Another alternative would have been to install qwebchannel.js into
QT_INSTALL_DATA, or extract the file at build time from the Qt library.
However, this requires bigger changes, and is also dubious because the
use case are in particular applications _not_ using Qt.
Task-number: QTBUG-57654
Change-Id: I96bc93b6e3d248e4b4facdd582d9fa53ae562924
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch e354bdc5 introduced a regression that triggers a crash
in Qt 5.9 when returning a type that is not implicitly convertible
to QVariant, such as a QJsonValue, from an invoked method/slot.
This patch fixes this situation and adds proper unit test coverage.
Change-Id: Ib8cb0c96e7496bc8dc9a628245d7a44e4234aff0
Task-number: QTBUG-62045
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Kai Dohmen <psykai1993@googlemail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
When an object is deregistered before the signal handler got
initializated, we asserted. Now, we check for this case and skip the
signal handler removal when it wasn't set up yet.
Change-Id: I7abad204cbab72be7729d42f58ce63babd2310d8
Task-number: QTBUG-60250
Reviewed-by: Kai Dohmen <psykai1993@googlemail.com>
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
|
|\
| |
| |
| | |
Change-Id: I09a494a9b94ce169d60e77f4bffa8845db01293a
|
| |\
| | |
| | |
| | | |
Change-Id: Ib8b5300d27583018bc7582be41140dfda0ab5309
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Switches the signal listener in QWebChannel from using
Qt::DirectConnection to Qt::AutoConnection to relay signals
from QObjects in different affinities than the QWebChannel.
Also adds a unit test in testAsyncObject() to verify that
QWebChannel no longer crashes when receiving such a signal,
and that such objects can be added and removed dynamically.
Task-number: QTBUG-51366
Change-Id: I51a4886286fec9257a21ea95360c1ea8889a584a
Reviewed-by: Dave Andrews <jetdog330@hotmail.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Use QMetaMethod::invoke without a return for void method calls,
which allows making asynchronous method calls onto QObjects in
different affinities than the QWebChannel that's emitting them.
Also adds a unit test called testAsyncObject that intentionally
places a QObject in a different affinity and then tests calls
into it from the QWebChannel's synchronous publisher.
Task-number: QTBUG-47678
Change-Id: I6c35ee54f764c0fc1b0431fb0774aa7e75039abf
Reviewed-by: Dave Andrews <jetdog330@hotmail.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |\ \
| | |/
| | |
| | | |
Change-Id: If2a4f50d03fccc2654b8336d9e40daea85d6adca
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added a QMultiHash which maps transport objects to wrapped object ids.
transportRemoved iterates over all matching wrapped objects and removes
the passed transport object from their transports-vector. If the
transports-vector is empty after removing the passed transport object
the objectDestroyed will be called on the wrapped object.
transportRemoved will be called either on the transports destoryed
signal or on disconnecting the webchannel from it.
Without this changes the QMetaObjectPublisher::wrappedObjects and
::registeredObjectIds would only be cleaned up if the website calls
deleteLater on QObjects but not on website reloads.
Task-number: QTBUG-50074
Change-Id: If294564fee2406edd7fb578852aeb269cac23a92
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
(cherry picked from commit fa2374d7c4dedea907e2df26fdad28bdee73b122)
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/webchannel/doc/src/index.qdoc
src/webchannel/qwebchannelabstracttransport.cpp
Overlapping changes to documentation; constructed hybrid.
src/webchannel/qmetaobjectpublisher.cpp
tests/auto/webchannel/tst_webchannel.cpp
tests/auto/webchannel/tst_webchannel.h
Both sides made additions; in the same place.
Change-Id: Iff12970978b70946dc3e1290841aca2d35c9c1d0
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
You don't need the type name for linking within the type docs.
Also, the convention in QML and Qt Quick is to use a period and
not a double colon.
Change-Id: Ic93bae51e766ef782f089ce69dc4e54a712445c6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
And fix a typo "connectect".
Change-Id: I14c4b249af3cad142a5f6042b2059f653a9c3eae
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For consistency, the first verb should be in 3rd person
singular form.
Change-Id: I5e24ecbbac1b1ab85e737f127b021f24a55c8dd4
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
-Remove references to Qt WebKit
Change-Id: I0bd184021b1a87828e93f5783c38b9ba97f37763
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Remove reference to Qt WebKit
- Add Getting Started section
- Use standard section titles for API Reference
and Examples
Change-Id: Ie5e3ac792a109f680132a79e86d5e1065f4c3829
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add images to the examples.
- Add instructions for running the examples
- Edit for grammar and style
- Add dependencies to Qt WebEngine and Qt WebSockets modules
- Add a workaround for preventing autolinking of WebChannel,
WebEngine and WebSockets to the wrong targets
- Use explicit linking where necessary
Change-Id: Ia4025284063fa09c9e2a0b2c347ee682bba8a615
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Add images to the examples.
- Add instructions for running the examples
- Edit for grammar and style
- Add dependencies to Qt WebEngine and Qt WebSockets modules
- Add a workaround for preventing autolinking of WebChannel,
WebEngine and WebSockets to the wrong targets
- Use explicit linking where necessary
Change-Id: Ia4025284063fa09c9e2a0b2c347ee682bba8a615
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
(cherry picked from commit 01ea92c7c8d77d3d3c10ab1cc4bf4f214aa07126)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added a QMultiHash which maps transport objects to wrapped object ids.
transportRemoved iterates over all matching wrapped objects and removes
the passed transport object from their transports-vector. If the
transports-vector is empty after removing the passed transport object
the objectDestroyed will be called on the wrapped object.
transportRemoved will be called either on the transports destoryed
signal or on disconnecting the webchannel from it.
Without this changes the QMetaObjectPublisher::wrappedObjects and
::registeredObjectIds would only be cleaned up if the website calls
deleteLater on QObjects but not on website reloads.
Task-number: QTBUG-50074
Change-Id: If294564fee2406edd7fb578852aeb269cac23a92
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: Ica9ff8d7142c5bd5328d44505beb8c22b4c21766
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I52dc7e8ad7a9ce6fa36ad2d6ce5d8ea29b77b400
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Examples in binary packages now directly match the install path.
Change-Id: I06c85e42d312bd6a1e1ae619330676b717b6ccbd
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ib651958ec7aa12eb205a11a515fa9a464e254bd0
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I8da406c190ed3e3f925c50ede6c7b845033837b9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|/ /
| |
| |
| |
| | |
Change-Id: I50b0bfde043596a75dd28a93098a5543587fd581
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| |/
| |
| | |
Change-Id: Ifb2b9cc762b5c75f1ec3bf47c607906fdfef9bd1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... or equivalent.
QtBase 5.6 headers already compile that way, so let the other
modules follow suit.
Change-Id: I972f844bd5845f4d7d88a14ff1b358c8c2b2643d
Task-number: QTBUG-45291
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
this fixes static builds by ensuring that all dependencies are exported.
Task-number: QTBUG-51071
Change-Id: Ibf63974f6b989abb6c7967a74ff770af09bab114
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I42bfb38e5a9bf03b43636309fe9e29e8d772bb06
|
| |
| |
| |
| |
| | |
Change-Id: I34bcf2e4a2d66c9cb126c2edae79a45064b82a67
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The examplesinstallpath variable in .qdocconf files defines the path
under QT_INSTALL_EXAMPLES where examples are found.
To match the way examples are packaged in Qt 5.6, prefix the
install path with the repository name.
Task-number: QTBUG-48736
Change-Id: Iafb0663b319f97d2fa3e8f938e4546ae11eaaa69
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|/
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: I2fe282e6b9d52f9635cd69e3e8de53724cbb8b0a
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/webchannel/qmetaobjectpublisher.cpp
src/webchannel/webchannel.pro
Change-Id: Ia573d780424399a8fa6e5a809148c888b223446a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since QJSValue is part of the QML module then it should check if that is
available before using it so we add a QT_NO_JSVALUE define to help with
this.
Task-number: QTBUG-46850
Change-Id: I1974518a5c134dbb8508a46505b43c820a7a700a
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Uniformly use the <Module/class.h> style, like
https://wiki.qt.io/Coding_Conventions
mandates.
Change-Id: Ia2de5fb5ba4e3229c614c204d43349bd7fcbeaab
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
When we build without qml module we cannot use QJSValue in
qmetaobjectpublisher
Change-Id: I79d06d8cc6d43fdad57cbab17ebc1756444a7311
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: Ia5b809f6aeaa29c6acd6f45b696da285fe06b5f2
|
| |
| |
| |
| |
| | |
Change-Id: Ib45c48613c687fdfcafd121ed9d4932cbc116799
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The issue is that objects that get deleted will not be
removed from the internal lists.
This patch checks for destroyed signals in cases when
no transport is available (no connection established).
cherry picked from commit 037c67962de3d74669c55a9db456ffd38a28480f
Change-Id: I24e345dcbfe88e15031d288eb65abb2c3066d4c0
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|