qt5base-lts/tests/auto/corelib/io
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
..
largefile Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qabstractfileengine Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qbuffer Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qdataurl Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qdebug QDebug: Support standard strings and string views directly 2022-09-27 14:12:11 +03:00
qdir Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qdiriterator Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qfile tst_QFile::setPermissions/Unix: test both chmod() and fchmod() 2022-09-16 08:37:50 -07:00
qfileinfo Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qfileselector Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qfilesystementry Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qfilesystemmetadata Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qfilesystemwatcher Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qiodevice Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qipaddress Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qlockfile Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qloggingcategory Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qloggingregistry Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qnodebug Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qprocess Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qprocess-noapplication Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qprocessenvironment Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qresourceengine RCC: fix zlib compression when --no-zstd was specified 2022-08-31 16:55:00 -03:00
qsavefile Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qsettings Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qstandardpaths Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qstorageinfo Change the license of all CMakeLists.txt and *.cmake files to BSD 2022-08-23 23:58:42 +02:00
qtemporarydir Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qtemporaryfile Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qurl Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qurlinternal Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qurlquery Port from container.count()/length() to size() 2022-10-04 07:40:08 +02:00
qurluts46 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