<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qt/qtdeclarative.git/tests/auto/qml/qqmlanybinding/tst_qqmlanybinding.cpp, branch dev</title>
<subtitle>Qt Declarative (Quick 2)
</subtitle>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/'/>
<entry>
<title>QQmlAnyBinding::installOn: Fix IgnoreInterceptors with dynamic metaobjects</title>
<updated>2026-08-16T20:05:04+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2026-08-06T09:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=6cd3898790dbf005a0ebfc90c7ac0b607a37f919'/>
<id>6cd3898790dbf005a0ebfc90c7ac0b607a37f919</id>
<content type='text'>
If installOn was called on an object with an alias to a BINDABLE
property (e.g. via PropertyChanges), we would fail to resolve the
UntypedBindable. The reason is that we were attempting a direct call of
the static meta-objects function (via qt_metacall). This certainly
bypasses interceptors, but it also bypasses the QQmlVMEMetaObject logic
which resolves aliases.

After resolution, we now always use QMetaObject::metacall, but set a
flag on any potential interceptor meta-object. We need to set that flag
recursively on the meta-object parent chain, as we can't know where
the relevant interceptor sits in the parent chain.
We have to resolve any aliases first, as we'd otherwise set the flag on
the wrong dynamic meta-object if the alias points to another object.

Alternatively, we could modify the metacall for BINDABLE to also pass an
(optional) flags argument, but that change requires larger coordination
between qtbase and declarative, and should at least not be backported.

Fixes: QTBUG-148815
Pick-to: 6.12 6.11 6.8
Change-Id: I75836c8402c1c9df4e28c61e0199c5e1d359b8b6
Reviewed-by: Olivier De Cannière &lt;olivier.decanniere@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If installOn was called on an object with an alias to a BINDABLE
property (e.g. via PropertyChanges), we would fail to resolve the
UntypedBindable. The reason is that we were attempting a direct call of
the static meta-objects function (via qt_metacall). This certainly
bypasses interceptors, but it also bypasses the QQmlVMEMetaObject logic
which resolves aliases.

After resolution, we now always use QMetaObject::metacall, but set a
flag on any potential interceptor meta-object. We need to set that flag
recursively on the meta-object parent chain, as we can't know where
the relevant interceptor sits in the parent chain.
We have to resolve any aliases first, as we'd otherwise set the flag on
the wrong dynamic meta-object if the alias points to another object.

Alternatively, we could modify the metacall for BINDABLE to also pass an
(optional) flags argument, but that change requires larger coordination
between qtbase and declarative, and should at least not be backported.

Fixes: QTBUG-148815
Pick-to: 6.12 6.11 6.8
Change-Id: I75836c8402c1c9df4e28c61e0199c5e1d359b8b6
Reviewed-by: Olivier De Cannière &lt;olivier.decanniere@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>QtQml: Fix QQmlAnyBinding::ofProperty</title>
<updated>2025-03-07T08:00:05+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2025-03-05T14:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=b350041bb72eb84c2af32fc84cdeeaf1259a30b0'/>
<id>b350041bb72eb84c2af32fc84cdeeaf1259a30b0</id>
<content type='text'>
First, we can use the static metacall mechanism of QQmlPropertyData for
this. Second, we cannot rely on ensurePropertyCache(). It might still
return a nullptr if we are dealing with a dynamic metaobject, resulting
in a crash.

Pick-to: 6.9 6.8 6.5
Change-Id: I0497c23f9fa6d68857e6329746193e90ee7ecfc6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
First, we can use the static metacall mechanism of QQmlPropertyData for
this. Second, we cannot rely on ensurePropertyCache(). It might still
return a nullptr if we are dealing with a dynamic metaobject, resulting
in a crash.

Pick-to: 6.9 6.8 6.5
Change-Id: I0497c23f9fa6d68857e6329746193e90ee7ecfc6
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Adapt to privatising of QPropertyBinding's ref count</title>
<updated>2024-03-25T18:02:58+00:00</updated>
<author>
<name>Ulf Hermann</name>
<email>ulf.hermann@qt.io</email>
</author>
<published>2024-03-01T13:23:50+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=2c58f31329c99bb8e15cdfa65f8e4e8570f5ec5e'/>
<id>2c58f31329c99bb8e15cdfa65f8e4e8570f5ec5e</id>
<content type='text'>
Change-Id: I95474784c1eb8c8d8f5dafd33dcc32f532bffe47
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
Reviewed-by: Paul Wicking &lt;paul.wicking@qt.io&gt;
Reviewed-by: Liang Qi &lt;liang.qi@qt.io&gt;
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
Reviewed-by: Matthias Rauter &lt;matthias.rauter@qt.io&gt;
Reviewed-by: Jøger Hansegård &lt;joger.hansegard@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I95474784c1eb8c8d8f5dafd33dcc32f532bffe47
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
Reviewed-by: Sami Shalayel &lt;sami.shalayel@qt.io&gt;
Reviewed-by: Paul Wicking &lt;paul.wicking@qt.io&gt;
Reviewed-by: Liang Qi &lt;liang.qi@qt.io&gt;
Reviewed-by: Andy Nichols &lt;andy.nichols@qt.io&gt;
Reviewed-by: Matthias Rauter &lt;matthias.rauter@qt.io&gt;
Reviewed-by: Jøger Hansegård &lt;joger.hansegard@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Correct license for test files</title>
<updated>2024-02-27T09:32:21+00:00</updated>
<author>
<name>Lucie Gérard</name>
<email>lucie.gerard@qt.io</email>
</author>
<published>2024-02-22T14:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=9c5fc883881799fa28cf74535351e76dcea10a0a'/>
<id>9c5fc883881799fa28cf74535351e76dcea10a0a</id>
<content type='text'>
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
Reviewed-by: Kai Köhne &lt;kai.koehne@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
According to QUIP-18 [1], all test files should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
Reviewed-by: Kai Köhne &lt;kai.koehne@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Use SPDX license identifiers</title>
<updated>2022-06-11T06:05:15+00:00</updated>
<author>
<name>Lucie Gérard</name>
<email>lucie.gerard@qt.io</email>
</author>
<published>2022-05-13T13:12:05+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=0dc4fd240a2897c5c443a0ef6d84c416843e4938'/>
<id>0dc4fd240a2897c5c443a0ef6d84c416843e4938</id>
<content type='text'>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Pick-to: 6.4
Task-number: QTBUG-67283
Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294
Reviewed-by: Shawn Rutledge &lt;shawn.rutledge@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Consolidate test helpers into private libraries</title>
<updated>2021-09-13T19:17:04+00:00</updated>
<author>
<name>Mitch Curtis</name>
<email>mitch.curtis@qt.io</email>
</author>
<published>2021-08-06T10:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=e310dadef779b28845b41fb091634cd001cda9de'/>
<id>e310dadef779b28845b41fb091634cd001cda9de</id>
<content type='text'>
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.

