qt5base-lts/tests/auto/corelib/kernel
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
..
qapplicationstatic Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qcoreapplication Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qdeadlinetimer Remove preprocessor conditionals for chrono include 2022-09-16 08:09:05 +02:00
qelapsedtimer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qeventdispatcher Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qeventloop Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qjnienvironment Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qjniobject Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qjnitypes Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmath Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmetacontainer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmetaenum Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmetamethod Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmetaobject Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qmetaobjectbuilder Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qmetaproperty Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qmetatype Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qmimedata Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qobject Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qpointer Compile guard tests in corelib/kernel that need threading support 2022-09-11 19:36:49 +02:00
qproperty Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qsharedmemory tst_QSharedMemory: remove mention of gravlaks.troll.no 2022-09-28 15:56:45 -07:00
qsignalblocker Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsignalmapper Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsocketnotifier Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsystemsemaphore Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qtimer Remove preprocessor conditionals for chrono include 2022-09-16 08:09:05 +02:00
qtranslator Compile guard tests in corelib/kernel that need threading support 2022-09-11 19:36:49 +02:00
qvariant Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qwineventnotifier Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qwinregistrykey QWinRegistryKey: refactor 2022-09-14 09:31:41 +08:00
CMakeLists.txt QWinRegistryKey: refactor 2022-09-14 09:31:41 +08:00