qt6-bb10/tests/auto
Marc Mutz df9d882d41 Port from container.count()/length() to size()
This is semantic patch using ClangTidyTransformator:

  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'.

<classes> are:

    // sequential:
    "QByteArray",
    "QList",
    "QQueue",
    "QStack",
    "QString",
    "QVarLengthArray",
    "QVector",
    // associative:
    "QHash",
    "QMultiHash",
    "QMap",
    "QMultiMap",
    "QSet",
    // Qt has no QMultiSet

Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-04 07:40:08 +02:00
..
bic/data Add BiC data for the new way to do BiC testing 2022-05-12 13:33:41 +03:00
cmake Replace the syncqt.pl script with syncqt tool 2022-09-27 13:12:11 +02:00
concurrent Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
corelib Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
dbus Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
gui Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
printsupport tests: Fix tst_qprinterinfo for CUPS printer instances 2022-08-24 14:20:14 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
sql Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
testlib Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
tools Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
wasm Fix QWasmWindowStack::topWindow when the stack is empty 2022-09-12 20:09:03 +02:00
widgets Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
xml Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
CMakeLists.txt Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
network-settings.h Use SPDX license identifiers 2022-05-16 16:37:38 +02:00