From 141fae112abc7c7deb0d839ddf351a34f79c646b Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 16 Oct 2020 16:55:49 +0200 Subject: QList::removeOne: make it generic as well Change-Id: I0c50b2ae76f9d0f053b3d5b1ab98d12e0524e419 Reviewed-by: Lars Knoll Reviewed-by: Thiago Macieira --- src/corelib/tools/qlist.h | 3 ++- src/corelib/tools/qlist.qdoc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 3094bcba97..e9fb664da1 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -340,7 +340,8 @@ public: erase(it, e); return result; } - bool removeOne(const T &t) + template + bool removeOne(const AT &t) { const qsizetype i = indexOf(t); if (i < 0) diff --git a/src/corelib/tools/qlist.qdoc b/src/corelib/tools/qlist.qdoc index 916715ddb8..8ec9b22863 100644 --- a/src/corelib/tools/qlist.qdoc +++ b/src/corelib/tools/qlist.qdoc @@ -845,7 +845,7 @@ \sa removeOne() */ -/*! \fn template bool QList::removeOne(const T &t) +/*! \fn template template bool QList::removeOne(const AT &t) \since 5.4 Removes the first element that compares equal to \a t from the -- cgit v1.2.3