summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-16 14:55:07 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-18 18:38:02 +0200
commit2a1b44f57bd9ab460f275caab85896dd49903f7f (patch)
treeeb146e63969621a095c5e124fc328873c1e5209c /src/corelib
parentd1785f73dbda5e70c16ac2bee321eab785cd2b30 (diff)
Remove QByteArrayList_indexOf
It was used as exported symbol for the implementation of QByteArrayList::indexOf. Since then, the implementation has been changed, and this code is unused. Change-Id: I468d05507b6b520cf5bfa4bc567a3d67c43b9a32 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/text/qbytearraylist.cpp6
-rw-r--r--src/corelib/text/qbytearraylist.h1
2 files changed, 0 insertions, 7 deletions
diff --git a/src/corelib/text/qbytearraylist.cpp b/src/corelib/text/qbytearraylist.cpp
index 621ee6be7c..c815e766ab 100644
--- a/src/corelib/text/qbytearraylist.cpp
+++ b/src/corelib/text/qbytearraylist.cpp
@@ -150,10 +150,4 @@ QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char
return res;
}
-int QtPrivate::QByteArrayList_indexOf(const QByteArrayList *that, const char *needle, int from)
-{
- const auto it = std::find_if(that->begin() + from, that->end(), [needle](const QByteArray &item) { return item == needle; });
- return it == that->end() ? -1 : int(std::distance(that->begin(), it));
-}
-
QT_END_NAMESPACE
diff --git a/src/corelib/text/qbytearraylist.h b/src/corelib/text/qbytearraylist.h
index 1ce8d21445..25f4395a5d 100644
--- a/src/corelib/text/qbytearraylist.h
+++ b/src/corelib/text/qbytearraylist.h
@@ -57,7 +57,6 @@ typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
namespace QtPrivate {
QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *separator, int separatorLength);
- int Q_CORE_EXPORT QByteArrayList_indexOf(const QByteArrayList *that, const char *needle, int from);
}
#endif