| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Now primitives such as integers and strings should also work.
Fixes: QTBUG-85615
Change-Id: I201d1844b7272ca50e32f1e33e9ac357b5e68dfe
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 64102ae231317eb6f637304918e55153dadef72d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You should declare functions with formal parameters if you want to use
parameters passed by the signal. We need to generate two different
warnings because there are two code paths by which such parameters are
injected. If we compile with qmlcachegen, it simply inserts a lookup
instruction in to the byte code. This lookup then triggers our special
hack expressly made for signal parameters. If we don't compile using
qmlcachegen, a function declaration with formal parameters is
synthesized. We mark those formal parameters as injected and warn if
we see one of them used.
[ChangeLog][QML][Important Behavior Changes] The automatic injection of
signal parameters into signal handlers is deprecated. This is because we
cannot determine the names of the signal parameters at compile time.
Furthermore, also for human readers it is difficult to discern between
arguments, context properties, properties of the current object, and
properties of the root object of the component. Requiring the signal
parameters to be explicitly named resolves some of this confusion. You
can turn the deprecation warning off using the "qt.qml.compiler" and
"qt.qml.context" logging categories.
Task-number: QTBUG-89943
Change-Id: If0a5082adb735a73efd793868b3a55bc7d694cbe
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
(cherry picked from commit df70d4f76f9c1c7b3de9ae91877df803c18b1264)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-86482
Change-Id: If938fad22f51b08fe3cb20b94634efe46a1eed47
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit e887f25dd6c4c9630a7367c3a2ed95a284191843)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-90038
Change-Id: Ic01b5d097e0b9e6720bcec7ccb18c22abb5418f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 001596d472557bca08eb93159e724301dea88ad6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the assumption was that each object could only have a single
extension object. As proven by the new qqmllanguage test this is not the
case. Each registered object in the type hierarchy can have its own
extension. Therefore, adjust the algorithms that generate qmltypes and
iterate the extension objects when analyzing them.
This leads us to the realization that anonymous types can in fact
meaningfully carry extensions and implement interfaces. Adapt
qmltyperegistrar accordingly.
For the test to compile, however, we need to realize that the class
declaring interfaces needs to befriend all potential subclass's
QmlInterface structs. Fix that, too. The rabbit hole went deep.
Change-Id: Ia451897e927e03b95c3062e829edf1dfcd216613
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Previously only the foreign type was searched for a create method.
Now the wrapping type can also contain it.
Change-Id: I05fb9e0c0a54c14530eb9adcae5a44df5c208be3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Previously errors occurring when parsing QML singletons would just be ignored resulting in a crash.
The errors are now properly printed and the execution is aborted in time.
Fixes: QTBUG-85932
Change-Id: I61cef5f97546ce2e0753bc46c548838a21b1f506
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Aliases are seriously broken and need a larger overhaul.
This patch at least prevents the application from crashing.
Task-number: QTBUG-89822
Change-Id: Ib6acc5b6f621a902f7f5ce370043986486f3c0d0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Also fixes typename and metatype registration for inline components.
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Pick-to: 5.15
Fixes: QTBUG-89173
Change-Id: I97d65d5539b577a8828d5711e5f2e79c8568b441
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't want to convert back and forth between QMetaTypes and ids. This
change is the first step towards using QMetaType directly everywhere.
By reordering the members of QQmlPropertyData to avoid a gap caused by
alignment, we can replace the typeid int with a QMetaType without
requiring more space.
There are still a few places left using metatype ids, notably the value
type logic.
Task-number: QTBUG-82931
Change-Id: Ic38f38d10c71ed20655877976c9cb5ee3cbe2d77
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
| |
Change from the QVariant enum to the QMetaType enum and prefer typeId
over userType where possible
Change-Id: Ic89c55978d46cc23d23b8e9c82c475c0c220fae3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
This is in line with what we do on qmlRegisterSingletonType(), and it
allows us to return singleton objects created independently of the
instantiation mechanism.
Change-Id: Ia6a077f5d22241593acd8cc87b3f65ae20f95667
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This way we can access the enums of namespaces as properties of the
primary type. This is achieved by:
1. Making enums of extended types available in the base type
2. Allowing the extension to be specified as plain metaObject rather
than as type name.
3. Refraining from creating the extension if the create function does
not exist.
The goal of this is to declare the Qt namespace in a civilized way, but
will also help with cleaning up the QtQuick value types and their enums.
Change-Id: I13399741d30ce38d1bff753cfa1b11e72ccfbf6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-85713
Fixes: QTBUG-87464
Pick-to: 5.15 5.15.2
Change-Id: I5c190ad2d02190de90260042cc06e51c1da01c63
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
We throw a warning instead of an error.
Change-Id: I0f5886a2d46582405ae1d57879ccb3937e27950f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We do not actually need to sort the imports list, we just require that
all inline component imports come before all other imports.
This avoids triggering a MSVC STL debug assertion about the used Compare
function not actually creating a strict ordering.
Fixes: QTBUG-86989
Pick-to: 5.15
Change-Id: I381852392545287ec02b186fcb4f33be3ae95b33
Reviewed-by: Ulf Hermann <ulf.hermann@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>
|
|
|
|
|
|
|
| |
The uppercase names indicate that we don't actually want value types.
Change-Id: Id9b64be8770b7fcf49e668dfd0994e9c4e85b948
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
| |
Due to qiterable.h specializing a template declared in qmetatype.h we
temporarily need to include it in a few tests so that the iterables
work.
Change-Id: Ia32392419dead76eaf2b91b2ec4157b726d8de74
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
They are always created and destroyed together, so grouping
them makes the required memory management of them easier.
Change-Id: Ia1980f31f9bdff6a1accd229bc8380ae153edf67
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variant and var properties differ in two important ways:
- variant properties trigger "magic" string conversions:
variant v1: "red" // contains a QColor
var v2: "red" // contains a string
- variant properties behave differently for value types: they create
copies, instead of references.
However, as variant properties were marked as obsolete and this
behavior was effetively undocumented, it should be safe to give "variant"
"var semantics".
With this change, we can also avoid doing magic conversions when storing
data in QVariant properties of QObjects/QGadgets
Change-Id: I549b1beb98e6af9639c1ee81f316bda513d5ff65
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test example is based on
qtvirtualkeyboard/src/virtualkeyboard/content/components/PopupList.qml
Luckily ((QQmlPropertyCache *)nullptr) -> property(-1)
is ended without access to this, so this was not caught before.
But this is UB, plus I can not run Qt and my application compiled with
-fsanitizer=X, because of it crashed after the first member function
call with nullptr as this
Fixes: QTBUG-85605
Change-Id: If6a71fde9a14cc4f73139dfa0e6ee3005453104d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
add explicit conversion to QDate to handle strict comparison
Change-Id: I5e2ce46e13dc2b1580fc463f88d2cd8401371235
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
The corresponding rules were missing so far.
Fixes: QTBUG-85716
Change-Id: Ic97546ea2e574f694a96d974ee355ac84f8650b5
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Previously we only allowed string parameters as the first parameter of
the URL constructor. This excluded types like url. The behavior of
instead trying to convert the parameter to a string and then
interpreting this as an url matches the specification more closely.
Change-Id: I6ef8db9d8c0f238ba8c51b1023decdfcc1caad87
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: Iead53d18fd790fb2d870d80ef2db79666f0d2392
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't know in advance if a URL is part of the source code and should
be relative to the current element, or if it is part of the application
data and should not be touched.
[ChangeLog][QtQml][Important Behavior Changes] URLs are not resolved or
intercepted anymore when assigning them to a "url" property. Instead
they are resolved and possibly intercepted when used to access an actual
resource.
Fixes: QTBUG-76879
Change-Id: Iaa2385aff2c13aa71a12e57385d9afb5dc60a073
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-83703
Pick-to: 5.15
Change-Id: I60c0811e47e0cd3b63b3ddfebb9bb6e9ab7f4f40
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
When converting JS arrays to sequence<T> type, check first for the
existence of a QJSValue -> T converter function. This restores the
behavior from Qt <= 5.14. Amends ecdb4ed275a0869dc668d73d774735575d43a0a3
Fixes: QTBUG-84104
Change-Id: I14c86ab37e34a3c8cff072574d4b90fe9e558535
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-83395
Change-Id: I98dd953497c6e28a1cfb5228095f05547e49b11d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QML][Feature] Add a default message to QML_UNCREATABLE when
proving an empty string as a reason
Fixes: QTBUG-83842
Change-Id: Ifd2044fa6c56c3a382d451ec47d5f92a1ac16b81
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
| |
std: :reverse_iterator is not supported anymore on QHash's iterators.
Change-Id: I755ef69e1c2cc9427a77c49ae2ff85055345ff12
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4executablecompilationunit.cpp
src/qml/jsruntime/qv4executablecompilationunit_p.h
src/qml/qml/qqmlobjectcreator.cpp
src/qml/qml/qqmlpropertycachecreator_p.h
src/qml/qml/qqmltypecompiler.cpp
src/qml/qml/qqmltypedata.cpp
tests/auto/qml/qmlformat/tst_qmlformat.cpp
tools/qmllint/scopetree.cpp
src/qml/qml/qqmlapplicationengine_p.h
Adjusted tools/qmllint/findunqualified.cpp to use newer API
Change-Id: Ibfb4678ca39d626d47527265e3c96e43313873d4
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Apparently we're poking into the unit data during the last evaluate().
We need to keep it alive until then.
Change-Id: I3a08766503a3508720b3ac154171e6fc8bd280d1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also, fix the check to actually test the correct capabilities by using
the containerCapabilities function; testing _iteratorCapabilities only
worked by chance so far.
Task-number: QTBUG-82743
Change-Id: I64f20c6bf1e47737c7b927f79e1e78c1a1603741
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When intrusively playing with compilation units, we need to play by the
rules and actually free them when we are done.
Task-number: QTBUG-82768
Change-Id: I75ac0d01d48922a6a214df0c9d2345e27fb39bff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This class is not a private detail of QQmlContext. And it is incredibly
hard to see who owns what in there. Let's add some civilization ...
We enforce refcounting for QQmlContextData across the code base, with
two exceptions:
1. QQmlContextPrivate may or may not own its QQmlContextData.
2. We may request a QQmlContextData owned by its parent QQmlContextData.
For these two cases we keep flags in QQmlContextData and when the
respective field (m_parent or m_publicContext) is reset, we release()
once.
Furthermore, QQmlContextData and QQmlGuardedContextData are moved to
their own files, in order to de-spaghettify qqmlcontext_p.h and
qqmlcontext.cpp.
When the QQmlEngine is deleted, any QQmlComponents drop their object
creators now, in order to release any context data held by those.
Before, the context data would be deleted, but the object creators would
retain the dangling pointer.
[ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does
what the documentation says now: It prefers explicitly set baseUrls over
compilation unit URLs. Only if no baseUrl is set, the CU's URL is
returned. It used to prefer the CU's URL.
Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
tools/qmllint/findunqualified.cpp
Change-Id: I2593b5cc0db1d14e0c944aec4b88a80f46f5b0c1
|
| |
| |
| |
| |
| | |
Change-Id: Ic52fa388711a76d729ae28678932f4a150da9583
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After processing all other imports, there might be other imports both
in front and behind of the inline component imports in the import list.
To avoid having to search for them, we sort the list so that they are
in front.
Fixes: QTBUG-82302
Change-Id: I9f6deb03608b1ebd0cbe0eddd1a1e5d39837a783
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-82453
Change-Id: I7e5682945a07c3af183becd3947a69568f139d16
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/compiler/qqmlirbuilder_p.h
src/qml/qml/qqmlpropertycachecreator_p.h
src/qmltyperegistrar/qmltypesclassdescription.cpp
src/qmltyperegistrar/qmltypesclassdescription.h
src/qmltyperegistrar/qmltypescreator.cpp
src/quick/items/qquicktext_p.h
src/quick/util/qquickvaluetypes_p.h
Change-Id: Ic209741592e7b85820bf3845722023a190ebc1c5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, qmltyperegistrar would stumble over any QML_* macros in
namespaces, as the namespaces could not be used as template arguments.
However, namespaces are intended to be usable by QML as uncreatable
"types".
Now, qmltyperegistrar checks the namespace flag that moc records in the
JSON output, and if that is given, registers an uncreatable metaobject
instead of a type. Therefore you can use QML_ELEMENT and friends to
register namespaces, just like you would register classes (except that
they're implicitly uncreatable, of course).
Task-number: QTBUG-68796
Change-Id: I186d7e9425471c32fb1a1f29c0c0b946afb2a9d2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
tests/auto/quick/qquickmousearea/BLACKLIST
Change-Id: I3de2c6377d57f5f9204d2cfc688d50a7a0b4150c
|
| |
| |
| |
| |
| |
| |
| | |
Fixes: QTBUG-82171
Change-Id: If14b10d703aa1b69cd697024ada2fae0453103d7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/imports/qtqml/plugin.cpp
src/qml/qml/qqml.h
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlmetatype_p.h
src/qml/qml/qqmltypeloader.cpp
src/qml/types/qqmlbind.cpp
src/quick/items/qquickitemsmodule.cpp
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
Change-Id: I52548938a582cb6510271ed4bc3a9aa0c3c11df6
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also, don't use plain QObject for testing registrations with extensions
and foreign types. This interacts with other tests.
Change-Id: I43df8a4e5b22def5a87f508130f1c7b4833ecfb6
Fixes: QTBUG-81970
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
.qmake.conf
src/qml/types/qqmlbind.cpp
src/quick/items/qquicklistview.cpp
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
Change-Id: Id6805c13256ad13d5651011e5dd09bba0ec02987
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We started to convert containers to QJSValues, so that we could use them
as JavaScript arrays. Unfortunately, this would then lead to a type missmatch
when those same values where to be stored in a property of the container
type. This commit fixes this by converting them back to the original
type.
Fixes: QTBUG-80916
Change-Id: I30a3b03e17c34b171d4a6881dfd7801c13e94d80
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|