Skip to content

Conversation

@rjcamatos
Copy link

If there are 2 or more methods with the same name but reciving diferent arguments the QJSEngine Pickup the First One declared.

Example:
methodxyz(string)
methodxyz(objptr*)

It picks up the first one passing as argument a string and not the one that i was expecting an object as it was send.

qtprojectorg pushed a commit that referenced this pull request Dec 8, 2023
Using std::binary_search has the requirement that the passed
range fulfils ordering requirements, which was not the case
for the cppKeywords array here.

As the QString doc says [1]:

> QStrings can be compared using overloaded operators such as operator<(),
> operator<=(), operator==(), operator>=(), and so on. Note that
> the comparison is based exclusively on the numeric Unicode
> values of the characters. It is very fast, but is not what a
> human would expect; (...)

Therefore, sort the array accordingly and add an assert to
ensure it will remain sorted.

Fixes an crash/assert when building qtdeclarative with
CXXFLAGS='-D_GLIBCXX_DEBUG':

    /usr/include/c++/13/bits/stl_algo.h:2243:
    In function:
        bool std::binary_search(_FIter, _FIter, const _Tp&) [with _FIter = const
        QString*; _Tp = QStringView]

    Error: elements in iterator range [first, last) are not partitioned by the
    value __val.

    Objects involved in the operation:
        iterator "first" @ 0x7ffc4a2c4f18 {
          type = QString const* (constant iterator);
        }
        iterator "last" @ 0x7ffc4a2c4f10 {
          type = QString const* (constant iterator);
        }
    Aborted (core dumped)
    ninja: build stopped: subcommand failed.

GDB backtrace:

    Program terminated with signal SIGABRT, Aborted.
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    44      ./nptl/pthread_kill.c: No such file or directory.
    (gdb) bt
    #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
    #1  0x00007f307e0a815f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
    #2  0x00007f307e05a472 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
    #3  0x00007f307e0444b2 in __GI_abort () at ./stdlib/abort.c:79
    #4  0x00007f307e2a300d in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
    #5  0x00005639ff90471d in std::binary_search<QString const*, QStringView> (__first=0x5639ffa1a9c0 <QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>,
        __last=0x5639ffa1b2c0 <guard variable for QmltcVisitor::checkForNamingCollisionsWithCpp(QDeferredSharedPointer<QQmlJSScope const> const&)::cppKeywords>, __val=...) at /usr/include/c++/13/bits/stl_algo.h:2243
    #6  0x00005639ff8fb837 in operator() (__closure=0x7ffc4a2c52bf, word=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:764
    #7  0x00005639ff8fb89e in operator() (__closure=0x7ffc4a2c52a0, name=..., errorPrefix=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:768
    #8  0x00005639ff8fc99b in QmltcVisitor::checkForNamingCollisionsWithCpp (this=0x7ffc4a2c6070, type=...) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:787
    #9  0x00005639ff8f9dea in QmltcVisitor::endVisit (this=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltcvisitor.cpp:341
    #10 0x00007f307f6636fa in QQmlJS::AST::UiProgram::accept0 (this=0x563a002e0628, visitor=0x7ffc4a2c6070) at /home/michi/development/git/qt5/qtdeclarative/src/qml/parser/qqmljsast.cpp:1193
    #11 0x00007f3080159b8f in QQmlJS::AST::Node::accept (this=0x563a002e0628, visitor=0x7ffc4a2c6070)
        at /home/michi/development/git/qt5/qtbase/include/QtQml/6.7.0/QtQml/private/../../../../../../qtdeclarative/src/qml/parser/qqmljsast_p.h:272
    #12 0x00007f3080212f4b in QQmlJSTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/src/qmlcompiler/qqmljstyperesolver.cpp:173
    #13 0x00005639ff8f0bd3 in QmltcTypeResolver::init (this=0x7ffc4a2c5b50, visitor=0x7ffc4a2c6070, program=0x563a002e0628) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/qmltctyperesolver.cpp:19
    #14 0x00005639ff8c02d4 in main (argc=23, argv=0x7ffc4a2c7a68) at /home/michi/development/git/qt5/qtdeclarative/tools/qmltc/main.cpp:269

[1] https://doc.qt.io/qt-6/qstring.html#comparing-strings

Change-Id: I82ebbcdca4ab90155b935f9af24b3a3821134563
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
@cla-assistant
Copy link

cla-assistant bot commented Nov 15, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 12 committers have signed the CLA.

❌ David Boddie
❌ samishalayel
❌ xavi-b
❌ ulfhermannqt
❌ iCristalrope
❌ Inkane
❌ seyainc
❌ paulolav
❌ AhmadSamir
❌ eskilblomfeldt
❌ marcmutz
❌ dilekakcaay


David Boddie seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

qtprojectorg pushed a commit that referenced this pull request Sep 9, 2025
Use dimmer as a context object rather than the test itself, which
outlives it.

