summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.h
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-16 16:55:49 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-20 09:32:24 +0200
commit141fae112abc7c7deb0d839ddf351a34f79c646b (patch)
tree174c28978f3a266e81b6b2f8772cc5280bbef1e2 /src/corelib/tools/qlist.h
parent3c74ba1f8b1052e684c67cbbb6f99eb4f7146f40 (diff)
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>
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r--src/corelib/tools/qlist.h3
1 files changed, 2 insertions, 1 deletions
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 <typename AT>
+ bool removeOne(const AT &t)
{
const qsizetype i = indexOf(t);
if (i < 0)