-
Notifications
You must be signed in to change notification settings - Fork 194
Calls order of q_invokable method #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 6.2
Are you sure you want to change the base?
Conversation
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]>
Santhosh Kumar 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. |
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]>
The Qt SVG parser depends on having a QGuiApplication in order to load e.g. fonts. We want to prefer the default plugin on desktop platforms, since you will then be able to use SVGs that depend on system fonts as well. However, in a host build, where there are no GUI-enabled QPA plugins, we fall back to offscreen, which has some font support but which does not depend on a window manager. Task-number: QTBUG-139976 Change-Id: Ia9a5239c3d16f1daa4ad68d66412f519109361c2 Reviewed-by: Eirik Aavitsland <[email protected]>
As part of the comment generated by svgtoqml, we would include the entire file path as it was provided in the arguments. With the introduction of the automatic svgtoqml build step, this argument will now include the full absolute path. Since the QML file is embedded in the binary, this caused internal file paths from our build farm to leak into the binaries, triggering an alert in the QA system. Change-Id: Iecffb5cfcf1cee127186b2c5d2e21e2ccc47f48a Reviewed-by: Samuli Piippo <[email protected]>
QT_NAMESPACE is a public API to access the namespace from the Qt::Core target, replacing the private _qt_namespace property Pick-to: 6.10 Change-Id: I013be62bbe9068e0a9eb77ea2ffb40ac2f2f1b2e Reviewed-by: Alexandru Croitor <[email protected]>
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]>
Also ifndef QT_NO_DEBUG_STREAM around the QQuadPath debug op. Both will be omitted from the build if QT_NO_DEBUG_STREAM is set. Change-Id: Ie86577ba61fc4f2b118d7e0a2b1ab702b318a473 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
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)
The section item has not been removed or added to the section cache in all cases when the corresponding delegate item has been moved out of the visible area, either during flick or scroll. This happens in a case where the delegate item has been requested to be removed (as it goes out of the visible area) from the list view, but it's not released from the delegate model due to its caching mechanism. When an item is outside the visible area, releaseItem() is triggered, intended to free the item and its sections. The problem arises when releaseItem() calls QQmlInstanceModel::release(), which caches the item in the delegate model, but does not free the section. This prevents the section item from being released properly. This patch releases the section item whenever removeItem is triggered from the list view, which happens when the delegate item is moved out of the visible area. Fixes: QTBUG-137172 Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ib7e78309e076e76750b03f3238a7501563a3962a Reviewed-by: Oliver Eftevaag <[email protected]>
Without this we effectively soft-leak the contents of any SimpleArrayData whenever we truncate it. Only when the array was either completely dropped or re-filled would the extra objects be reclaimed. Task-number: QTBUG-139025 Pick-to: 6.10 6.9 6.8 Change-Id: I88e9dc3ea8ec57c1de71b7b5417ebcfbaa75bb61 Reviewed-by: Fabian Kosmale <[email protected]>
When writing through a delegate, the original data is already written. We are only missing change signals. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I3124a8dc5852e3858a1e9bd9b74c07608bb5e446 Reviewed-by: Fabian Kosmale <[email protected]>
Instantiator is almost entirely useless without QQmlDelegateModel. The only thing you can do is give it a list of pre-constructed objects which it then reflects in its own "objects" property. I don't see a reasonable use case for such a thing. [ChangeLog][QtQml] If you build with -no-feature-qml-delegate-model, along with most functionality of QtQml.Models, Instantiator will also be missing now. It makes no sense to provide an Instantiator that can't actually instantiate anything. Change-Id: If0c31346c43ebea21abf1aef53dc3a76f96f6fbd Reviewed-by: Fabian Kosmale <[email protected]>
Use the common pattern for setModel() and use QQmlDelegateModel::createForView(). In turn, remove the hacky effectiveReset mechanism. Also remove the "initial 0" optimization. There's barely a point to this since the default model is 1. You had to go out of your way to trigger it. Change-Id: I80030ef36b82b312e6b7600616eebf2615a2f3d8 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
If the model contents change we need to notify. This enables the signal propagation for Instantiator, Repeater, ListView, and GridView. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I384dcd296068ca7abfd1cad9fe662ae6e8938338 Reviewed-by: Fabian Kosmale <[email protected]>
QSvgRenderer already obeys the QPen::isCosmetic() setting. Now we add a ShapePath.cosmeticStroke property and try to support cosmetic stroking both with SVG and with Shapes, in all renderers. The curve renderer now starts with skinny triangles: each segment's end vertices are passed to the vertex shader with their original positions, and the shader uses the normal and the stroke width to expand the stroke triangles outwards as needed. We always add triangles for end caps, regardless whether they are square or round. We get rid of addBevelTriangle and fix bevels, square caps and miters: All three of these cases are done by drawing lines adjusted to the right direction within the respective triangles. And to avoid seeing rounded ends at any reasonable zoom level, we need the line equation coefficients to take the line very far outside the actual triangles. Square caps are really square: we render line segments in those three triangles, not extensions of the adjacent curve or line. Miters are also rendered as straight tangent lines. The bevel's triangle is very short when the join is an acute angle, and almost as tall as the full stroke width when the join is very obtuse. But when the triangle is short, we need to diminish the stroke width rendered in the fragment shader so that the center of the stroke falls on the inner corner of that triangle, and the edge of the stroke is rendered along the outer bevel edge rather than trying to go outside. That's achieved by multiplying the stroke width by the cosine of half the total angle, AKA the dot product. That is now in the normalExt.z vertex attribute. Normals (normalExt.xy) can be premultiplied rather than normalized: in fact some of them already have length > 1. In qsgbatchrenderer, Renderer::prepareAlphaBatches() breaks batches when overlaps occur. Now that we stroke lines with vertices that represent them as zero-width lines (and thus Element.bounds has the same x or y coordinates on both corners), we must consider lines right on top of each other to be overlapping: e.g. the stacks of horizontal (dashed) line segments in paint-stroke-202-t.svg must be in separate batches. At the time QQuickShape::updatePaintNode() is called, the available transform node (from UpdatePaintNodeData or an individual node's parent which is a transform node) does not contain the scaling factor that we need to allow for the stroke width to be adjusted for cosmetic stroking. But in QQuickShapePrivate::sync(), windowToItemTransform() is known, and from bde55ad we have a precedent in QSGCurveStrokeMaterialShader::updateUniformData() for using the square root of the matrix determinant as a scaling approximation (ok when the scaling is uniform). QQuickShapeSoftwareRenderer::setNode() was already adjusting a path's bounding rect by its stroke width, and we need a multiplicative factor there to account for cosmetic stroking, to avoid excessive clipping in the software renderer. So now we have another use for the triangulationScale that was introduced in bcfcaeb. When QQShapeGenericRenderer is used (rendererType == GeometryRenderer), and any ShapePath has cosmeticStroke, we need it to re-triangulate whenever scale changes. QQuickShapeGenericRenderer::triangulateStroke() calls QTriangulatingStroker::setInvScale(1 / triangulationScale), and QTriangulatingStroker::process() multiplies its m_width by the inverse scale that was set (since 2009). So this tells us that the intended meaning of triangulationScale is the inverse of the factor by which we multiply the pen width. And when QQShapeGenericRenderer is in use, and there are cosmetic strokes, QQuickShape::itemChange triggers re-triangulation on changes in scale. When setting the QQuickShapeCurveRenderer::DebugWireframe debug visualization flag, we need to repeat the vertex shader calculations to expand the "skinny" triangles according to stroke width, just as we do with the actual stroking vertices. For now customTriangulator2 remains as legacy code, to be removed later on. It's poorly named, and returns a list of TriangleData which need to be iterated afterwards ("fix it in post"), looking up the QQuadPath::Element again in that second loop, which can go wrong when a path contains a move command. (For example, it could calculate a bevel between the end-tangent of one subpath and the start-tangent of the next.) customTriangulator2() was called from only one place, processStroke(), to which addStrokeTriangleCallback() is given: so the new way is to just call the callback directly as soon as we've calculated each triangle. Because we are not iterating again afterwards, the switch(type) is not needed in that case, and we no longer need TriangleData::type, except for supporting customTriangulator2(). [ChangeLog][QtQuick][Shapes] ShapePath now has a cosmeticStroke property which causes strokeWidth to be constant despite scaling. Set the environment variable QT_QUICKSHAPES_STROKE_EXPANDING to 1 to enable an experimental method of expanding strokes in the vertex shader, minimizing the need to re-triangulate when strokeWidth changes. Task-number: QTBUG-124638 Change-Id: I4eac0ddcd6f623b79bc70c766ff116f4b77736cb Reviewed-by: Paul Olav Tvete <[email protected]> Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
Change-Id: I36862f842ece2432733036da18f2ab1cd663a4e9 Reviewed-by: Shawn Rutledge <[email protected]>
Pick-to: 6.10 6.9 Change-Id: Ie20dbbc0edcd1a559209322e2f297aefc3fb121b Reviewed-by: Tor Arne Vestbø <[email protected]>
Unwrap any QJSValues right away and eliminate a copy of the model. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I7f4a3ea97ae64cf0bb24aa032f8307c56bf7a597 Reviewed-by: Santhosh Kumar <[email protected]>
Change-Id: I3f3a58771d2721dc822add922c16a7efab3024ab Reviewed-by: Ulf Hermann <[email protected]>
Amends 288e03a that removed the need for the ParseMode struct, but didn't removed it. Change-Id: Id5b05b1e3c4907c42f822b4722cc721fc39c5125 Reviewed-by: Ulf Hermann <[email protected]>
Split the buildPathsForFileUrl method into a static helper method. Future commits will use it to add early exits in buildPathsForFileUrl(). Change-Id: Icadb89e8ea04bcf3e07f6b163c2cf9213e7d5945 Reviewed-by: Ulf Hermann <[email protected]>
It's the length of the groupNames +/-1, depending on context. We often want to count from 1 to end included, because the flags are offset by one. That does not change the number of groups, though. Change-Id: I6dfd4cc6f31bf85156a54b8ff3164e4275c7ff15 Reviewed-by: Sami Shalayel <[email protected]>
QQuickTreeView can't handle array or object models and therefore we don't need to take special measures to propagate changes to arrays back out of the view. Change-Id: I0d0bc2ea04b5862c1a2eac71cb9f5195c5b07af6 Reviewed-by: Sami Shalayel <[email protected]>
You can override a QObject method with a JavaScript function and take away the JavaScript function later by swapping out objects. This should not crash. Pick-to: 6.10 6.9 Fixes: QTBUG-140074 Change-Id: I85b17f4f619235024d0f1a27b4ff4128c7a57083 Reviewed-by: Sami Shalayel <[email protected]>
If the delegate changes the model, those changes need to be visible in the "model" property of the view. To this end, use QQmlTableInstanceModel's model variant instead of the assigned one once it has been synchronized. The inner change signaling from the delegates to the view will be added in a separate change. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: I1296fa2c886dad063b6b39defef56cb7faf1e943 Reviewed-by: Sami Shalayel <[email protected]>
Allow QQmlDelegateModelItemMetaType to store any QQmlInstanceModel, but also store the kind of model we're dealing with so that we can quickly produce a QQmlDelegateModel or a QQmlTableInstanceModel when necessary. This allows us to send the modelChanged() signal. We do not expect to perform the same trickery that QQmlDelegateModel and QQmlTableInstanceModel do more often. Therefore this solution does not need to scale beyond those. Pick-to: 6.10 Task-number: QTBUG-139941 Change-Id: Id6d2a8ae5f96b755a776eb354e6ae291314dbf7b Reviewed-by: Sami Shalayel <[email protected]>
Previously it was returning event->allPointsAccepted(), which can be false even if the event was accepted, because the event points' accepted states are set to false before delivery. This fixes an issue where a MouseArea under a ContextMenu created by a text editing control would emit its pressed signal when a MenuItem in a popup window above it was clicked. Fixes: QTBUG-139342 Change-Id: I4d4043929c316a8e70fecdb4a8b23b48f9442390 Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
Otherwise one gets errors like the following in standalone examples build: CMake Error at tools/svgtoqml/Qt6SvgToQmlMacros.cmake:65 (add_custom_command): Error evaluating generator expression: $ No target "Qt6::svgtoqml" Because the examples now use the new qt_target_qml_from_svg() function, which will try to reference a non-existent svgtoqml tool target. Change-Id: I16b10c4fa31bd73d0d95bbad371cde54f17c236a Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
The introduction of QQmlCodeModelManager made the per-root-url build path map of QQmlCodeModel redundant. Replace the per-root-url build path map with a single list of build paths. The API is adjusted accordingly: - replace buildPathsForRootUrl() with buildPaths() - replace setBuildPathsForRootUrl() with setBuildPaths() - remove unused helpers for root-url matching The build paths are now stored in a QStringList instead of a QHash keyed by root URL. This simplifies the logic in buildPathsForFileUrl(), which now falls back directly to settings when no explicit build paths are set via the environment or the commandline option of qmlls. Also fix a test to actually write a settings file on disk, as we now avoid reading settings values if no settings file was found. Change-Id: I4e7f409a9cf1368cc6afa134a1386fd98833693f Reviewed-by: Ulf Hermann <[email protected]>
The wheel event was stopping at a position where the cursor is very near the edge of one delegate; let's stop a bit sooner so that it's obviously inside. Change-Id: I76ce618ffe321aeb4ff125a9f4342e62221724a5 Reviewed-by: Shawn Rutledge <[email protected]>
By not testing for these extra errors they get treated as if the request itself was a failure, rather than the server returning an error as a perfectly valid response. Amends 1faca90. Pick-to: 6.10 6.8 Fixes: QTBUG-141063 Change-Id: I3c7aee696ada58de8f1c2dcf7d4c941e644c6ab1 Reviewed-by: Ulf Hermann <[email protected]>
The fact that a qmlfir file needs to be written manually when using qmake was not really mentioned before. Pick-to: 6.10 6.8 6.5 Change-Id: I174ade01d5e8bd28626939f7257717070c4d220f Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Leena Miettinen <[email protected]>
When we paint text with any other style than Normal, we will offset painting by up to 1 logical pixel. To avoid clipping the style, we need to make sure the bounding rect of the text also accounts for this. This does overestimate the bounding rect in cases where the dpr is not 1, but this is better than underestimating it. Pick-to: 6.10 6.8 Fixes: QTBUG-137404 Change-Id: I670a3709fcc6ac7fd6d58a8d524f534800cafdff Reviewed-by: Eirik Aavitsland <[email protected]>
The setup was done, but the actual test was not. Amends commit 8f1bfc0 Change-Id: I5a1b423b6790e9136e437be6cde6f96b2d4d54bc Reviewed-by: Fabian Kosmale <[email protected]>
Remove the redundant Highlights class and move its functionality directly into HighlightingVisitor. The redundant class was essentially just a wrapper around highlighted token container, which can be handled more directly. Adapt the tests. Pick-to: 6.10 6.8 Task-number: QTBUG-140645 Change-Id: I739c69ea35bb1bec4a2e4c242189dd440d5df39f Reviewed-by: Sami Shalayel <[email protected]>
Rename Token struct to HighlightToken to better reflect its purpose and avoid confusion with other generic token types. Pick-to: 6.10 6.8 Task-number: QTBUG-140645 Change-Id: Ieba550aa3624eade3a3ce1c486dccdbfd2c67c22 Reviewed-by: Olivier De Cannière <[email protected]>
Introduce QmlHighlighting namespace for better organization. Move utility functions to nested Utils namespace. Update all references throughout the codebase accordingly. Pick-to: 6.10 6.8 Task-number: QTBUG-140645 Change-Id: I3ad4e5fdd4abdfcb746441acf29594711af13f90 Reviewed-by: Sami Shalayel <[email protected]>
Make the highlighted token class protocol agnostic by removing protocol specific fields, and store custom highlighting types and modifiers instead. Move the logic that converts token types to protocol specific integers to encodeSemanticTokens. This simplifies HighlightingVisitor by removing protocol mapping dependency and makes the tests protocol agnostic too. (before we weren't testing QtC highlights). Pick-to: 6.10 6.8 Task-number: QTBUG-140645 Change-Id: Ia0e84b50941f84855c4a1525f97a0d21da0f3947 Reviewed-by: Olivier De Cannière <[email protected]>
Overriding the function only to then call the base implementation and nothing else is not very productive. Change-Id: Ib3cba0d38de652c94689b0bac5e878f629e35bd3 Reviewed-by: Fabian Kosmale <[email protected]>
All the conversion back and forth only adds noise and overhead. Use an array of std::byte to trick the memory manager into believing that QV4::Heap::UrlObject is still trivial. Task-number: QTBUG-138545 Change-Id: Ic382741d441cfb8a7446d6c46ded77173325ce34 Reviewed-by: Sami Shalayel <[email protected]>
There were two different error messages that mean the same thing. Change-Id: I656333ab089f345580e31d63cd8ce7412b223d04 Reviewed-by: Olivier De Cannière <[email protected]> Reviewed-by: Sami Shalayel <[email protected]>
The tree view inserts items into their parent during expansion in QQmlTreeModelToTableModel::showModelChildItems. However, this causes a problem when a new item is inserted and the same parent (which is already expanded) is expanded again due to a change in its children, resulting in a double insertion: once during the row insertion, and other during expansion. This patch prevents triggering QQmlTreeModelToTableModel::showModelChildItems when the node was not previously expanded but becomes expanded during insertion (for example, when expand() is explicitly called due to child changes). Fixes: QTBUG-139344 Pick-to: 6.10 6.8 Change-Id: Id88158b2628445c1aaafeff01dd5c9ff22e3c502 Reviewed-by: Richard Moe Gustavsen <[email protected]>
When the source height or width is not an integer number of pixels, the texture size will be rounded up. This could cause the bottom/right edge of the texture to be omitted, since the target size for the image node was also not in whole pixels, and the pixel coverage for those edge pixels could become <= 50%. This patch rounds up the targetRect to match the texture size, so it will be rendered at exactly 1:1 when the scale factor is 1. Note that this only fixes the issue for integer scale factors, since the target size is calculated in updatePaintNode, which is not called when the scale changes. Fixes: QTBUG-136783 Pick-to: 6.10 6.8 Change-Id: I0d04e4efa65d4a77f842fc3093a143ceb6666608 Reviewed-by: Eirik Aavitsland <[email protected]>
Pick-to: 6.10 Task-number: QTBUG-140645 Change-Id: I002346ee4623d87dcf06484000a826958bbf2a64 Reviewed-by: Fabian Kosmale <[email protected]>
This change fixes setting the background or foreground explicitly to the theme default. The value did not persist. Example case for background: The default m_hasBackground is false and background color is globalBackground that is 0xFFFAFAFA, so if user sets the background color to 0xFFFAFAFA the logic skips it by doing early out and doesn't set m_hasBackground to true. Fixes: QTBUG-140068 Change-Id: I26f1182d808354f34800dc62760e5498cbd77b3b Pick-to: 6.10 6.8 Reviewed-by: Mitch Curtis <[email protected]>
Resetting foreground and background values did not propagate to children when the earlier value matched theme default. Stop pre-clearing m_hasX/m_customX in reset. Clearing these variables prevents propagating the values to children due to early exit conditions in the inherit functions. Clear only m_explicitX and call inherit with the parent's values. m_hasX/m_customX values are then cleared in the inherit function, if changed. This guarantees propagation to children even when the color is unchanged. Pick-to: 6.10 6.8 Change-Id: Ie4f7276d43afbfaf5b4d10ccf658f27000d640d9 Reviewed-by: Mitch Curtis <[email protected]>
Because it's not important to the server what case the headers names has. Task-number: QTBUG-137203 Pick-to: 6.10 6.9 Change-Id: I4e030ec3a7f051d6d063f0bbc040d2d56b51fbea Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
QQuickTest::showView() already ensures that a window becomes visible. We don't need to repeat that manually in the test after calling it. Pick-to: 6.10 Change-Id: Id8cadeb619544ee7b871fdff98f4b93a8a0c52ed Reviewed-by: Shawn Rutledge <[email protected]>
We want the default XML format for profiling data to be available to all debug clients since we will need it in other places. This also clarifies the interface of the event receiver and opens the path to having another implementation that produces the .qzt format. Change-Id: I4b0cd263a85996f61f2d3d14bdda616bd44e95b2 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
find_package(Foo) no longer implies find_package(FooPrivate), so this needs to be made explicit. Change-Id: I281b376c123bde0b0e067f2fc329a5e4d28ebfca Reviewed-by: Eirik Aavitsland <[email protected]>
Amends 641883c. This change fixed an issue when cross-compiling and a platform plugin is not available. It selects the offscreen plugin when this case is detected, but uses the default platform plugin otherwise, since the offscreen plugin has limited support for fonts so we do not want it as the default. However, this did not fix the case where the platform plugin exists but there is no windowing system, e.g. when building over SSH. Luckily, the minimal QPA plugin does have proper font support and also works over SSH. We can therefore use this as the default as long as it exists. The only exception is if we need GUI to preview the result (if -v is specified or if there is no output file.) Task-number: QTBUG-140675 Change-Id: I967c8649be070c7ffc6541d033603c8e0e5c6eae Reviewed-by: Eirik Aavitsland <[email protected]>
PageTab is really like a button, or something you can click on to display the selected tab. It is not the contents of that tab. Change-Id: I4ddd87541512a3712d9ca65e7336c8d9018d1023 Reviewed-by: Jan Arve Sæther <[email protected]>
Instead of just using transform property itself for this, the <use> node in SVG has an additional offset property which is documented to be a "final offset transformation". We would previously apply this as the x and y coordinates of the item in the generated Qt Quick code, which works when there is no other transform on the item (or the only transform is another translation). But since the x and y is applied before the other transforms, if we scale, rotate, etc. the coordinate system, then we would get the wrong position. Pick-to: 6.10 Change-Id: I72b05439c06619231cfc5d4ba5a639e06d7aa184 Reviewed-by: Hatem ElKharashy <[email protected]> Reviewed-by: Eirik Aavitsland <[email protected]>
Let the CMake structure reflect the existing module structure while making use of the auto-generated qmldir files. The qmake project and Qt Design Studio project are unaffected as they continue using the manually-written qmldir files. Drive-by edits: * Renamed the (unused) URI of top-level module to disambiguate it from the module that contains the actual styling code: "flatstyle" -> "FlatStyleApp" * Updated the docs to talk about QML modules instead of plugins Task-number: QTBUG-132922 Change-Id: I163a6c6a86a4eaf210a18433e6e5ea1f1fc67dd2 Pick-to: 6.10 6.8 Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
See which HoverHandlers are hovered when testing by hand, even if cursor-changing is buggy. Also check the mouse HoverHandlers after sending a QTabletEvent. Change-Id: I7ffa165235eaa8ac726733a27de728ef9a88a7c4 Reviewed-by: Shawn Rutledge <[email protected]>
warning C4996: 'Qt::Desktop': This flag has been a no-op since Qt 6. Change-Id: Ieef90570300f55c4cb7a85284876059d40f05f70 Reviewed-by: Fabian Kosmale <[email protected]> Reviewed-by: Jan Arve Sæther <[email protected]>
User code connected to onTextChange may cause changes which affect the text cursor visibility state, for example by moving focus to a different item. Set set text cursor visibility state before updating the text in order to avoid overwriting state changes from user code. Fixes: QTBUG-131895 Pick-to: 6.10 6.9 6.8 Change-Id: I8e8ae7497b56067eb251e318c1fbff23c8e46332 Reviewed-by: Lorn Potter <[email protected]> Reviewed-by: Piotr Wierciński <[email protected]> Reviewed-by: Shawn Rutledge <[email protected]>
When generating qml for an animated transform, we check for each property if the value actually changes, and if not, we generate just constant property assignment instead of an item to be animated. If it turns out that the whole transform is constant, we would still generate the animation block, but it would contain no actual value animations. This is both redundant, and would cause a warning message if the whole generated scene was paused ("setPaused() cannot be used when animation isn't running"). Fix by only generating the animation block if any of the transform property values is non-constant. Change-Id: Iec9c7b580ab6245c46d6de8693f8c83a170d5049 Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
It crashes when failing to acquire UI thread deadlock protector that's acquired by input context. The reason this happens is that some QML tests have a TextEdit or TextInput based elements that ends up doing some operation that blocks the UI thread even after the test case is finished and then when a next test case tries to create a window surface it finds the UI thread blocked. Skip these for now, otherwise a solution needs to be found under QTBUG-139400. This includes: * tst_qquickwidget::focusOnClickInProxyWidget * tst_QQuickContextMenu::textControlsMenuKey() * tst_QQuickContextMenu::mouseAreaUnderTextArea() Fixes: QTBUG-141161 Task-number: QTBUG-139400 Pick-to: 6.10 6.8 6.5 Change-Id: I61eed34d79aaa88c46937610dec962dcecf5c716 Reviewed-by: Rami Potinkara <[email protected]> Reviewed-by: Soheil Armin <[email protected]>
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.