The backtrace was:

    FAIL!  : tst_QQuickPopup::Basic::fadeDimmer(modal) The computed value is expected to be greater than the baseline, but is not
       Computed (opacityChangeCount): 2
       Baseline (2)                 : 2
       Loc: [/Users/mitch/dev/qt-dev2/qtdeclarative/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp(2629)]
    =================================================================
    ==68826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b7f7140 at pc 0x000104743c68 bp 0x00016b7ecfd0 sp 0x00016b7ecfc8
    READ of size 4 at 0x00016b7f7140 thread T0
        #0 0x000104743c64 in tst_QQuickPopup::fadeDimmer()::$_0::operator()() const tst_qquickpopup.cpp:2625
        #1 0x000104743bc0 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()::operator()() const qobjectdefs_impl.h:116
        #2 0x000104743b64 in void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()&&) qobjectdefs_impl.h:65
        #3 0x000104743ab4 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**) qobjectdefs_impl.h:115
        #4 0x000104743930 in void QtPrivate::FunctorCallable<tst_QQuickPopup::fadeDimmer()::$_0>::call<QtPrivate::List<>, void>(tst_QQuickPopup::fadeDimmer()::$_0&, void*, void**) qobjectdefs_impl.h:337
        #5 0x000104743848 in QtPrivate::QCallableObject<tst_QQuickPopup::fadeDimmer()::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:547
        #6 0x00011694273c in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:461
        #7 0x000116e49454 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4284
        #8 0x000116e467a0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4344
        #9 0x00010c1462d4 in QQuickItem::opacityChanged() moc_qquickitem.cpp:1019
        #10 0x00010c1461c8 in QQuickItem::setOpacity(double) qquickitem.cpp:6517
        #11 0x00010c168638 in QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) moc_qquickitem.cpp:850
        #12 0x000113847100 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:413
        #13 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #14 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #15 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #16 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #17 0x00010c9949ac in QQuickAnimationPropertyUpdater::setValue(double) qquickanimation.cpp:2740
        #18 0x00010c992444 in QQuickBulkValueAnimator::updateCurrentTime(int) qquickanimation.cpp:2069
        #19 0x000114345428 in QAbstractAnimationJob::setCurrentTime(int) qabstractanimationjob.cpp:481
        #20 0x000114349c3c in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) qabstractanimationjob.cpp:367
        #21 0x00011434bc34 in QAbstractAnimationJob::start() qabstractanimationjob.cpp:514
        #22 0x00010c9ff568 in QQuickBehavior::write(QVariant const&) qquickbehavior.cpp:419
        #23 0x00010c9ff88c in non-virtual thunk to QQuickBehavior::write(QVariant const&) qquickbehavior.cpp
        #24 0x000113f53b7c in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:392
        #25 0x000113f532e4 in QQmlInterceptorMetaObject::intercept(QMetaObject::Call, int, void**) qqmlvmemetaobject_p.h:153
        #26 0x000113f59788 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:750
        #27 0x0001138474d0 in void QQmlPropertyData::doMetacall<(QMetaObject::Call)2>(QObject*, int, void**) const qqmlpropertydata_p.h:395
        #28 0x000113847128 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:415
        #29 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #30 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #31 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #32 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #33 0x000113c38f84 in QQmlProperty::write(QVariant const&) const qqmlproperty.cpp:1863
        #34 0x000113c39358 in QQmlProperty::write(QObject*, QString const&, QVariant const&) qqmlproperty.cpp:1880
        #35 0x000107c1db04 in QQuickPopupPrivate::hideDimmer() qquickpopup.cpp:1290
        #36 0x000107c16a68 in QQuickPopupPrivate::prepareExitTransition() qquickpopup.cpp:821
        #37 0x000107c1e038 in QQuickPopupTransitionManager::transitionExit() qquickpopup.cpp:1326
        #38 0x000107c23fd4 in QQuickPopup::setVisible(bool) qquickpopup.cpp:2496
        #39 0x000107c104d8 in QQuickPopup::close() qquickpopup.cpp:1408
        #40 0x000107c1ba80 in QQuickPopup::setParentItem(QQuickItem*) qquickpopup.cpp:2180
        #41 0x000107c1b324 in QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp:1063
        #42 0x000107c1bb8c in non-virtual thunk to QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp
        #43 0x00010c117f70 in void QQuickItemPrivate::notifyChangeListeners<void (QQuickItemChangeListener::*)(QQuickItem*), QQuickItem*>(QFlags<QQuickItemPrivate::ChangeType>, void (QQuickItemChangeListener::*&&)(QQuickItem*), QQuickItem*&&) qquickitem_p.h:413
        #44 0x00010c113d7c in QQuickItem::~QQuickItem() qquickitem.cpp:2420
        #45 0x00010c50e3e8 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #46 0x00010c4ed840 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #47 0x00010c4ed86c in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #48 0x00010c4da1c0 in QQuickWindow::~QQuickWindow() qquickwindow.cpp:1197
        #49 0x00010c531f34 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl() qquickwindowmodule.cpp:73
        #50 0x00010cf2d4f4 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:104
        #51 0x00010cf2d3e0 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #52 0x00010cf2d40c in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #53 0x00010472efa8 in QScopedPointerDeleter<QObject>::cleanup(QObject*) qscopedpointer.h:24
        #54 0x00010472eefc in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:81
        #55 0x00010466f0e8 in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:79
        #56 0x00010471246c in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #57 0x00010468ff88 in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #58 0x0001046a953c in tst_QQuickPopup::fadeDimmer() tst_qquickpopup.cpp:2635
        [...]

Amends ef8bde8.

Pick-to: 6.8 6.9 6.10
Change-Id: Ie5c49b7d9ecd3c74f822590d296062b516563391
Reviewed-by: Volker Hilsheimer <[email protected]>
qtprojectorg pushed a commit that referenced this pull request Sep 12, 2025
Use dimmer as a context object rather than the test itself, which
outlives it.

