| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Modify all the qmlRegisterModule calls to use minor version 15
because minor version zero from 6.0.0 would make tests fail.
This is similar to what was done in qtdeclarative in
c147b20a2c1299b2d659fe7c9472ae3866b6a425.
Change-Id: I1a59d179d4b547bd8050f31a3edfef660db442be
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
| |
Also fix usage of text stream operators.
Change-Id: I5cca2a07a8f95d4449a528aa0e8ca98c94dda40c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/webchannel/qmetaobjectpublisher.cpp
Change-Id: I853b8fc7270847c1a9cdd862dff278ddb2533e92
|
| |\
| | |
| | |
| | | |
Change-Id: I182d51367aed4518f5bbc247e4e517af09028f7a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, QVariant::toList() was used to convert a QVariant to a
QVariantList. This only works for actual QVariantLists and QStringList,
however. This patch uses QVariant::value<QVariantList>() which works in all
cases.
A better approach would be to extract a QSequentialIterable, but QTBUG-42016
currently prevents this.
Change-Id: I732cc88a6db2ec5d990760364a9db98a52521f6b
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: I8b70f062015311e0e3827fe001155d6ce1e146d2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This follows what was done in d28c9f6a for Qt Quick Controls 2.
The latest import version (e.g. 1.14 in Qt 5.14) will automatically be
registered whenever the Qt version is bumped.
This avoids needing to wait until a new type is added (or a new
revision is added to an existing type) before being able to use the
newest Qt Quick version.
Change-Id: I2570c2bc50c629101adb763e5e5f90bc3ded8bac
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: Ida698daaae6d184137358ee49fa2d27b6654d8b3
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-73739
Change-Id: I475d01064a76d73641ac8717cc51133863d22507
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- add documentation to parameter \a objects
- correct link to example code
Change-Id: Idedfd749dad01315ee0073ca5a87399b9fa30d70
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This implements host-side overload resolution. If a client invokes a method
by its name instead of its id, the overload resolution tries to find the best
match for the given arguments.
The JavaScript client implementation now defaults to invocation-by-name, except
when a method is invoked by its full signature. In that case, the invocation
is still performed by method id.
Change-Id: I09f12bdbfee2e84ff66a1454608468113f96e3ed
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When a new transport is accessing a previously wrapped object, we used
to send potentially outdated property values.
[ChangeLog][QWebChannel][General] Send current property values when
another transport is accessing a previously wrapped object.
Fixes: QTBUG-62388
Change-Id: I5cd5772b42c3cb9860e945bb85f77f0e3b6d6ea0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, we only published the first method or signal of any given
name. We keep this behavior for the nice JavaScript notation that looks
like a normal JavaScript method call `foo.bar(...)`. When you need to
call a different overloaded method, this patch offers you to specify
the explicit signature on the JavaScript side. I.e. when we have an
object with `foo(int i)` and `foo(const QString &str, int i)`, then
on the JavaScript a call to `obj.foo(...)` will always call the first
method like before. But now you can specify the full QMetaMethod
signature and call matching methods explicitly via `obj["foo(int)"]`
or `obj["foo(QString,int)"]`.
Automatic overload resolution on the C++ side for the nice notation
cannot easily be implemented: We need to know the return value of
the called function, otherwise we cannot construct a valid
QGenericReturnArgument. Furthermore, we wouldn't be able to
differentiate between e.g. any numeric types on the C++ side, since
JavaScript only has a single `double` type internally.
[ChangeLog][QWebChannel][General] It is now possible to explicitly
call overloaded methods or connect to overloaded signals by specifying
the full method or signal signature in string form on the JavaScript
side.
Fixes: QTBUG-73010
Change-Id: I4645edee97af56fd8d126e77d70dc33ed3513deb
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \ \
| |/ /
| | |
| | | |
Change-Id: Ife028425ea8c14d972c2df59071a9333352af7d1
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/webchannel/qmetaobjectpublisher.cpp
Done-With: Arno Rehn <a.rehn@menlosystems.com>
Change-Id: I763a76cf055547c5c5e59511ded51c467d6c7526
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes a crash: Previously, when a connection was closed, the transport
was not removed from the list of transports of a wrapped objects. This
was because the transport was not added to the transport-to-object map
in the first place. When a property update was pushed, the now dangling
pointer to the "old" transport caused a crash.
Change-Id: Ib980f0b874851f8f85f7a3d76d51a2c884504b96
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, only implicitly wrapped objects have been successfully
unwrapped. "Officially" registered objects were not, and thus could not
be passed to properties or as method arguments.
Change-Id: I6b8644ed3be8db3a66c2c1d5bc167fc33a0b4165
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QObjects that are present in an array are already converted to
an object identifier. This does the same for variant maps, which
end up as ECMAScript objects.
This allows QObjects put into a QVariantMap to be properly
deserialized. For example, if a property is declared as such:
Q_PROPERTY(QVariantMap propName READ propName CONSTANT)
And propName is:
QVariantMap propName() const {
QVariantMap map;
map.insert("theProperty", QVariant::fromValue(someQObject));
return map;
}
The "theProperty" property will now properly refer to the object.
Change-Id: I3c6e71b860f6825a31eb337aeffa55302287c8ff
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| |/
| |
| | |
Change-Id: I6b83cc26dddfafe3bebe1bfb3640e2daf2d9a8fb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, enums declared with Q_ENUM were stringified in the
conversion to JSON and QFlags did not work at all. The conversion of
QJsonValue(int) to enum worked fine, however. This patch implements
some extra logic for detecting enums and QFlags, thus correctly
converting to and from integers.
[ChangeLog] Enum values and QFlags are now correctly converted to and
from integers in the JS interface
Fixes: QTBUG-72924
Change-Id: I23d4a1120b805201c8d450edbd990aad5ad258a2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The warning was not meaningful, since nothing depends on the notify
signal having only zero or one argument(s).
Removing this decreases warning noise in some applications.
Change-Id: Ieb716ad9ac51296a1e17899018d4e6190043b8d5
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an already-wrapped object was used by a secondary transport, the
mapping was not updated. This could then lead to crashes when the
transport was destroyed.
[ChangeLog][General] Fix crash when wrapped objects are
shared across multiple transports.
Task-number: QTBUG-62388
Change-Id: I3c3b7302205e10f04695f1a202325704d90950d2
Reviewed-by: Kai Dohmen <psykai1993@googlemail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
| |
This patch fixes the runtime warning cought by UBSAN:
src/webchannel/qwebchannel.cpp:84:96: runtime error: downcast of address 0x6030001b1570 which does not point to an object of type 'QWebChannelAbst
Change-Id: I9c78f94bc97961ef69b71ecca8a9301d81feaf3a
Reviewed-by: Kai Dohmen <psykai1993@googlemail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
|
|\
| |
| |
| | |
Change-Id: I4feece283bd40e002a62ddd2d8186d8bec9a16df
|
| |
| |
| |
| |
| | |
Change-Id: I039e3a47ca2c3889c3272f81fafb3997777881f6
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| |/
| |
| | |
Change-Id: Ic6bc4e3c041985294d86cb9b2d9bf020310654a6
|
| |
| |
| |
| |
| | |
Change-Id: I7ef0f2d7c760fcb4016e925ae5cd94fc158b53a6
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|/
|
|
|
|
|
|
|
| |
After commit be9a56e5e3ced5d0d668fa24e4c65ae928f2e25a in qtbase, this is
not needed anymore. Instead the resource system injects the plugin entry
point with a reference to all resources.
Change-Id: Iffca1036a6dd2928d4eac89762e102f99ce7dd1a
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/webchannel/tst_webchannel.h
Change-Id: I454c1bbab153405541e7fc41d1389a810b94f2db
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A real-life use case is the session restore page in KDE Falkon or, more
generally, any kind of closeTab() method exposed to JS in a QWebEnginePage.
The approach taken in this patch will only work if the transport can also deal
with deletion during a messageReceived signal emission. Alternatively, method
invocation could be delayed via the event loop, but this would come with an
obvious performance penalty.
Change-Id: I2940f61e07c77365f6e3e7cd29463d4cb5b525a6
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| |/
| |
| | |
Change-Id: I5fb1c52b54156c53719734fae7625dd7e1941fed
|
| |
| |
| |
| |
| | |
Change-Id: I5a200b078a6d3485cd6277f79902aca8021b6770
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| |/
| |
| | |
Change-Id: I0b7d3d5789c0c3ef11d96c83c3f61d0de65f3593
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
| |
Change-Id: I8661063408d17c80a04433beda595061e89b5ba8
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>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since commit 709f6370884b110def2e4665df8fa7bbf5fae734 the plugin loader
is strict about requiring the correct interface id, to avoid loading
unrelated plugins in the loader thread (which they may not be prepared
to do).
Change-Id: If86aec735525d2fd169d2d3fae451316f656f238
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|