diff options
Diffstat (limited to 'src/corelib/tools/qstringlist.cpp')
-rw-r--r-- | src/corelib/tools/qstringlist.cpp | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp index cf150c2a1b..cc6eaf8ad2 100644 --- a/src/corelib/tools/qstringlist.cpp +++ b/src/corelib/tools/qstringlist.cpp @@ -376,6 +376,56 @@ bool QtPrivate::QStringList_contains(const QStringList *that, QLatin1String str, return stringList_contains(*that, str, cs); } +/*! + \fn bool QStringList::indexOf(QStringView str, int from) const + \overload + \since 5.13 + + Returns the index position of the first occurrence of \a str in + the list, searching forward from index position \a from. Returns + -1 if no item matched. + + \sa lastIndexOf(), contains() + */ + +/*! + \fn bool QStringList::indexOf(QLatin1String str, int from) const + \overload + \since 5.13 + + Returns the index position of the first occurrence of \a str in + the list, searching forward from index position \a from. Returns + -1 if no item matched. + + \sa lastIndexOf(), contains() + */ + +/*! + \fn bool QStringList::lastIndexOf(QStringView str, int from) const + \overload + \since 5.13 + + Returns the index position of the last occurrence of \a str in + the list, searching backward from index position \a from. If \a + from is -1 (the default), the search starts at the last item. + Returns -1 if no item matched. + + \sa indexOf(), contains() + */ + +/*! + \fn bool QStringList::lastIndexOf(QLatin1String str, int from) const + \overload + \since 5.13 + + Returns the index position of the last occurrence of \a str in + the list, searching backward from index position \a from. If \a + from is -1 (the default), the search starts at the last item. + Returns -1 if no item matched. + + \sa indexOf(), contains() + */ + #ifndef QT_NO_REGEXP /*! \fn QStringList QStringList::filter(const QRegExp &rx) const @@ -780,7 +830,7 @@ int QtPrivate::QStringList_removeDuplicates(QStringList *that) continue; ++setSize; if (j != i) - that->swap(i, j); + that->swapItemsAt(i, j); ++j; } if (n != j) |