The backtrace was:

    FAIL!  : tst_QQuickPopup::Basic::fadeDimmer(modal) The computed value is expected to be greater than the baseline, but is not
       Computed (opacityChangeCount): 2
       Baseline (2)                 : 2
       Loc: [/Users/mitch/dev/qt-dev2/qtdeclarative/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp(2629)]
    =================================================================
    ==68826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b7f7140 at pc 0x000104743c68 bp 0x00016b7ecfd0 sp 0x00016b7ecfc8
    READ of size 4 at 0x00016b7f7140 thread T0
        #0 0x000104743c64 in tst_QQuickPopup::fadeDimmer()::$_0::operator()() const tst_qquickpopup.cpp:2625
        #1 0x000104743bc0 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()::operator()() const qobjectdefs_impl.h:116
        #2 0x000104743b64 in void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()&&) qobjectdefs_impl.h:65
        #3 0x000104743ab4 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**) qobjectdefs_impl.h:115
        #4 0x000104743930 in void QtPrivate::FunctorCallable<tst_QQuickPopup::fadeDimmer()::$_0>::call<QtPrivate::List<>, void>(tst_QQuickPopup::fadeDimmer()::$_0&, void*, void**) qobjectdefs_impl.h:337
        #5 0x000104743848 in QtPrivate::QCallableObject<tst_QQuickPopup::fadeDimmer()::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:547
        #6 0x00011694273c in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:461
        #7 0x000116e49454 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4284
        #8 0x000116e467a0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4344
        #9 0x00010c1462d4 in QQuickItem::opacityChanged() moc_qquickitem.cpp:1019
        #10 0x00010c1461c8 in QQuickItem::setOpacity(double) qquickitem.cpp:6517
        #11 0x00010c168638 in QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) moc_qquickitem.cpp:850
        #12 0x000113847100 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:413
        #13 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #14 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #15 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #16 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #17 0x00010c9949ac in QQuickAnimationPropertyUpdater::setValue(double) qquickanimation.cpp:2740
        #18 0x00010c992444 in QQuickBulkValueAnimator::updateCurrentTime(int) qquickanimation.cpp:2069
        #19 0x000114345428 in QAbstractAnimationJob::setCurrentTime(int) qabstractanimationjob.cpp:481
        #20 0x000114349c3c in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) qabstractanimationjob.cpp:367
        #21 0x00011434bc34 in QAbstractAnimationJob::start() qabstractanimationjob.cpp:514
        #22 0x00010c9ff568 in QQuickBehavior::write(QVariant const&) qquickbehavior.cpp:419
        #23 0x00010c9ff88c in non-virtual thunk to QQuickBehavior::write(QVariant const&) qquickbehavior.cpp
        #24 0x000113f53b7c in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:392
        #25 0x000113f532e4 in QQmlInterceptorMetaObject::intercept(QMetaObject::Call, int, void**) qqmlvmemetaobject_p.h:153
        #26 0x000113f59788 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:750
        #27 0x0001138474d0 in void QQmlPropertyData::doMetacall<(QMetaObject::Call)2>(QObject*, int, void**) const qqmlpropertydata_p.h:395
        #28 0x000113847128 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:415
        #29 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #30 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #31 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #32 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #33 0x000113c38f84 in QQmlProperty::write(QVariant const&) const qqmlproperty.cpp:1863
        #34 0x000113c39358 in QQmlProperty::write(QObject*, QString const&, QVariant const&) qqmlproperty.cpp:1880
        #35 0x000107c1db04 in QQuickPopupPrivate::hideDimmer() qquickpopup.cpp:1290
        #36 0x000107c16a68 in QQuickPopupPrivate::prepareExitTransition() qquickpopup.cpp:821
        #37 0x000107c1e038 in QQuickPopupTransitionManager::transitionExit() qquickpopup.cpp:1326
        #38 0x000107c23fd4 in QQuickPopup::setVisible(bool) qquickpopup.cpp:2496
        #39 0x000107c104d8 in QQuickPopup::close() qquickpopup.cpp:1408
        #40 0x000107c1ba80 in QQuickPopup::setParentItem(QQuickItem*) qquickpopup.cpp:2180
        #41 0x000107c1b324 in QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp:1063
        #42 0x000107c1bb8c in non-virtual thunk to QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp
        #43 0x00010c117f70 in void QQuickItemPrivate::notifyChangeListeners<void (QQuickItemChangeListener::*)(QQuickItem*), QQuickItem*>(QFlags<QQuickItemPrivate::ChangeType>, void (QQuickItemChangeListener::*&&)(QQuickItem*), QQuickItem*&&) qquickitem_p.h:413
        #44 0x00010c113d7c in QQuickItem::~QQuickItem() qquickitem.cpp:2420
        #45 0x00010c50e3e8 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #46 0x00010c4ed840 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #47 0x00010c4ed86c in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #48 0x00010c4da1c0 in QQuickWindow::~QQuickWindow() qquickwindow.cpp:1197
        #49 0x00010c531f34 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl() qquickwindowmodule.cpp:73
        #50 0x00010cf2d4f4 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:104
        #51 0x00010cf2d3e0 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #52 0x00010cf2d40c in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #53 0x00010472efa8 in QScopedPointerDeleter<QObject>::cleanup(QObject*) qscopedpointer.h:24
        #54 0x00010472eefc in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:81
        #55 0x00010466f0e8 in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:79
        #56 0x00010471246c in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #57 0x00010468ff88 in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #58 0x0001046a953c in tst_QQuickPopup::fadeDimmer() tst_qquickpopup.cpp:2635
        [...]

