summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-25 18:34:13 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-26 14:18:12 +0100
commit1aa3459d0a534473582806b0988d26533bc7e16a (patch)
tree42fe7c3ef1cb14c8bb38c8382b1df7f4406c5d26 /src/corelib/tools/qlist.h
parente2e9ce8109b6293a6a3eceb81c48b6d4aabfc99d (diff)
QList: also default count()'s template parameter
Also fix the docs. Change-Id: If08116cb8657d00d610de9451be0ba73ce19dcd1 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r--src/corelib/tools/qlist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 7ec62f33e5..58676eeb1f 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -352,7 +352,7 @@ public:
bool contains(const AT &t) const noexcept;
#endif
- template <typename AT>
+ template <typename AT = T>
qsizetype count(const AT &t) const noexcept
{
return qsizetype(std::count(&*cbegin(), &*cend(), t));