| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Unlike create(), it can produce errors that should be checked.
Change-Id: I78f2e58c8666eb45f6e850c43e3e97a448b2758e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 4f0622f7f553cd841874f0efe65d7f13edeec216)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
We can discern between the case where the property does not exist at
all, and the case where we cannot set it.
Change-Id: Ia2e8f4cc077a00b90d720db01bff1542a812dea0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 7275328b967582010abfd59c9a93feef4cb1379f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
String converters are removed in 6.2 anyway.
Fixes: QTBUG-89892
Change-Id: I504c00d99580e3d27d04f420295dd97251657ef4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d250e0070701e9c511ef5b1fb0d23995872ad844)
|
|
|
|
|
|
|
|
|
|
| |
The inline components do not hold a strong reference to their outer type
because that would be a reference cycle.
Fixes: QTBUG-92236
Change-Id: I6d76a114352653210f0ece6c198cf761d3b4eda1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit d0d4cc528ba9e3c39c15a2292066dac1d457abd5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a UNC path is used to locate the qmldir then when it is checked
later on the original path will be compared against the one that QUrl
returns. However, QUrl will convert the case of the host name to be
all lower-case whereas the original string may have been in upper-case.
For example, QUrl::fromLocalFile("//QT-L-R90X9VHB/tasks").toString()
will output "file://qt-l-r90x9vhb/tasks".
So in this case, the absoluteFilePath is changed at this point so that
it will match what QUrl has for the same path to avoid a problem with
it no being found.
Change-Id: I2cd5d74bfec06c01635f80574ac1a6d479792855
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e0400d08755bb40c303bbe330bc3bd6045436c22)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
Fixes: QTBUG-91519
Change-Id: Idfe3116c2e94b8e96300d72e15db0bc78425f517
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 2cb306c194625626957fcde44bd56473b0436f83)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Previously QQmlApplicationEngine did not handle any errors that occurred during object creation
(i.e. failures to initialize required properties) which lead to QObject::connect errors and to
the error messages not getting printed among other issues.
Change-Id: I69bc566a6d349c786cae82a963a621388684c8f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 890cb4cb236333fd5b112fffc0e9088ecb43f2df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
| |
QObject::staticMetaObject is not very useful.
Change-Id: Ifc40e1fa08755c59ff6b8ae23a7a1257f34507da
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 89ebac46d7bde1df265b8970132bf09dc790eca2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQmlData::get expects a non-null pointer, therefore we need to check
whether the object still exists.
Note that while this fixes the crash in the referenced bug,
PropertyChanges still does not support a dynamic target.
Task-number: QTBUG-46350
Change-Id: Ifeecf5df83e87468a1d314ce2b120006124d6f4b
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 1ff376e64bf5af6df7e0079700d2b9164037dc89)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
| |
Document the property not the enum type.
Fixes: QTBUG-91196
Change-Id: Id11a436caf1c683a0e70a1b8e8ce86c6118725d8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit 3670395af58f21f203ce2289a04feef7c6de53f5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
| |
Previously this would always return the inline component iwth ID 1.
Change-Id: I49dc6eb64fcd8428667f3b22afcb7212aa792db3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7104a3a6f8fe518bd8a0d0d246c0f65df340ee38)
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)
|
|
|
|
|
|
|
| |
Fixes: QTBUG-90038
Change-Id: Ic01b5d097e0b9e6720bcec7ccb18c22abb5418f4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 001596d472557bca08eb93159e724301dea88ad6)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a QML component wants to mark properties of its "parent" component as
required, it can do so via
required propertyName
The information about those properties is stored in a
RequiredPropertyExtraData data structure. This structure is already
serialized to disk in the QQmlIRWriter. However, we neglected to restore
it so far in the loader.
Fixes: QTBUG-90538
Change-Id: I789daff9bc881e4f35c942c77f5116b5284de81b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit b322a971f06823a4356f2b3aa331501aa4d0dc7f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
In a JS module, we lack a qml context. Thus, we have to check whether
qmlContext is null. In that case we use the engine's scriptContext('s
ExecutionContext) instead.
Fixes: QTBUG-90245
Change-Id: I337e9c7cade472f52fc81c93d1152ff59f8018a5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit e68b498424f63c1cb6151e4fc6bbc50bac584909)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'Q_OBJECT', even in a comment, interferes with automoc.
Prefixing it with a backslash solves the automoc issue,
but documentation looks wrong as content inside \code
is taken verbatim.
Move code snippets to doc/snippets and refer to them
with \snippet commands.
Change-Id: Ied7fdf87ef5edd2b237498b91b162c19bf7bc636
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
(cherry picked from commit ed6f55ca126c80514e886b3b400a22ba5d443589)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We set QProperty bindings up in the wrong way: Parent components would
overwrite their child component's binding. This patch reverses the
order, fixing the bug.
Task-number: QTBUG-87153
Change-Id: I3e90d1d14a41a7c5c337745f1453484d360a3979
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 96e321bc5cf3c1a6d52374a6f4070a438032b08d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
qmlInfo, qmlDebug, and qmlWarning are not in the QtQml namespace any
more. This patch adapts the documentation.
Task-number: QTBUG-88533
Change-Id: I7fafd3fc2769c5ffad515cacaacdc7ccbe07db46
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 815b347abe821664b2f8a4db53866826a639d6bc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
|
|
|
|
|
|
| |
When returning the result of bindings, shortcut the conversion of
common data types and do not go through QVariant. Removes ~20% of
the overhead in the evaluation of simple bindings of types
bool, int, double, float and QString.
Pick-to: dev
Change-Id: I0323cae12892b8ca52aedfe5e58a23e614a10d45
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Pick-to: 6.0.0 dev
Change-Id: Icd92121bb65ffca1135c1ef69b90d8a8955c1df0
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Needed in order to allow for the declarative registration of classes implementing
interfaces.
Fixes: QTBUG-88623
Change-Id: Id9c1ae92774dd9c316ceaa737cb48ef28f56545c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 87533900738d65ad278722b292852c998e987c10)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: If3640ef5cbb6df4b199b481410e79e94ea763645
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need to handle symbol clashes with QtQuick1 anymore.
[ChangeLog][QtQml] The functions qmlDebug, qmlInfo, and qmlWarning are
no longer available in the QtQml namespace. Use their counterparts in
the global namespace.
Fixes: QTBUG-88637
Change-Id: Ia74510bd711790cebf55de4cd668891712f6835e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
Change-Id: I4bb4a66b7ccca838e058962bbc297659b273c78e
Done-with: Fabian Kosmale <fabian.kosmale@qt.io>
Fixes: QTBUG-84416
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
| |
That is a noop and produces a warning.
Change-Id: I75787aee66b55522005247524140e3f3a7dd56ba
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You get to write QML_SEQUENTIAL_CONTAINER(value_type) now, and
qmltyperegistrar will generate a sensible registration call from that.
A registration might look like this:
struct MyStringListForeign
{
Q_GADGET
QML_ANONYMOUS
QML_SEQUENTIAL_CONTAINER(QString)
QML_FOREIGN(MyStringList)
QML_ADDED_IN_VERSION(3, 1)
};
It's unfortunate that we need to use a metaobject to transfer all of
this information, but there is no other sensible way.
Transform the containers defined in qv4sequenceobject.cpp to use the new
style, and move them out of the builtins, into QtQml. Recognize that
only one of them was ever tested, and add tests for the rest.
Task-number: QTBUG-82443
Change-Id: I3a30f9e27266bb575eea26c5daf5dad1ec461cc5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
As a driveby, enhance the hash function's properties by using
qHashMulti.
Change-Id: Id8add6047530f07ed44f50f46ffe68bb563fdd6b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: Icc4ff1f78bca75c59af1c2550fae15a2489a8bf1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
The constructor for "font.capitalization" asserts Q_ASSERT(vtProp.userType() <= 0x0000FFFF).
This was enough to trigger the assert:
QQmlProperty property(text, "font.capitalization")
Users are allowed to register value types.
Change-Id: Ie10f22b7c9d70bd194cf72f287ec6d8d1ff8b028
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quite obviously, the Qt object is a singleton, extended with a
namespace, backed by a member of the JavaScript global object.
Defining all the methods as JavaScript functions is unnecessary and
duplicates the general type transformation code. Also, it makes it
hard to use those same methods from a C++ context as we cannot
properly set up the arguments outside the JS engine.
Rewriting the Qt object reveals some deficiencies in the old
implementation that we need to fix now:
1. The enums of the Qt type were listed as properties of the Qt object,
which means you could iterate them with a for..in loop in in JavaScript.
This is just wrong. Enums are not properties. This functionality
is deleted and the test adapted to check for each enum value separately.
The commit message for the change that introduced the iterability
already mentioned that the author had failed to find any occurrence of
this in the real world.
2. Parsing time objects from strings was done by parsing the string as a
date/time and then picking the time from that. We still support that for
now, but output a (categorized) warning. Parsing the time directly is
preferred where possible.
3. Previously you could create (invalid) dates and times from various
kinds of QML types, like int and color. This does not work anymore as we
now validate the types before calling the functions.
4. Passing more arguments to a function than the function accepted was
unconditionally ignored before. Now, a Q_CLASSINFO on the surrounding
class can specify that the arguments should be checked, in which case a
JavaScript error is thrown if too many arguments are passed. In order
for this to work correctly we also have to ignore JS undefined values as
trailing arguments for overload resolution. This way, if a method
matching the defined arguments exists, it will be preferred over a
method that matches the full argument count, but possibly cannot accept
undefined as parameter.
Consequently a number of error messages change, which is reflected in
the qqmlqt test.
[ChangeLog][QtQMl][Important Behavior Changes] You can not iterate the
enumerations of the Qt object in JavaScript anymore. This does not work
with any other enumeration type either. You can of course still access
them by name, for example as Qt.LeftButton or similar.
[ChangeLog][QtQMl][Important Behavior Changes] The time formatting
functions of the Qt object in QML now allow you to pass an actual time
string, rather than a date/time string as argument. Passing a date/time
string results in a warning now.
[ChangeLog][QtQml][Important Behavior Changes] Functions in the Qt
object for formatting date and time will now throw a JavaScript error
when presented with a value of an incompatible type, such as int or
color.
[ChangeLog][QtQml][Important Behavior Changes] The Qt.resolvedUrl()
function now returns a URL rather than a string. This follows the
documentation.
[ChangeLog][QtQml][Important Behavior Changes] The GlobalColor enum of
the Qt namespace is not exposed to QML anymore. It did not make any
sense before as the enum values could not be used as colors.
Change-Id: I7fc2f24377eb2fde8f63a1ffac5548d652de7b12
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QtQml] The QQmlListProperty callback functions use qsizetype
now as type for the size of a list. This is in line with the containers
that you might use to back the list.
Fixes: QTBUG-88269
Change-Id: Ia38403cb32f241e6c70e1a580dbeff1d6d694331
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-88156
Change-Id: Ic6127c6128b4c7736cb4b5ab8ce51629388b59ca
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
| |
Change-Id: Id197f3d4bf8ab60256040e0a177d5596ce78a0a8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
| |
As properties of the Qt object they need to be visible.
Change-Id: Ic6357b92f4fae36240e8dbce8976eeb6f9f41bf0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@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>
|
|
|
|
|
|
|
| |
Since we depend on C++17 now, all of these can go.
Change-Id: I0484fd4bb99e4367ec211c29146c316453729959
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
| |
When using refs as loop variables, the clang compiler complains (with
default settings). This prevents that. Note that QJsonValueRef is used
"behind the scenes", which makes this iteration method correct.
Change-Id: I5a5f58ca8ad3887bce2009231cbae5a57c107697
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
| |
It's unused.
Change-Id: I629bfb4ae9775f3f7c97be7789c84a15205cc29e
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>
|
|
|
|
|
|
|
|
| |
maximumMinorVersion() needs to ignore unspecified values as they are not
versions in themselves.
Change-Id: I7c91cf4b8320fd6636eb1be10b069cf885797ee1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
| |
Change-Id: Id2795f16af99870f32266f81228890a9d12c86a7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-87037
Change-Id: I1969dba3b6edfaf202a316576674efed481bb1e4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Also, use that method to capture the uiLanguage notify signal.
Previously the wrong signal was captured. The test still happened to
pass because we manually re-evaluated all bindings when the uiLanguage
property changed. Add a test which avoid that.
Change-Id: I3961b60b365a8705930936f20881421bd4ceffe5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
|
|
|
| |
Implements toString for QQmlPointValueType, QQmlRectValueType and
QQmlSizeValueType.
Change-Id: Ia8dad072453caea24f6f351cf3da9d0ed085b2a1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|
|
|
|
|
|
| |
For grouped properties, this is the location of binding now.
Change-Id: I7148ba92150e3569d47c382ef78794bfa3b75fce
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
|
|
|
|
|
| |
Change-Id: I2f9b39fda6c25e57985a32864c85a50b7d6d0231
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
| |
Change-Id: Ica9561a42217f5a509a6e84e9e48036ec6348e48
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, an alias of a bindable property is also bindable, and
shares its bindable interface with the target.
Moreover, the logic in QQmlTypeCompiler is adjusted so that a change
handler of an alias uses the bindable interface if possible, instead of
connecting to the alias' change signal. That would never be emitted if
the target is a QProperty without a notify signal.
Alias properties still have a change signal, but those never get
emitted.
Change-Id: I857dfdbe51048a2b604ad632982e7f4adac6b907
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|