Amends ef8bde8.

Pick-to: 6.9 6.8
Change-Id: Ie5c49b7d9ecd3c74f822590d296062b516563391
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit f8742ca)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
qtprojectorg pushed a commit that referenced this pull request Sep 12, 2025
Use dimmer as a context object rather than the test itself, which
outlives it.

The backtrace was:

    FAIL!  : tst_QQuickPopup::Basic::fadeDimmer(modal) The computed value is expected to be greater than the baseline, but is not
       Computed (opacityChangeCount): 2
       Baseline (2)                 : 2
       Loc: [/Users/mitch/dev/qt-dev2/qtdeclarative/tests/auto/quickcontrols/qquickpopup/tst_qquickpopup.cpp(2629)]
    =================================================================
    ==68826==ERROR: AddressSanitizer: stack-use-after-scope on address 0x00016b7f7140 at pc 0x000104743c68 bp 0x00016b7ecfd0 sp 0x00016b7ecfc8
    READ of size 4 at 0x00016b7f7140 thread T0
        #0 0x000104743c64 in tst_QQuickPopup::fadeDimmer()::$_0::operator()() const tst_qquickpopup.cpp:2625
        #1 0x000104743bc0 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()::operator()() const qobjectdefs_impl.h:116
        #2 0x000104743b64 in void QtPrivate::FunctorCallBase::call_internal<void, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()>(void**, QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**)::'lambda'()&&) qobjectdefs_impl.h:65
        #3 0x000104743ab4 in QtPrivate::FunctorCall<std::__1::integer_sequence<unsigned long>, QtPrivate::List<>, void, tst_QQuickPopup::fadeDimmer()::$_0>::call(tst_QQuickPopup::fadeDimmer()::$_0&, void**) qobjectdefs_impl.h:115
        #4 0x000104743930 in void QtPrivate::FunctorCallable<tst_QQuickPopup::fadeDimmer()::$_0>::call<QtPrivate::List<>, void>(tst_QQuickPopup::fadeDimmer()::$_0&, void*, void**) qobjectdefs_impl.h:337
        #5 0x000104743848 in QtPrivate::QCallableObject<tst_QQuickPopup::fadeDimmer()::$_0, QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) qobjectdefs_impl.h:547
        #6 0x00011694273c in QtPrivate::QSlotObjectBase::call(QObject*, void**) qobjectdefs_impl.h:461
        #7 0x000116e49454 in void doActivate<false>(QObject*, int, void**) qobject.cpp:4284
        #8 0x000116e467a0 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) qobject.cpp:4344
        #9 0x00010c1462d4 in QQuickItem::opacityChanged() moc_qquickitem.cpp:1019
        #10 0x00010c1461c8 in QQuickItem::setOpacity(double) qquickitem.cpp:6517
        #11 0x00010c168638 in QQuickItem::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) moc_qquickitem.cpp:850
        #12 0x000113847100 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:413
        #13 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #14 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #15 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #16 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #17 0x00010c9949ac in QQuickAnimationPropertyUpdater::setValue(double) qquickanimation.cpp:2740
        #18 0x00010c992444 in QQuickBulkValueAnimator::updateCurrentTime(int) qquickanimation.cpp:2069
        #19 0x000114345428 in QAbstractAnimationJob::setCurrentTime(int) qabstractanimationjob.cpp:481
        #20 0x000114349c3c in QAbstractAnimationJob::setState(QAbstractAnimationJob::State) qabstractanimationjob.cpp:367
        #21 0x00011434bc34 in QAbstractAnimationJob::start() qabstractanimationjob.cpp:514
        #22 0x00010c9ff568 in QQuickBehavior::write(QVariant const&) qquickbehavior.cpp:419
        #23 0x00010c9ff88c in non-virtual thunk to QQuickBehavior::write(QVariant const&) qquickbehavior.cpp
        #24 0x000113f53b7c in QQmlInterceptorMetaObject::doIntercept(QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:392
        #25 0x000113f532e4 in QQmlInterceptorMetaObject::intercept(QMetaObject::Call, int, void**) qqmlvmemetaobject_p.h:153
        #26 0x000113f59788 in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**) qqmlvmemetaobject.cpp:750
        #27 0x0001138474d0 in void QQmlPropertyData::doMetacall<(QMetaObject::Call)2>(QObject*, int, void**) const qqmlpropertydata_p.h:395
        #28 0x000113847128 in QQmlPropertyData::writeProperty(QObject*, void*, QFlags<QQmlPropertyData::WriteFlag>) const qqmlpropertydata_p.h:415
        #29 0x000113c33468 in QQmlPropertyPrivate::write(QObject*, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1668
        #30 0x000113c32638 in QQmlPropertyPrivate::writeValueProperty(QObject*, QQmlPropertyData const&, QQmlPropertyData const&, QVariant const&, QQmlRefPointer<QQmlContextData> const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1326
        #31 0x000113c32390 in QQmlPropertyPrivate::writeValueProperty(QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1270
        #32 0x000113c391b4 in QQmlPropertyPrivate::write(QQmlProperty const&, QVariant const&, QFlags<QQmlPropertyData::WriteFlag>) qqmlproperty.cpp:1947
        #33 0x000113c38f84 in QQmlProperty::write(QVariant const&) const qqmlproperty.cpp:1863
        #34 0x000113c39358 in QQmlProperty::write(QObject*, QString const&, QVariant const&) qqmlproperty.cpp:1880
        #35 0x000107c1db04 in QQuickPopupPrivate::hideDimmer() qquickpopup.cpp:1290
        #36 0x000107c16a68 in QQuickPopupPrivate::prepareExitTransition() qquickpopup.cpp:821
        #37 0x000107c1e038 in QQuickPopupTransitionManager::transitionExit() qquickpopup.cpp:1326
        #38 0x000107c23fd4 in QQuickPopup::setVisible(bool) qquickpopup.cpp:2496
        #39 0x000107c104d8 in QQuickPopup::close() qquickpopup.cpp:1408
        #40 0x000107c1ba80 in QQuickPopup::setParentItem(QQuickItem*) qquickpopup.cpp:2180
        #41 0x000107c1b324 in QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp:1063
        #42 0x000107c1bb8c in non-virtual thunk to QQuickPopupPrivate::itemDestroyed(QQuickItem*) qquickpopup.cpp
        #43 0x00010c117f70 in void QQuickItemPrivate::notifyChangeListeners<void (QQuickItemChangeListener::*)(QQuickItem*), QQuickItem*>(QFlags<QQuickItemPrivate::ChangeType>, void (QQuickItemChangeListener::*&&)(QQuickItem*), QQuickItem*&&) qquickitem_p.h:413
        #44 0x00010c113d7c in QQuickItem::~QQuickItem() qquickitem.cpp:2420
        #45 0x00010c50e3e8 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #46 0x00010c4ed840 in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #47 0x00010c4ed86c in QQuickRootItem::~QQuickRootItem() qquickwindow_p.h:62
        #48 0x00010c4da1c0 in QQuickWindow::~QQuickWindow() qquickwindow.cpp:1197
        #49 0x00010c531f34 in QQuickWindowQmlImpl::~QQuickWindowQmlImpl() qquickwindowmodule.cpp:73
        #50 0x00010cf2d4f4 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:104
        #51 0x00010cf2d3e0 in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #52 0x00010cf2d40c in QQmlPrivate::QQmlElement<QQuickWindowQmlImpl>::~QQmlElement() qqmlprivate.h:102
        #53 0x00010472efa8 in QScopedPointerDeleter<QObject>::cleanup(QObject*) qscopedpointer.h:24
        #54 0x00010472eefc in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:81
        #55 0x00010466f0e8 in QScopedPointer<QObject, QScopedPointerDeleter<QObject>>::~QScopedPointer() qscopedpointer.h:79
        #56 0x00010471246c in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #57 0x00010468ff88 in QQuickVisualTestUtils::QQuickApplicationHelper::~QQuickApplicationHelper() visualtestutils_p.h:192
        #58 0x0001046a953c in tst_QQuickPopup::fadeDimmer() tst_qquickpopup.cpp:2635
        [...]