We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.

We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.

Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously each test would include and build sources from the shared
folder. Now we make those sources a library, build it once, then have
each test link to it instead.

We also take the opportunity to move some helpers that qtquickcontrols2
had added into the quicktestutils library where it makes sense, and
for the helpers that don't make sense to be there, move them into
quickcontrolstestutils.

We add the libraries to src/ so that they are internal modules built as
part of Qt, rather than tests. That way we can use them in a standalone
test outside of qtdeclarative.

Task-number: QTBUG-95621
Pick-to: 6.2
Change-Id: I0a2ab3976fdbff2e4414df7bdc0808f16453b80a
Reviewed-by: Fabian Kosmale &lt;fabian.kosmale@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix crash in QQmlPropertyBinding is not bound to property</title>
<updated>2021-03-10T09:26:52+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2021-03-09T07:41:24+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=8f0b91e120bd1fe3ff9f7f4f2297ad4c23197eed'/>
<id>8f0b91e120bd1fe3ff9f7f4f2297ad4c23197eed</id>
<content type='text'>
In contrast to other QPropertyBindings, QQmlPropertyBinding could be
executed even if it is not installed on a property. This would happen if
we keep a strong reference to it, remove it from a property, and change
one of the observed JS dependencies. That would lead to a call of
expressionChanged, and then subsequently to an evaluate call. As setting
and removing the binding from a property can be done purely in C++, we
cannot detect this in the engine (which would allow us to disable the
binding, so that expressionChanged does not get called). Thus, we simply
check if the property data pointer is set when expressionChanged is
called, and return otherwise.

Task-number: QTBUG-89505
Change-Id: I933c1b3285d6472b1d2c6512ad37911090861298
Reviewed-by: Maximilian Goldstein &lt;max.goldstein@qt.io&gt;
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In contrast to other QPropertyBindings, QQmlPropertyBinding could be
executed even if it is not installed on a property. This would happen if
we keep a strong reference to it, remove it from a property, and change
one of the observed JS dependencies. That would lead to a call of
expressionChanged, and then subsequently to an evaluate call. As setting
and removing the binding from a property can be done purely in C++, we
cannot detect this in the engine (which would allow us to disable the
binding, so that expressionChanged does not get called). Thus, we simply
check if the property data pointer is set when expressionChanged is
called, and return otherwise.

Task-number: QTBUG-89505
Change-Id: I933c1b3285d6472b1d2c6512ad37911090861298
Reviewed-by: Maximilian Goldstein &lt;max.goldstein@qt.io&gt;
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce QQmlAnyBinding as an abstraction over bindings</title>
<updated>2021-03-04T11:53:46+00:00</updated>
<author>
<name>Fabian Kosmale</name>
<email>fabian.kosmale@qt.io</email>
</author>
<published>2021-02-26T09:22:33+00:00</published>
<link rel='alternate' type='text/html' href='https://code.qt.io/cgit/qt/qtdeclarative.git/commit/?id=50e984c07229b753d6558610e7fa7c7df733fe50'/>
<id>50e984c07229b753d6558610e7fa7c7df733fe50</id>
<content type='text'>
QQmlAnyBinding is meant to abstract over the differences between
classical, QQmlAbstractBinding derived bindings and the newer
QPropertyBindingPrivate based ones. It can be used to store, receive,
remove, create and set bindings of both types.

In addition, this patches adds the functionality to create a
QQmlPropertyBinding from a code string, which was so far only
possible with QQmlBinding; and adds a few methods to QBiPointer to ease
the implementation of QQmlAnyBinding.

Task-number: QTBUG-91000
Change-Id: I7076d6fb426f315f32c1b054c5c3ba56312bed29
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
QQmlAnyBinding is meant to abstract over the differences between
classical, QQmlAbstractBinding derived bindings and the newer
QPropertyBindingPrivate based ones. It can be used to store, receive,
remove, create and set bindings of both types.

In addition, this patches adds the functionality to create a
QQmlPropertyBinding from a code string, which was so far only
possible with QQmlBinding; and adds a few methods to QBiPointer to ease
the implementation of QQmlAnyBinding.

Task-number: QTBUG-91000
Change-Id: I7076d6fb426f315f32c1b054c5c3ba56312bed29
Reviewed-by: Andrei Golubev &lt;andrei.golubev@qt.io&gt;
Reviewed-by: Ulf Hermann &lt;ulf.hermann@qt.io&gt;
</pre>
</div>
</content>
</entry>
</feed>
