summaryrefslogtreecommitdiffstats
path: root/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-05 08:20:36 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-10 20:28:01 +0200
commit7f0d702f4e568790dfdfd916fa3c2da5ec78c6df (patch)
tree617646d5471b9da4126c33ff95e6670406bf62d7 /tests/auto/client/datadevicev1/tst_datadevicev1.cpp
parentf047e8b9786df0fbee307a0ec425eea385ab6657 (diff)
Port from container::count() and length() to size()
This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), 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', with the extended set of container classes recognized. Change-Id: I574208abc90a8042b500b3f96e3862b0ff339eb6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'tests/auto/client/datadevicev1/tst_datadevicev1.cpp')
-rw-r--r--tests/auto/client/datadevicev1/tst_datadevicev1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
index d4dfa2da0..d78255e9f 100644
--- a/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
+++ b/tests/auto/client/datadevicev1/tst_datadevicev1.cpp
@@ -213,7 +213,7 @@ void tst_datadevicev1::destroysSelectionOnLeave()
keyboard()->sendLeave(surface);
});
- QTRY_COMPARE(dataChangedSpy.count(), 1);
+ QTRY_COMPARE(dataChangedSpy.size(), 1);
QVERIFY(!QGuiApplication::clipboard()->mimeData(QClipboard::Clipboard)->hasText());
}