Amends ef8bde8.

Pick-to: 6.8
Change-Id: Ie5c49b7d9ecd3c74f822590d296062b516563391
Reviewed-by: Volker Hilsheimer <[email protected]>
(cherry picked from commit f8742ca)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit cc726a4)
samishalayel and others added 25 commits October 28, 2025 12:21
Fix a configure error because of missing autogen tools setup on the
test. Amends 97fe92b.

Fixes: QTBUG-141464
Change-Id: I7d5f75ca70de03b7ded2f0319a81c30935749880
Reviewed-by: Ulf Hermann <[email protected]>
We need this in Binding, too, and extracting this part of the code for
better unit testing is arguably a good idea anyway.

Task-number: QTBUG-140858
Pick-to: 6.10 6.8
Change-Id: I74f7a4f022068b9f599cf55433b5e337bc002178
Reviewed-by: Ulf Hermann <[email protected]>
In QQmlValueTypeWrapper::write, we clear the gadgetPtr if it didn't
exist before, and it was only created for write. That however leads to
an inconsistent isDirty state: The wrapper assumes it still has data
which is up-to-date, but that data is actually gone.

Avoid that issue by also marking the wrapper as dirty when the gadgetPtr
is reset in write.

Pick-to: 6.10
Fixes: QTBUG-140414
Change-Id: Ie73b47ae49d4a26a43e2dbcc47365ae71a343109
Reviewed-by: Olivier De Cannière <[email protected]>
Reviewed-by: Ulf Hermann <[email protected]>
It should use the non-deprecated way of constructing a QQmlPropertyMap.

Amends commit a629e9e.

Task-number: QTBUG-140554
Change-Id: I5425f20b0d9b87c071b8e3c17450953f7281de22
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
This trips up Coverity. Instead use an "if" clause.

Coverity-Id: 896869
Change-Id: I0eddc4b4547a7bb9055734b7304112e9174ff5fc
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Marc Mutz <[email protected]>
Change-Id: I255e7dd673be773778b99aa634278dd1995c2305
Reviewed-by: Ulf Hermann <[email protected]>
* Make nonstandard RESOURCE_PREFIXes explicit
* Add TEST_PLUGIN to MockExtensionPlugin
* Remove lint target from intentionally hidden module

Also remove some useless VERSION statements and an ineffective QTP0001.

Change-Id: Iadbacce55810bdbb2cbc6a1c7175303b96e06120
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Fabian Kosmale <[email protected]>
There's no Details section for qmlformat, so it ends up actually
linking to the Details section of qmlpreview ...

Pick-to: 6.10
Change-Id: Ib6142b362b15a72ef847bb6e751cf64bd64a9e04
Reviewed-by: Fabian Kosmale <[email protected]>
This implements support for the <symbol> tag, which is like a
definition node, but which defines its own coordinate system
(viewbox) to make it more reusable.

