QList::removeOne: make it generic as well
Change-Id: I0c50b2ae76f9d0f053b3d5b1ab98d12e0524e419 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
3c74ba1f8b
commit
141fae112a
@ -340,7 +340,8 @@ public:
|
||||
erase(it, e);
|
||||
return result;
|
||||
}
|
||||
bool removeOne(const T &t)
|
||||
template <typename AT>
|
||||
bool removeOne(const AT &t)
|
||||
{
|
||||
const qsizetype i = indexOf(t);
|
||||
if (i < 0)
|
||||
|
@ -845,7 +845,7 @@
|
||||
\sa removeOne()
|
||||
*/
|
||||
|
||||
/*! \fn template <typename T> bool QList<T>::removeOne(const T &t)
|
||||
/*! \fn template <typename T> template <typename AT> bool QList<T>::removeOne(const AT &t)
|
||||
\since 5.4
|
||||
|
||||
Removes the first element that compares equal to \a t from the
|
||||
|
Loading…
Reference in New Issue
Block a user