| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
qt_examples_build_begin needs the EXTERNAL_BUILD flag
to know that it's safe to build examples as ExternalProjects.
It still won't do it in CI until we enable building
examples as ExternalProjects for prefix builds.
This is preparation for that.
Task-number: QTBUG-90820
Change-Id: Iac796ee2dc02215bfe71bddf5931af09426cc47f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 9b57b22c053591ef263036a5f0be9b558841236f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-90820
Change-Id: If6e6713058cfd4f7940e99261eca658ddb604b36
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 7fd5d81261b195de475b436689a59e047bbd73ce)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
If an example contains ui.qml it should also have
a .qmlproject file for Qt Design Studio.
Change-Id: Iaa399b5d36f429d84e8844ec3813a65d729dd03a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
(cherry picked from commit 69cf633cef93b65cad50c180b9099a79ac5539f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Removed the import versions
- Changed the implicitly defined properties in Connections
- Ported qmls to Qt6
- Dialog icon support is incomplete, so no icon in Dialog for now
Change-Id: I2dab3a0e715d447004aa408476bcfd638599b012
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
(cherry picked from commit d42770a9fda2e00617e6f4c2452156b9b9cafd03)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-95636
Change-Id: I821f412f9dbe11ae99ffd888a7ab2ba415ed9379
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 87a9fb2887bbaee76c5b7ae81fd9d3eb2b3b49a4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
| |
Change-Id: I7973833fa7b4000cb8f6e1a1fc0a8c560fe16a3b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Regenerating and fixing as needed.
Fixes: QTBUG-90661
Change-Id: Ief9f044d4b9ea2ce8130b11031fb93b6e673fbdd
|
| |
| |
| |
| |
| |
| |
| | |
Change-Id: Ibdadef34b1b7d4ea98140feed171c409eb8bafde
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-78190
Change-Id: Ibdfbcb479ce1af6370b9148516cef6f64e7c1abb
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If changes are made to the connections while iterating over them
during an emit, these new changes should be ignored until the next
emit. If not, the following things could happen:
* newly added connections could be called for the current emit
* an existing connection may not be called at all
New connections added to the list are already ignored because forEach
caches the length before processing an array.
However, if an item is removed during forEach, the current index is
not adjusted, which will result in next item being skipped if the
removed item is before the current index. This is dealt with by creating
a new list during disconnect with the diconnected item removed. This
way the list that forEach uses is not modified.
This logic is slightly different than QObject, which uses a linked list.
If handlers A and B have been attached to the same signal, and handler A
disconnects handler B, handler B would still be called, even if it was
connected after handler A, which is not the case for QObject. A more
complex solution may be required if this behavior needs to match
QObject.
This also removes an error message when disconnect fails to find any
matching connection. This more closely matches QObject.
Change-Id: Ief04426a962362055022f450d9767d4b5fe152a1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\ \
| | |
| | |
| | | |
Change-Id: I869a1681af76b2591e84e905a2e376507693b6e4
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QDoc no longer treats example file pages as linkable targets. Remove
the link command.
Fixes: QTBUG-79810
Change-Id: Iac92e8007b7618345031617b8039e300328d21a3
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\| |
| | |
| | |
| | | |
Change-Id: Ieea84fc74092755b0265a26cfb2a43590fa39757
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'for..in' construct iterates through enumerable properties meaning that
user added properties to default type's prototype (like Array.prototype.first)
are also included. Proper usage involves 'hasOwnProperty' but is not as
clean and generally discouraged by popular style guides in favor of
'for..of' and 'Object.keys' and higher-order functions like 'forEach'.
Adopt them for iteration to fix unexpected property warnings.
Fixes: QTBUG-50999
Change-Id: Ia0846b0c5a2c34f5ee6f1dcb82198cb3946a95f1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Amends split of classes from 13294ce605
Fixes: QTBUG-75221
Change-Id: I9491fc59a76974c7a9e4784526ac8c2ba729edd7
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |/
| |
| |
| |
| |
| | |
Change-Id: I6b3f771eea2d92f0c3a7d05eeb13cf0b3d8b1ef4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This converts QObjects that are embedded inside ECMAScript objects
into the actual QObject that they represent.
For example, if an array of QObjects is passed as an argument to
a method, the method will received a QVariantList where the
items are QVariants of type QObjectStar.
Method:
void processObjects(const QVariantList &list);
Call from ECMAScript:
theObj.processObjects([qobj1, qobj2])
Prior to this patch, the method would have received a list
containing QVariantMaps with keys from the QObject EMCAScript wrapper
(e.g. __objectSignals__, __propertyCache__, etc.).
After this patch, it will receive a list containing QVariants with
QObject* inside.
QVariantMaps are converted to QObjects if they have a property
called "__QObject*__" set to true and an "id" property.
"__QObject*__" is the same identifier for retuned objects and is
now added in a toJSON method at the client.
Change-Id: I5cafcddb9df0141977a574aaed4ce7c3ea2d0767
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|\
| |
| |
| | |
Change-Id: Ia830dee20e2674c73551319be153ec3e638b5b0e
|
| |
| |
| |
| |
| | |
Change-Id: I788cca691fd3a0b4542bad9ef05ef40404a42840
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This returns a Promise if Promise is supported and no callback
is provided. The Promise resolves when the function call succeeds,
or rejects when it fails.
Change-Id: I529f5c2c0ff8997820f3d1b4d4b364cd8521e9b5
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an object is initialized, QObject properties are properly
unwrapped. However, before this patch, updates made to QObject
properties were not unwrapped and thus could not be used from
ECMAScript.
For example, given a property defined as such:
Q_PROPERTY(QObject* theProp READ theProp NOTIFY thePropChanged)
The property "theProp" is correctly unwrapped when the parent
object is created. However, it would not have been unwrapped
when "thePropChanged" is emitted. This patch corrects that.
Change-Id: If8f67560d9fb2a4bd909d2ab30305ceab30f8d31
Reviewed-by: Simon Hausmann <simon.hausmann@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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We only disconnect once when all signals are disconnected, so we
should also only connect at most once per signal.
Change-Id: Ib3a866c3942bec5e06e3b301315bc83cdb972fab
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
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: I054299ae46364d37655db76d533432ad84372a7c
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
| |
This amends change 13294ce605751babad0687e63c033436d129e3d2
Change-Id: I1e819a5d952329985741a558aef47e50a4bd5e7e
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: Ibebe78a8bf2ec0147ece31c5895a78415f12c855
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
| |
If the socket is closed the error was so far written to a non-existing
element. Show a modal dialog then, instead. Also, do not make the
login window visible until we have established a connection.
Change-Id: I5045f8583a396f22b751e65b8bb73c609b51c9be
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: Id4e4cabe429f00360d1f357183cfbe0ac1ebb5ef
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
| |
Let's promote the newer version also in the examples.
Change-Id: I903e2aab0bff6fa397c5d35d44b88ee947851f58
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Follow http://doc.qt.io/qt-5/qml-codingconventions.html
This does not change behavior.
Change-Id: Ic0e9aa20e9954cd459c4e0b59b67eadcaebd4e47
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: I3499bfa49e79ed3664d020f7de0e691afeb15a86
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: Ie58e8914415f42b0b4d52106b343e152ba9e7565
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
| |
See also https://wiki.qt.io/Writing_Qt_Examples
Change-Id: Ife2300b9f1a074e9dc418d53f8c47138129b0cc7
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: Ifdd0a9117bc354c342728949e45d1ac431495ef4
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: I33aa6f8244770bf19b45f69cfc62a5469168418d
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
| |
Every C++11 compliant compiler has to support it.
Change-Id: I143647aaeba6d49f9ab48abaffad0d77a8abbffd
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
| |
Examples are not compiled with QT_NO_KEYWORDS.
Change-Id: I6bff2b4cc46bd53ef2f1879951e59089734a3864
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: I93688ed891e1cdd6815af0ea22507190c34c0bba
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
| |
Change-Id: I0806cb50a46da19e3538855b348cbdaa2c4f96e1
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
|
|
|
|
|
|
|
| |
Instead just wrap forward-declared Qt classes.
See also https://wiki.qt.io/Writing_Qt_Examples
Change-Id: I3707bb6ee5577e49a6b860e8f1c21b6aaf6405c2
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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)
|
|\|
| |
| |
| | |
Change-Id: Ica9ff8d7142c5bd5328d44505beb8c22b4c21766
|
| |\
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
Change-Id: I52dc7e8ad7a9ce6fa36ad2d6ce5d8ea29b77b400
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ic3979ec70b7ddf7d01d0873c00b7739c5f0ef3c9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Iccf9f6e0e9358ba42576fb67a0b356c7414d911e
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I38ddf1dd4af4e350a11288eebdfd3c3ee1dc5fe9
Reviewed-by: Milian Wolff <milian.wolff@kdab.com>
|