Fixes: QTBUG-121539
Change-Id: I5fef5ad264511bc72ff40e66cfd0c6091812b015
Reviewed-by: Hatem ElKharashy <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
case conversions are now separate from other properties.

See commit 763f19151cc31ca1ba4912e0828359be5dba89e8 in qtbase.

Pick-to: 6.10 6.8 6.5
Change-Id: Ia13f515e613c7470f816c9930e870e391c88e367
Reviewed-by: Marc Mutz <[email protected]>
* Re-arrange and add section headers to adhere to the app template.
* Replace first-person plural (we) with either third-person singular
  (the example) or second-person singular (you).
* Add qdoc links to C++ or QML entities.

Fixes: QTBUG-137898
Pick-to: 6.10 6.9 6.8
Change-Id: Ib61ca9beac1bafb4e4e5f8fcc6475093b313768e
Reviewed-by: Jerome Pasion <[email protected]>
These snippets show up in the Qt Quick States documentation.

Fixes: QTBUG-140487
Pick-to: 6.10
Change-Id: I897865e16a356c1c561715adc4daa97a4bd3dd67
Reviewed-by: Mitch Curtis <[email protected]>
By not comparing the Dial's value against 1 eight times.

Amends 42687ca.

Pick-to: 6.8 6.10
Change-Id: I67bc64c517d06a176ba4b2189f5755f954915ae1
Reviewed-by: Oliver Eftevaag <[email protected]>
- Move exclusions common to all tests into a variable that we can reuse
- Keep one entry per line to keep git blame useful
- Sort entries alphabetically

Pick-to: 6.10
Change-Id: Ib4bd520339d5378ee74b82e414bf994b321d8c7b
Reviewed-by: Oliver Eftevaag <[email protected]>
- Move exclusions common to all tests into a variable that we can reuse
- Keep one entry per line to keep git blame useful
- Sort entries alphabetically

Pick-to: 6.10
Change-Id: I28f2816e3431bb7ca22f6d8a019354a4282fded1
Reviewed-by: Oliver Eftevaag <[email protected]>
Followup to a6b55b3c46cf47d560e10a4b69db24a475261546

Change-Id: If35cb2b3ab5654549e76fc18ad094acdc7a832eb
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Eirik Aavitsland <[email protected]>
It more acurately captures what the flag means.

Change-Id: I638f03fcdcbe48cb464c615e26ee396f8959d63f
Reviewed-by: Sami Shalayel <[email protected]>
SearchOptions is being default constructed in several places.

The constructors need to be out of line because otherwise they are not
yet available before the end of the outer class.

Amends e3891d7

Change-Id: I7fe09afda75d9d75d19d94fda7bf73fdfe014a1b
Reviewed-by: Ulf Hermann <[email protected]>
This can help users identify typos in section names such as
[Warning] -> [Warnings].

Change-Id: I6984c3b5f3f06b8a393f83b951f47b05b5565efd
Reviewed-by: Ulf Hermann <[email protected]>
It gets called again for every file anyway and may actually cause issues
by overriding previous changes made to categories.

Change-Id: I9ed4444f2bf2012a19dfdacd7fe0798faa5942f6
Reviewed-by: Sami Shalayel <[email protected]>
Task-number: QTCREATORBUG-33305
Change-Id: I9e23a755da0354ab1d64b7f50ff6f9cc7acbe85a
Reviewed-by: Sami Shalayel <[email protected]>
It's moved to qtdoc module

Change-Id: Iae61a9aebc45eaf661e393f8d587ec3c8f0cc6a9
Reviewed-by: Tor Arne Vestbø <[email protected]>
Change-Id: Ic4def3b9649cf369be97b18cf7916ddef4ee5ade
Reviewed-by: Shawn Rutledge <[email protected]>
uiLanguage is a property of QJSEngine, not QQmlEngine.

Pick-to: 6.5 6.8 6.10
Change-Id: Id865f969119d8a5aef2e46d1b673db97da6e40f9
Reviewed-by: Ulf Hermann <[email protected]>
Change-Id: I4dbd22b76d1a6e1d9029a3b0bd454e7bdf1dd526
Reviewed-by: Qt Submodule Update Bot <[email protected]>
ulfhermannqt and others added 30 commits November 27, 2025 11:55
Script references to QQmlDelegateModelItems were references held by
either the created delegate object, the incubation task, or the heap
object that holds the QQmlDelegateModelItem. However, for the object and
the incubation task we only incremented the script reference counter if
they were not populated by QQmlTableInstanceModel. Indeed it makes very
little sense to hold a script reference for those in general. The
incubation task is explicitly checked on isReferenced() and for the
object we have a separate reference count.

Encapsulate the reference counting and drop the unnecessary references.
Check the object in addition to isReferenced() where it matters.

Task-number: QTBUG-141963
Change-Id: Id0fcb7d36afcfc131f52584fc9bcab8989ff7fc1
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Since there are two kinds of references, we need to be more specific.

Task-number: QTBUG-141963
Change-Id: I8583b91fab62abec49a5f71652e8c04fa8906b7b
Reviewed-by: Fabian Kosmale <[email protected]>
I've caught it timing out by just a few ms several times.

Change-Id: I0f9d80421a5845dc0582fd028c7c3d33d9f6bc54
Reviewed-by: Fabian Kosmale <[email protected]>
Reviewed-by: Mitch Curtis <[email protected]>
We cannot encode the "running" state of a profiling adapter into the
features it's recording. It may be started with no actual features
enabled and then we still need to stop it eventually.

