| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
It seems we never stated that singletons can not be extended in our
documentation. Therefore this is technically a bug fix and doesn't need
separate documentation.
Change-Id: I7877289bd5a52ecf709f80ba1975137981ec65f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
As you can extend value types with QML_EXTENDED we may as well allow a
factory function in the extended type. Furthermore, if the original type
allows construction from QJSValue, we may just use that. In turn, we can
get rid of the value type providers now.
Change-Id: I9124ea47537eab6c33d7451080ab2fff942eaa7b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This avoids the template explosion and makes the mechanism extendable.
You can now register additional anonymous sequential containers.
Fixes: QTBUG-71574
Task-number: QTBUG-82443
Change-Id: I5b9ed9af1533a3b7df8fc5bb37bbb73b8304e592
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You can now have an extension object on a value type that offers
additional properties. This is how we model the QtQuick value types. It
allows us to retrieve the extension's metaobject without using the
virtual functions in the value type provider.
As before, this mechanism is still rather dangerous and not fit for
public consumption. It relies on the extension object having exactly the
same layout as the original value type, and it hides any properties the
original value type might expose.
Furthermore we enforce now that gadgets should have lowercase names.
The ones that didn't before are split up into an anonymous value type
and a namespace that contains all the addressable bits.
Task-number: QTBUG-82443
Change-Id: Ic93d6764538d6ccc0774b3c5648eee08ba0939c0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
As documented in Qt 6 porting guide, qHash() should now also
accept a size_t as seed in addition to returning it.
Change-Id: I2b3ea26f631203468c071fa6ff65f95d82566132
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QML] The deprecated functions qmlAttachedPropertiesObjectById
and qmlAttachedPropertiesObject(int *, const QObject *,
const QMetaObject *, bool) have been removed. Use the
qmlAttachedPropertiesObject(QObject *, QQmlAttachedPropertiesFunc, bool)
overload of qmlAttachedPropertiesObject instead.
Change-Id: I6bc8315557733dc2f51b2ffdebeec51873b74b2b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
This is needed in order to remove PySide2's qml type limit.
Change-Id: I331d9e31574a744eb9085222d58ea8a8789e0e31
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
| |
Else on Windows there's a warning:
conversion from 'size_t' to 'uint', possible loss of data
Change-Id: Ifed4899409a13fed31c206ae1e0f195280ee2925
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
It does not modify anything.
Change-Id: I88630ba60c6123fc6dbc78d7e74225c8d3d01345
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ic0c768fc2402d8674e06e84dfe4dc90d05407167
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-82453
Change-Id: I7e5682945a07c3af183becd3947a69568f139d16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In many places we carry major and minor versions or revisions that are
loosely coupled to minor versions. As the Qt minor version resets now,
we need to handle these things more systematically. In particular, we
need to add a "major" part to revisions.
QTypeRevision can express the current major/minor pairs more efficiently
and can also be used to add a major version to revisions. This change
does not change the semantics, yet, but only replaces the types.
Change-Id: Ie58ba8114d7e4c6427f0f28716deee71995c0d24
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml] It is now possible to declare new QML components in
a QML file via the component keyword. They can be used just as if they
were declared in another file, with the only difference that the type
name needs to be prefixed with the name of the containing type outside
of the file were the inline component has been declared.
Notably, inline components are not closures: In the following
example, the output would be 42
// MyItem.qml
Item {
property int i: 33
component IC: Item {
Component.onCompleted: console.log(i)
}
}
// user.qml
Item {
property int i: 42
MyItem.IC {}
}
Fixes: QTBUG-79382
Change-Id: I6a5ffc43f093a76323f435cfee9bab217781b8f5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is probably faster and avoids the deprecation warnings stemming
from deprecated functions calling themselves recursively.
Task-number: QTBUG-80040
Change-Id: I2f65aad3bc7f85b7a7de66d3e76dac1233a58db8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
If we have already set up the enums from a property cache or a
metaobject, respectively, we can see that from the flags. Retrieving the
composite property cache is expensive and we can skip it in that case.
Task-number: QTBUG-77237
Change-Id: I63f5e1ca0fc166ec927754bdf5d166b2ce8ff0f6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
| |
QQmlType::superType() is a private method that isn't called from
anywhere.
Change-Id: I5aa291b44c0cb72f8cf46ef765d4742496482477
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changes enables passing stateful lambdas to
qmlRegisterSingletonType, which helps when porting away from
setContextProperty.
Unfortunately, we cannot directly add an overload for std::function, as
this causes ambiguity in the overload set when a lambda of the form
auto f = [](QQmlEngine*, QJSEngine*) -> QObject*
is passed to the function (which is what the examples do)
We therefore use a template to support abribtrary callables f, then SFINAE
them out if f is not convertible to the desired std::function, or when
f is convertible to a plain C function pointer, thus removing the
ambiguity
Change-Id: I6ca95ad692d8bb785e420b85bf3d8c1d0007ce17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-75176
Change-Id: I969e7987ebf8b98aed9ba9e17388a0e168ef5e09
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Singleton object instances were previously managed by
QQmlType::SingletonInstanceInfo and kept in a shared storage. This caused
concurrency problems when instantiating singleton instances from different
QML engines in different threads.
This patch moves the singleton house-keeping infrastructure to
QQmlEnginePrivate and makes SingletonInstanceInfo immutable.
Singleton objects are stored in a QHash with QQmlType as the key because
the qml type id might be 0 for composite singletons. The public API of
QQmlType is extended to provide more information about singleton types so that
access to SingletonInstanceInfo is not needed.
All internal accesses of singleton objects must now take the same code path via
QQmlEnginePrivate::singletonInstance<T>() which simplifies overall usage of
singletons and scatters less implementation details throughout the code base.
Task-number: QTBUG-75007
Change-Id: I13c5fd21cac2eb7291f2cbcf2c2b504f0f51a07c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ths data structure should only be accessed when protected by the
metatype data lock. In fact we don't access it from anywhere else.
To make that more obvious, move it to the right place.
This allows us to eliminate some const_cast and poking around in
QQmlTypePrivate from the outside.
Change-Id: I16ffd240b9504b9c00010bdb2d17b05c8196fe8a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As we already have an implementation of refcounting, we can just use
that intead of inventing another one. This also gives us nice move ctors
and operators.
Also, use const pointers to QQmlTypePrivate where possible. This exposes
quite some nastiness that needs to be fixed in follow-up commits: All
the mutable members of QQmlTypePrivate are unsafe for multithreaded use.
Change-Id: I3be8f2c53d86e06ffa80c8df8830473fe6d1d91d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlMetaTypeData does need to be exposed to the QQmlType ctors. Rather,
we can use factory functions to create the QQmlTypePrivate objects.
The static attachedPropertyIds should really be part of QQmlMetaTypeData
and access to them should be protected by the lock.
Task-number: QTBUG-73271
Change-Id: I154a3842fab03a02c710901a20afd1652364808d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
Having all those classes in one big file promotes spaghetti code and
makes the code unreadable.
Change-Id: I3b6df93b9cfe1d97228771049b3054e78b868ea3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|