aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertycachevector_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQmlPropertyCache: Allow property cache vector to be size-resetUlf Hermann2023-05-261-11/+25
| | | | | | | | This drops all the property caches and resizes the storage. We'll need this when we retain property caches after unlinking. Change-Id: Ieb88cea770f5771cab03d8f8d2feef7bc2fb7c52 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid -Wshorten-64-to-32 warnings in a few placesFabian Kosmale2022-10-311-1/+6
| | | | | | | | | | ...by explictily casting to int. Add a few comments explaining why we can get at most INT_MAX many elements, and add Q_ASSERTS to check that the assumptions actually hold. Task-number: QTBUG-105055 Change-Id: I1769318a9c04b51efe45fe0cae9fc0d93cfec45e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie GĂ©rard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* QML: Add more safety to QQmlPropertyCache usagesUlf Hermann2022-03-181-16/+65
| | | | | | | | | | | | | | We can almost always use QQmlPropertyCache::ConstPtr. The property cache creator needs mutable property caches for a while, but it can seal them when done. The designer integration does ugly stuff, but that should be limited to a specific environment. And the QQmlOpenMetaObject is rather wrong (again). This needs to be addresses in a later change. Task-number: QTBUG-73271 Change-Id: I1c31fd5936c745029d25b909c30b8d14a30f25d3 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Unify PropertyCache refcountingUlf Hermann2022-01-031-11/+14
| | | | | | | | | We should not keep plain QQmlPropertyCache pointers around. Also optimize self-assignment of QQmlRefPointer. Change-Id: I0e30b4ce29bb6b7acf288a9dc7b515d0e8f4ddfe Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Rename qflagpointer_p.h to qbipointer_p.hFabian Kosmale2021-11-031-1/+0
| | | | | | | | | QFlagPointer has been moved to qtbase. As a drive-by, remove includes of qbipointer_p.h which are no longer needed and add them where the type is actually used. Change-Id: I067864e6c082dcbd422deb79812ea7c36412caba Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace QFlagPointer with QTaggedPointerSimon Hausmann2020-04-031-5/+12
| | | | | | | | The latter has the advantage of allowing the use of a real type for the tag, instead of the generic flag/flag2 boolean accessors. Change-Id: Icc9e854ce4af3eb5808a4bed45aa22f377e223da Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QML: Split propertyCache into multiple filesUlf Hermann2019-02-011-0/+104
I want to be able to read the code. Change-Id: I063143ff63b0a476d783c892e1d328e7f5133fab Reviewed-by: Lars Knoll <lars.knoll@qt.io>