In order for the QmlProfiler test to work without the DebugMessages
feature we still need to create the DebugMessages client, but ignore its
output. Otherwise the logic that checks "unrelated" clients gets
confused.

Change-Id: I52a3c2bc55ea36454ab9c8c7f25fe833c7f14a43
Reviewed-by: Sami Shalayel <[email protected]>
I've caught it timing out on these.

Change-Id: I0fd7d575823fab857d4e24d5841e8d6708f00a93
Reviewed-by: Sami Shalayel <[email protected]>
Reviewed-by: Mitch Curtis <[email protected]>
This patch removes an optimization where we std::move the changed
register into its target. A copy is performed instead. This resolves
the more urgent issue of miscompilations.

QTBUG-141920 has popped up and was either exposed or introduced by
b303e06.

That change performs optimizations that avoid intermediary copies of
values between registers. It was found that, in the process, the mapping
from RegisterContent to variable name stored in m_resiterVariables was
changed. One RegisterContent no longer uniquely maps to a variable name
because of the direct moving of values to their destination. The
registers alias the same value. This could cause issues and might need
to be addressed.

The original std::move was only added after 6.5 by
3193911. Cherry-pick to the later
versions.

Fixes: QTBUG-141920
Pick-to: 6.10 6.8
Change-Id: Ie6dad1a809ac5ee08de70971ec92d3c97fc50080
Reviewed-by: Olivier De Cannière <[email protected]>
This patch introduces a new styling API for Controls called
StyleKit. StyleKit provides a higher-level, key–value–based
approach to styling applications, serving as an alternative
to working directly with the lower-level Templates API.

The primary goal of StyleKit is to offer a unified API for
styling both Controls and Widgets. The current Templates-based
approach relies heavily on JavaScript, which makes it unsuitable
for use with Widgets. This initial version supports Controls
only; support for Widgets will be added in a future update.

StyleKit is designed to make it easier for designers and UI
developers to:

- Focus on visual styling rather than Template logic (such as
  geometry, delegate positioning, and handle placement).
- Allow style properties to propagate, enabling you to factor
  out common styling into shared control types and override only
  what differs in the more specific control types.
- Style controls independently in each of their states, without
  needing nested ternary expressions to check state.
- Define and apply multiple themes with minimal effort.
- Provide different style variations depending on context.
  For example, styling a Switch differently when it appears
  inside a ToolBar.

[ChangeLog][Qt labs] Introduced new QML module 'StyleKit'.
StyleKit provides a flexible styling framework for Qt Quick
Controls, enabling developers to define reusable styles and
themes using a simple key-value property format.

Change-Id: Iae25324486aea7a7b9b2ce52135327ec7e9b6f59
Reviewed-by: Mitch Curtis <[email protected]>
This patch will add a new example to Controls that demonstrates the
new StyleKit API that has recently been added to Qt.labs. It
contains a few styles that the user can choose between, where each
style has a different level of complexity.

Change-Id: Ie193105c05759eee2b4f4deb9d1932448d7e36c5
Reviewed-by: Doris Verria <[email protected]>
This patch introduces 'virtual' and 'override' keywords.
From the grammar perspective they are qml contextual keywords,
first of all to preserve backwards compatibility
(do not break the users code if they had object attributes named
 "virtual" or "override")
"final" is made qml contextual keyword for the sake of consistency
(to treat all "virt specifiers" equally)

Change-Id: Ice13a77c8b54ce8219cd45cc7085fb3f10a5e908
Task-number: QTBUG-98320
Reviewed-by: Ulf Hermann <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Add const references to the loops to avoid copies.

Change-Id: I08cfc615d5a40e88a41de23750a0416b6309b1dc
Coverity-Id: 897432
Coverity-Id: 897433
Reviewed-by: Ulf Hermann <[email protected]>
Don't take unnecessary temporaries and move values into place.

Change-Id: I2b871c365e068a8665c03497f72b91106001a0cd
Reviewed-by: Sami Shalayel <[email protected]>
This will match them with Q4A.

Task-number: QTBUG-138877
Pick-to: 6.10
Change-Id: Ia5cb1954b361f7f0abb788c326045f71da202607
Reviewed-by: Assam Boudjelthia <[email protected]>
Change-Id: Ic9eeeb5658f9f6251191406a68649705b6389b55
Reviewed-by: Qt Submodule Update Bot <[email protected]>
This patch will add support for Instance Variations. Instance
Variations allows you to define one or more style variations in
a StyleKit style that can be activated from the application
using an attached 'StyleKitControl.variations' object.
Instance Variations will affects all descendant StyleKitReaders
of the item that contains the attached object.

For example, if you set "StyleKitControl.variations: ['mini']"
on a GroupBox, all controls inside that GroupBox will
be affected with the variation named "mini" in the style
(if any).

Inside a variation, you specify which controls should
receive alternative styling when the variation is applied.
Any properties defined in a Variation override those
set in the Style or Theme.

In order to support Instance Variations, this patch will also
refactor how we implement Type Variations, which are variations
that applies to _all_ controls of a specific type, rather
than to individual instances.

Change-Id: I6486979281997e69b65da0ed4866b264c91c592f
Reviewed-by: Doris Verria <[email protected]>
macOS 26 (Tahoe) changed NSSearchFieldCell: the magnifying glass icon is
taller. Drawing it at the button's full rect causes the top to be clipped
by the bezel, though the clear icon remains fine. To avoid this, we
render the search icon at a fixed, smaller size to prevent upscaling
and eliminate clipping after 26.0.

