diff options
author | Marc Mutz <[email protected]> | 2022-11-11 15:53:00 +0100 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2022-11-18 13:59:33 +0100 |
commit | c5f3c61469517a4ac00e4da01fe0bab9188c1488 (patch) | |
tree | f5003575925ea3f88e469380f29454d1f1fbca49 /src/tools/uic/cpp/cppwritedeclaration.cpp | |
parent | 4fd2c8fe1d679302391218aec03aa309afd38c55 (diff) |
Port from container::count() and length() to size() - V5
This is the same semantic patch (qt-port-to-std-compatible-api V5
with config Scope: 'Container') as in dev. I've re-ran it in 6.4 to
avoid cherry-pick conflicts.
Like in dev, added two NOLINTNEXTLINEs in tst_qbitarray and
tst_qcontiguouscache, to avoid porting calls that explicitly test
count().
Change-Id: I9621dee5ed328b47e78919a34c307105e4311903
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/tools/uic/cpp/cppwritedeclaration.cpp')
-rw-r--r-- | src/tools/uic/cpp/cppwritedeclaration.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/uic/cpp/cppwritedeclaration.cpp b/src/tools/uic/cpp/cppwritedeclaration.cpp index 2730ef97971..e4ea2fbd403 100644 --- a/src/tools/uic/cpp/cppwritedeclaration.cpp +++ b/src/tools/uic/cpp/cppwritedeclaration.cpp @@ -55,7 +55,7 @@ void WriteDeclaration::acceptUI(DomUI *node) exportMacro.append(u' '); QStringList namespaceList = qualifiedClassName.split("::"_L1); - if (namespaceList.count()) { + if (namespaceList.size()) { className = namespaceList.last(); namespaceList.removeLast(); } @@ -65,7 +65,7 @@ void WriteDeclaration::acceptUI(DomUI *node) // is a User using Qt-in-namespace having his own classes not in a namespace. // In this case the generated Ui helper classes will also end up in // the Qt namespace (which is harmless, but not "pretty") - const bool needsMacro = namespaceList.count() == 0 + const bool needsMacro = namespaceList.size() == 0 || namespaceList[0] == "qdesigner_internal"_L1; if (needsMacro) @@ -73,7 +73,7 @@ void WriteDeclaration::acceptUI(DomUI *node) openNameSpaces(namespaceList, m_output); - if (namespaceList.count()) + if (namespaceList.size()) m_output << "\n"; m_output << "class " << exportMacro << m_option.prefix << className << "\n" @@ -98,7 +98,7 @@ void WriteDeclaration::acceptUI(DomUI *node) closeNameSpaces(namespaceList, m_output); - if (namespaceList.count()) + if (namespaceList.size()) m_output << "\n"; if (m_option.generateNamespace && !m_option.prefix.isEmpty()) { @@ -110,7 +110,7 @@ void WriteDeclaration::acceptUI(DomUI *node) closeNameSpaces(namespaceList, m_output); - if (namespaceList.count()) + if (namespaceList.size()) m_output << "\n"; } |