diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-05 07:44:58 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-05 14:59:19 +0200 |
commit | ce35a5ad395ee1552114ac91ed35625ba9da53f3 (patch) | |
tree | 0f067b078d75b4007193d4ac60d1062db85600fa /dependencies.yaml | |
parent | af43e916e14fd160c9bbd6299d1c43b476f2c8e8 (diff) | |
download | qtdoc-ce35a5ad395ee1552114ac91ed35625ba9da53f3.tar.gz |
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: Iead0ad46548d86af9677f3bab4e500e6a458f0e7
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'dependencies.yaml')
0 files changed, 0 insertions, 0 deletions