Fixes: QTBUG-141776
Pick-to: 6.10
Change-Id: Ifb5f4476253e55e700b8b89e864afdbb2ceedd8f
Reviewed-by: Richard Moe Gustavsen <[email protected]>
They need to link the styles they import so that the dependencies are
clarified (and also they'll in fact need the linkage if we ever compile
them in direct mode).

Pick-to: 6.10
Task-number: QTBUG-137440
Change-Id: I6edaba4390dce4f9cc2b95586f28331192cc01ff
Reviewed-by: Mitch Curtis <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
We need strong references for the cases where we place guards on the
stack to prevent the deletion of the objects, and weak references we
hand out to the view. The views don't systematically track the objects
they hold and generally use a QPointer as second line of defence. In
certain cases we cannot avoid deleting objects that are in fact still
referenced as the clearObjectWeakReferences() call shows. If the
QQmlDelegateModel itself is deleted while some view still holds a weak
reference to an object, we cannot avoid deleting that object, no matter
if the view agrees.

Also, we can do with 16bit numbers for the references. The guards on the
stack are rather few and you'll overflow the stack before you hit the
16bit maximum. The references handed out to the views are generally one
or two per item.

Task-number: QTBUG-141963
Change-Id: Ifb79e993abcaf4c169b08641ebc2a6378e0a4776
Reviewed-by: Fabian Kosmale <[email protected]>
There are cases, such as Item2D in QtQuick3D, where a Qt Quick user
interface is not placed directly inside a QWindow. In that case,
Menu and other Popup items need to be shown in the context of the
toplevel Item rather than the window.
There are two separate Popup implementations: A popup can either be
a toplevel window known to the windowing system, or it can be an Item
that lives in a special Overlay layer, which normally fills the entire
window.
This change adds private C++ API in QQuickItemPrivate to add a custom
Overlay to an Item. This does not in any way affect the case where a
popup has its own toplevel window.

Task-number: QTBUG-142145
Change-Id: Ic96a450f6d47e43d1ffc8226b27c1dc5d62e3497
Reviewed-by: Oliver Eftevaag <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
It only calls dvValue(). Replace all usages, and change the second
argument to use PathEls::Field(). This helps unclutter the DomItem
interface.

Task-number: QTBUG-142187
Change-Id: If32856e115528c1c0f8db737e8c7c78d3912c233
Reviewed-by: Semih Yavuz <[email protected]>
It only calls dvItem(). Replace all usages, and change the second
argument to use PathEls::Field(). This helps unclutter the DomItem
interface.

Task-number: QTBUG-142187
Change-Id: Ieb14e4cf1d542ba257ec3d23b290504148cbf5ed
Reviewed-by: Semih Yavuz <[email protected]>
It only calls wrap(). Replace all usages, and change the first
argument to use PathEls::Field(). This helps unclutter the DomItem
interface.

Task-number: QTBUG-142187
Change-Id: I3aeda82b95948dde7bb7b07ab573585ac11958a6
Reviewed-by: Semih Yavuz <[email protected]>
It only calls its first argument with the two other arguments, and does
not use this. Remove it and replace all usages with a direct call.

Task-number: QTBUG-142187
Change-Id: Icb42f38199803ee5c1fac1636d10430e7385551b
Reviewed-by: Semih Yavuz <[email protected]>
dvValue is not really expressive, rename it to show that it calls the
visitor argument on a value-wrapped version of its value argument.

Task-number: QTBUG-142187
Change-Id: I95e37f72e8596185294ecf92452b6925eb17e606
Reviewed-by: Semih Yavuz <[email protected]>
dvWrapField is not really expressive, rename it to show that it calls the
visitor argument on a field-wrapped version of its field argument.

Task-number: QTBUG-142187
Change-Id: Ied467d5fa857934dea069982672f313cd961eb67
Reviewed-by: Semih Yavuz <[email protected]>
dvReferenceField is not really expressive, rename it to show that it
calls the visitor argument on a reference-wrapped version of its
reference argument.

Task-number: QTBUG-142187
Change-Id: I2ceb90b63e3e63bb4acd9f5d19278eddf1a51a3a
Reviewed-by: Semih Yavuz <[email protected]>
dvValueLazyField is not really expressive, rename it to show that it
calls the visitor argument on a field-wrapped version of its lazy
field argument.

Task-number: QTBUG-142187
Change-Id: I96b065a55257e62d5d6b970a5487c33b389a0b04
Reviewed-by: Semih Yavuz <[email protected]>
Pick-to: 6.10 6.8 6.5
Change-Id: I1bd30625e474ea4e36c6fb252afbbe2cd9e17162
Reviewed-by: Ulf Hermann <[email protected]>
Change-Id: I3dbd469b26914b0380bb781c1c2993a43657bd4e
Reviewed-by: Ulf Hermann <[email protected]>
Lottietoqml and the corresponding VectorImage backend are no longer
in tech preview in Qt 6.11.

Change-Id: I73647ff0d1df263b314b0535d988823b44afa34b
Reviewed-by: Eirik Aavitsland <[email protected]>
It uses FolderListModel.

Pick-to: 6.10
Task-number: QTBUG-137440
Change-Id: I44cc4f312dddde756bbb33aa7a564c1c4085c75e
Reviewed-by: Alexandru Croitor <[email protected]>
Reviewed-by: Sami Shalayel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.