diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-10-24 09:02:03 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-11-15 16:57:54 +0000 |
commit | a0c61e70eeefbf9d6c632a94d29bcc2a7e97b7d7 (patch) | |
tree | 10ae236ef25cc2284377ab7bf29a315ad6a7444c /tests/auto/blackbox/tst_clangdb.cpp | |
parent | 9d8ad8027a34de6871f753047a160b3b3ec65368 (diff) |
STL compatibility: use size() instead of count()
This is a simple find and replace with manual sanity check.
Change-Id: Ia733befe7885dc3c643d5c84e151312bfd86a3c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_clangdb.cpp')
-rw-r--r-- | tests/auto/blackbox/tst_clangdb.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/blackbox/tst_clangdb.cpp b/tests/auto/blackbox/tst_clangdb.cpp index c910362a5..1433dda3b 100644 --- a/tests/auto/blackbox/tst_clangdb.cpp +++ b/tests/auto/blackbox/tst_clangdb.cpp @@ -151,7 +151,7 @@ void TestClangDb::checkDbIsConsistentWithProject() // We expect only one command for now const QJsonArray array = doc.array(); - QVERIFY(array.count() == 1); + QVERIFY(array.size() == 1); // Validate the "command object" const QJsonObject entry = array.at(0).toObject(); @@ -159,7 +159,7 @@ void TestClangDb::checkDbIsConsistentWithProject() QVERIFY(entry.value("directory").isString()); QVERIFY(entry.contains("arguments")); QVERIFY(entry.value("arguments").isArray()); - QVERIFY(entry.value("arguments").toArray().count() >= 2); + QVERIFY(entry.value("arguments").toArray().size() >= 2); QVERIFY(entry.contains("file")); QVERIFY(entry.value("file").isString()); QVERIFY(entry.value("file").toString() == sourceFilePath); @@ -171,7 +171,7 @@ void TestClangDb::checkDbIsConsistentWithProject() QStringList arguments; const QJsonArray jsonArguments = entry.value("arguments").toArray(); QString executable = jsonArguments.at(0).toString(); - for (int i=1; i<jsonArguments.count(); i++) + for (int i=1; i<jsonArguments.size(); i++) arguments.append(jsonArguments.at(i).toString()); QVERIFY(runProcess(executable, arguments, stdErr, stdOut) == 0); } |