Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in
qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8:
auto QtContainerClass = 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: Ibed02600e225ee63c06d61bcd6187518f650a0a0
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| commit | 1a85163e1538e8a8e60c884bb21a5084d6170759 |
| parent | affcc0be3f200372ed709f4041dc5079ed2e117a |
| author | Marc Mutz <marc.mutz@qt.io> |
| committer | Marc Mutz <marc.mutz@qt.io> |
| commit time | Wed, 5 Oct 2022 14:59:30 +0200 |
- M src/datavisualization/engine/abstract3dcontroller.cpp
- M src/datavisualization/input/qtouch3dinputhandler.cpp
- M src/datavisualization/utils/meshloader.cpp
- M src/datavisualization/utils/scatterobjectbufferhelper.cpp
- M src/datavisualizationqml/declarativeseries.cpp
- M tests/auto/cpptest/q3daxis-category/tst_axis.cpp
- M tests/auto/cpptest/q3daxis-value/tst_axis.cpp
- M tests/auto/cpptest/q3dbars-modelproxy/tst_proxy.cpp
- M tests/auto/cpptest/q3dbars-proxy/tst_proxy.cpp
- M tests/auto/cpptest/q3dbars/tst_bars.cpp
- M tests/auto/cpptest/q3dscatter/tst_scatter.cpp
- M tests/auto/cpptest/q3dsurface-modelproxy/tst_proxy.cpp
- M tests/auto/cpptest/q3dsurface/tst_surface.cpp
- M tests/auto/cpptest/q3dtheme/tst_theme.cpp