From 1aa3459d0a534473582806b0988d26533bc7e16a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 25 Oct 2020 18:34:13 +0100 Subject: QList: also default count()'s template parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also fix the docs. Change-Id: If08116cb8657d00d610de9451be0ba73ce19dcd1 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Volker Hilsheimer --- src/corelib/tools/qlist.h | 2 +- src/corelib/tools/qlist.qdoc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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 + template qsizetype count(const AT &t) const noexcept { return qsizetype(std::count(&*cbegin(), &*cend(), t)); diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index 1da4239d10..a6c011b2bf 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -1013,7 +1013,7 @@ */ -/*! \fn template qsizetype QList::count(parameter_type value) const +/*! \fn template template qsizetype QList::count(const AT &value) const Returns the number of occurrences of \a value in the list. -- cgit v1.2.3