9#include <QtCore/qarraydatapointer.h>
10#include <QtCore/qcompare.h>
11#include <QtCore/qnamespace.h>
12#include <QtCore/qhashfunctions.h>
13#include <QtCore/qiterator.h>
14#include <QtCore/qcontainertools_impl.h>
15#include <QtCore/qnamespace.h>
16#include <QtCore/qttypetraits.h>
20#include <initializer_list>
28 template <
typename V,
typename U>
qsizetype indexOf(
const QList<V> &list,
const U &u, qsizetype from)
noexcept;
29 template <
typename V,
typename U>
qsizetype lastIndexOf(
const QList<V> &list,
const U &u, qsizetype from)
noexcept;
39 Self *
self() {
return static_cast<Self *>(
this); }
40 const Self *
self()
const {
return static_cast<
const Self *>(
this); }
43 template <
typename AT = T>
45 template <
typename AT = T>
48 template <
typename AT = T>
51 return self()->indexOf(t) != -1;
65template <>
struct QListSpecialMethods<QByteArray>;
66template <>
struct QListSpecialMethods<QString>;
68#if !defined(QT_STRICT_QLIST_ITERATORS) && (QT_VERSION >= QT_VERSION_CHECK(6
, 6
, 0
)) && !defined(Q_OS_WIN)
69#define QT_STRICT_QLIST_ITERATORS
73template<
typename T>
class QVector :
public QList<T> {};
85 class DisableRValueRefs {};
87 friend class ::tst_QList;
121 friend class QList<T>;
124#ifdef QT_STRICT_QLIST_ITERATORS
131#ifdef QT_COMPILER_HAS_LWG3346
140#ifndef QT_STRICT_QLIST_ITERATORS
141 inline constexpr explicit iterator(T *n) : i(n) {}
145 inline T &
operator[](qsizetype j)
const {
return *(i + j); }
146#ifdef __cpp_lib_three_way_comparison
170#if QT_DEPRECATED_SINCE(6
, 3
) && !defined(QT_STRICT_QLIST_ITERATORS)
172 "the implicit conversion between a QList/QVector::iterator "
196 friend class QList<T>;
198 const T *i =
nullptr;
199#ifdef QT_STRICT_QLIST_ITERATORS
206#ifdef QT_COMPILER_HAS_LWG3346
215#ifndef QT_STRICT_QLIST_ITERATORS
216 inline constexpr explicit const_iterator(
const T *n) : i(n) {}
221 inline const T &
operator[](qsizetype j)
const {
return *(i + j); }
222#ifdef __cpp_lib_three_way_comparison
250#if QT_DEPRECATED_SINCE(6
, 3
) && !defined(QT_STRICT_QLIST_ITERATORS)
252 "the implicit conversion between a QList/QVector::const_iterator "
254 inline operator const T*()
const {
return i; }
280 void resize_internal(qsizetype i);
283 const std::less<
const T*> less = {};
284 return !less(d->end(), i.i) && !less(i.i, d->begin());
287 void verify([[maybe_unused]] qsizetype pos = 0, [[maybe_unused]] qsizetype n = 1)
const
290 Q_ASSERT(pos <= size());
292 Q_ASSERT(n <= size() - pos);
301 constexpr QList()
noexcept =
default;
306 Q_CHECK_PTR(d.data());
307 d->appendInitialize(size);
310 QList(qsizetype size, parameter_type t)
314 Q_CHECK_PTR(d.data());
315 d->copyAppend(size, t);
323 Q_CHECK_PTR(d.data());
324 d->copyAppend(args.begin(), args.end());
333 template <
typename InputIterator, if_input_iterator<InputIterator> =
true>
334 QList(InputIterator i1, InputIterator i2)
336 if constexpr (!
std::is_convertible_v<
typename std::iterator_traits<InputIterator>::iterator_category,
std::forward_iterator_tag>) {
337 std::copy(i1, i2,
std::back_inserter(*
this));
339 const auto distance =
std::distance(i1, i2);
341 d = DataPointer(qsizetype(distance));
342 Q_CHECK_PTR(d.data());
345 if constexpr (std::is_same_v<std::decay_t<InputIterator>, iterator> ||
346 std::is_same_v<std::decay_t<InputIterator>, const_iterator>) {
347 d->copyAppend(i1.i, i2.i);
349 d->appendIteratorRange(i1, i2);
357 inline explicit QList(
const String &str)
364 Q_CHECK_PTR(d.data());
365 d->appendUninitialized(size);
375 template <
typename U = T,
376 Qt::if_has_qt_compare_three_way<U, U> =
true>
379 return QtOrderingPrivate::lexicographicalCompareThreeWay(lhs.begin(), lhs.end(),
380 rhs.begin(), rhs.end());
383#if defined(__cpp_lib_three_way_comparison) && defined(__cpp_lib_concepts)
384 template <
typename U =
T,
395 template <
typename U = T>
398 if (size() != other.size())
400 if (begin() == other.begin())
404 return std::equal(begin(), end(), other.begin(), other.end());
407 template <
typename U = T>
410 return !(*
this == other);
413#ifndef __cpp_lib_three_way_comparison
414 template <
typename U = T>
415 QTypeTraits::compare_lt_result_container<QList, U> operator<(
const QList &other)
const
416 noexcept(
noexcept(std::lexicographical_compare<
typename QList<U>::const_iterator,
417 typename QList::const_iterator>(
418 std::declval<QList<U>>().begin(), std::declval<QList<U>>().end(),
419 other.begin(), other.end())))
421 return std::lexicographical_compare(begin(), end(),
422 other.begin(), other.end());
425 template <
typename U = T>
429 return other < *
this;
432 template <
typename U = T>
433 QTypeTraits::compare_lt_result_container<QList, U> operator<=(
const QList &other)
const
434 noexcept(
noexcept(other < std::declval<QList<U>>()))
436 return !(other < *
this);
439 template <
typename U = T>
443 return !(*
this < other);
459 constexpr size_t MaxSize = maxSize();
460 Q_PRESUME(size_t(d.size) <= MaxSize);
466 constexpr bool isEmpty()
const noexcept {
return size() == 0; }
470 resize_internal(size);
471 if (size >
this->size())
472 d->appendInitialize(size);
474 void resize(qsizetype size, parameter_type c)
476 resize_internal(size);
477 if (size >
this->size())
478 d->copyAppend(size -
this->size(), c);
482 resize_internal(size);
483 if (size >
this->size())
484 d->appendUninitialized(size);
502 if (d->needsDetach()) {
504 DataPointer detached(d.allocatedCapacity());
513 Q_ASSERT_X(size_t(i) < size_t(d->size),
"QList::at",
"index out of range");
518 Q_ASSERT_X(size_t(i) < size_t(d->size),
"QList::operator[]",
"index out of range");
523 void append(parameter_type t) { emplaceBack(t); }
527 if constexpr (DataPointer::pass_parameter_by_value) {
530 emplaceBack(
std::move(t));
539 if constexpr (DataPointer::pass_parameter_by_value) {
542 emplaceFront(
std::move(t));
545 void prepend(parameter_type t) { emplaceFront(t); }
547 template<
typename... Args>
550 template <
typename ...Args>
554 {
return emplace(i, t); }
558 Q_ASSERT_X(isValidIterator(before),
"QList::insert",
"The specified iterator argument 'before' is invalid");
559 return insert(before, 1, t);
563 Q_ASSERT_X(isValidIterator(before),
"QList::insert",
"The specified iterator argument 'before' is invalid");
564 return insert(std::distance(constBegin(), before), n, t);
568 Q_ASSERT_X(isValidIterator(before),
"QList::insert",
"The specified iterator argument 'before' is invalid");
569 return insert(std::distance(constBegin(), before), std::move(t));
572 if constexpr (DataPointer::pass_parameter_by_value) {
577 return emplace(i,
std::move(t));
587 template <
typename InputIterator, if_input_iterator<InputIterator> =
true>
589 { d->assign(first, last);
return *
this; }
594 return assign(l.begin(), l.end());
599 template <
typename ...Args>
602 Q_ASSERT_X(isValidIterator(before),
"QList::emplace",
"The specified iterator argument 'before' is invalid");
606 template <
typename ...Args>
615 Q_ASSERT_X(i >= 0 && i < d->size,
"QList<T>::replace",
"index out of range");
622 if constexpr (DataPointer::pass_parameter_by_value) {
626 Q_ASSERT_X(i >= 0 && i < d->size,
"QList<T>::replace",
"index out of range");
629 d.data()[i] = std::move(t);
633 void remove(qsizetype i, qsizetype n = 1);
646 template <
typename AT>
648 template <
typename AT>
650 template <
typename AT>
654 template <
typename AT = T>
657 return qsizetype(std::count(data(), data() + size(), t));
661 template <
typename AT = T>
664 return QtPrivate::sequential_erase_with_copy(*
this, t);
667 template <
typename AT = T>
670 return QtPrivate::sequential_erase_one(*
this, t);
673 template <
typename Predicate>
676 return QtPrivate::sequential_erase_if(*
this, pred);
679 T
takeAt(qsizetype i) { T t =
std::move((*
this)[i]); remove(i);
return t; }
680 void move(qsizetype from, qsizetype to)
682 Q_ASSERT_X(from >= 0 && from < size(),
"QList::move(qsizetype, qsizetype)",
"'from' is out-of-range");
683 Q_ASSERT_X(to >= 0 && to < size(),
"QList::move(qsizetype, qsizetype)",
"'to' is out-of-range");
687 T *
const b = d->begin();
689 std::rotate(b + from, b + from + 1, b + to + 1);
691 std::rotate(b + to, b + from, b + from + 1);
715 inline T&
first() { Q_ASSERT(!isEmpty());
return *begin(); }
716 inline const T &
first()
const noexcept { Q_ASSERT(!isEmpty());
return *begin(); }
717 inline const T &
constFirst()
const noexcept { Q_ASSERT(!isEmpty());
return *begin(); }
718 inline T&
last() { Q_ASSERT(!isEmpty());
return *(end()-1); }
719 inline const T &
last()
const noexcept { Q_ASSERT(!isEmpty());
return *(end()-1); }
720 inline const T &
constLast()
const noexcept { Q_ASSERT(!isEmpty());
return *(end()-1); }
721 inline bool startsWith(parameter_type t)
const {
return !isEmpty() && first() == t; }
722 inline bool endsWith(parameter_type t)
const {
return !isEmpty() && last() == t; }
723 QList<T>
mid(qsizetype pos, qsizetype len = -1)
const;
726 { verify(0, n);
return QList<T>(begin(), begin() + n); }
728 { verify(0, n);
return QList<T>(end() - n, end()); }
730 { verify(pos, 0);
return QList<T>(begin() + pos, end()); }
732 { verify(pos, n);
return QList<T>(begin() + pos, begin() + pos + n); }
734 T
value(qsizetype i)
const {
return value(i, T()); }
735 T
value(qsizetype i, parameter_type defaultValue)
const;
738 Q_ASSERT_X(i >= 0 && i < size() && j >= 0 && j < size(),
739 "QList<T>::swap",
"index out of range");
741 qSwap(d->begin()[i], d->begin()[j]);
752 template <
typename ...Args>
756 {
return d->size == 0; }
771 {
QList n = *
this; n += l;
return n; }
773 {
return std::move(*
this += l); }
775 {
QList n = *
this; n +=
std::move(l);
return n; }
777 {
return std::move(*
this +=
std::move(l)); }
779 { append(t);
return *
this; }
780 inline QList<T> &operator<< (parameter_type t)
781 { append(t);
return *
this; }
782 inline QList<T> &operator<<(
const QList<T> &l)
783 { *
this += l;
return *
this; }
785 { *
this +=
std::move(l);
return *
this; }
787 { append(
std::move(t));
return *
this; }
788 inline QList<T> &operator<<(rvalue_ref t)
789 { append(
std::move(t));
return *
this; }
798 template<qsizetype N>
801 return QList<T>({
nullptr,
const_cast<T *>(t), N });
805template <
typename InputIterator,
806 typename ValueType =
typename std::iterator_traits<InputIterator>::value_type,
807 QtPrivate::IfIsInputIterator<InputIterator> =
true>
811inline void QList<T>::resize_internal(qsizetype newSize)
813 Q_ASSERT(newSize >= 0);
815 if (d->needsDetach() || newSize > capacity() - d.freeSpaceAtBegin()) {
816 d.detachAndGrow(QArrayData::GrowsAtEnd, newSize - d.size,
nullptr,
nullptr);
817 }
else if (newSize < size()) {
818 d->truncate(newSize);
826 if (asize <= capacity() - d.freeSpaceAtBegin()) {
827 if (d->flags() & Data::CapacityReserved)
829 if (!d->isShared()) {
831 d->setFlag(Data::CapacityReserved);
836 qsizetype newSize = qMax(asize, size());
837 DataPointer detached(newSize);
839 Q_CHECK_PTR(detached.data());
840 detached->copyAppend(d->begin(), d->end());
841 if (detached.d_ptr())
842 detached->setFlag(Data::CapacityReserved);
851 if (d->needsDetach() || size() < capacity()) {
853 DataPointer detached(size());
855 Q_CHECK_PTR(detached.data());
857 detached->copyAppend(d.data(), d.data() + d.size);
859 detached->moveAppend(d.data(), d.data() + d.size);
864 d->clearFlag(Data::CapacityReserved);
870 Q_ASSERT_X(size_t(i) + size_t(n) <= size_t(d->size),
"QList::remove",
"index out of range");
871 Q_ASSERT_X(n >= 0,
"QList::remove",
"invalid count");
877 d->erase(d->begin() + i, n);
883 Q_ASSERT(!isEmpty());
891 Q_ASSERT(!isEmpty());
898inline T
QList<T>::
value(qsizetype i, parameter_type defaultValue)
const
900 return size_t(i) < size_t(d->size) ? at(i) : defaultValue;
906 d->growAppend(i1.i, i2.i);
912 Q_ASSERT(&other !=
this);
915 if (other.d->needsDetach() || !
std::is_nothrow_move_constructible_v<T>)
916 return append(other);
919 d.detachAndGrow(QArrayData::GrowsAtEnd, other.size(),
nullptr,
nullptr);
920 Q_ASSERT(d.freeSpaceAtEnd() >= other.size());
921 d->moveAppend(other.d->begin(), other.d->end());
925template<
typename... Args>
928 d->emplace(0, std::forward<Args>(args)...);
937 Q_ASSERT_X(size_t(i) <= size_t(d->size),
"QList<T>::insert",
"index out of range");
938 Q_ASSERT_X(n >= 0,
"QList::insert",
"invalid count");
945template <
typename ...Args>
949 Q_ASSERT_X(i >= 0 && i <= d->size,
"QList<T>::insert",
"index out of range");
950 d->emplace(i, std::forward<Args>(args)...);
955template<
typename... Args>
958 d->emplace(d->size, std::forward<Args>(args)...);
965 Q_ASSERT_X(isValidIterator(abegin),
"QList::erase",
"The specified iterator argument 'abegin' is invalid");
966 Q_ASSERT_X(isValidIterator(aend),
"QList::erase",
"The specified iterator argument 'aend' is invalid");
967 Q_ASSERT(aend >= abegin);
970 qsizetype n =
std::distance(abegin, aend);
981 if (d->needsDetach() || newSize > capacity()) {
983 DataPointer detached(d->detachCapacity(newSize));
984 detached->copyAppend(newSize, t);
989 d->assign(d.begin(), d.begin() + qMin(size(), newSize), t);
990 if (newSize > size()) {
991 d->copyAppend(newSize - size(), copy);
992 }
else if (newSize < size()) {
993 d->truncate(newSize);
1000template <
typename T,
typename U>
1004 from = qMax(from + vector.size(), qsizetype(0));
1005 if (from < vector.size()) {
1006 auto n = vector.begin() + from - 1;
1007 auto e = vector.end();
1010 return qsizetype(n - vector.begin());
1015template <
typename T,
typename U>
1019 from += vector.d->size;
1020 else if (from >= vector.size())
1021 from = vector.size() - 1;
1023 auto b = vector.begin();
1024 auto n = vector.begin() + from + 1;
1027 return qsizetype(n - b);
1034template <
typename T>
1035template <
typename AT>
1038 return QtPrivate::indexOf(*self(), t, from);
1041template <
typename T>
1042template <
typename AT>
1045 return QtPrivate::lastIndexOf(*self(), t, from);
1048template <
typename T>
1054 switch (QContainerImplHelper::mid(d.size, &p, &l)) {
1055 case QContainerImplHelper::Null:
1056 case QContainerImplHelper::Empty:
1058 case QContainerImplHelper::Full:
1060 case QContainerImplHelper::Subset:
1065 DataPointer copied(l);
1066 copied->copyAppend(data() + p, data() + p + l);
1070Q_DECLARE_SEQUENTIAL_ITERATOR(List)
1071Q_DECLARE_MUTABLE_SEQUENTIAL_ITERATOR(List)
1073template <
typename T>
1074size_t qHash(
const QList<T> &key, size_t seed = 0)
1075 noexcept(
noexcept(qHashRange(key.cbegin(), key.cend(), seed)))
1077 return qHashRange(key.cbegin(), key.cend(), seed);
1080template <
typename T,
typename AT>
1083 return QtPrivate::sequential_erase(list, t);
1086template <
typename T,
typename Predicate>
1089 return QtPrivate::sequential_erase_if(list, pred);
1093QList<uint> QStringView::toUcs4()
const {
return QtPrivate::convertToUcs4(*
this); }
1097#include <QtCore/qbytearraylist.h>
1098#include <QtCore/qstringlist.h>
\inmodule QtCore\reentrant
constexpr bool operator==(iterator o) const
constexpr bool operator<(iterator other) const
constexpr bool operator<(const_iterator other) const
const_iterator operator-(qsizetype j) const
constexpr bool operator==(pointer p) const
constexpr bool operator>(const_iterator other) const
std::random_access_iterator_tag iterator_category
const T & operator[](qsizetype j) const
const_iterator & operator-=(qsizetype j)
constexpr const_iterator(iterator o)
constexpr const_iterator()=default
const T & operator*() const
constexpr bool operator!=(const_iterator o) const
const_iterator operator+(qsizetype j) const
constexpr bool operator<=(iterator other) const
const value_type element_type
const_iterator & operator++()
constexpr bool operator!=(pointer p) const
constexpr bool operator>(iterator other) const
qsizetype operator-(const_iterator j) const
constexpr bool operator==(const_iterator o) const
constexpr bool operator>=(iterator other) const
const_iterator operator--(int)
const_iterator & operator--()
const_iterator operator++(int)
constexpr bool operator!=(iterator o) const
const_iterator & operator+=(qsizetype j)
friend const_iterator operator+(qsizetype j, const_iterator k)
constexpr bool operator<=(const_iterator other) const
const T * operator->() const
constexpr bool operator>=(const_iterator other) const
constexpr bool operator>(iterator other) const
iterator operator+(qsizetype j) const
iterator & operator-=(qsizetype j)
T & operator[](qsizetype j) const
constexpr bool operator<(const_iterator other) const
constexpr bool operator!=(pointer p) const
constexpr bool operator<=(iterator other) const
constexpr bool operator!=(iterator o) const
constexpr bool operator<=(const_iterator other) const
constexpr bool operator>(const_iterator other) const
constexpr bool operator>=(iterator other) const
constexpr bool operator<(iterator other) const
friend iterator operator+(qsizetype j, iterator k)
std::random_access_iterator_tag iterator_category
constexpr bool operator!=(const_iterator o) const
constexpr bool operator==(const_iterator o) const
constexpr bool operator>=(const_iterator other) const
qsizetype operator-(iterator j) const
constexpr iterator()=default
iterator operator-(qsizetype j) const
constexpr bool operator==(iterator o) const
iterator & operator+=(qsizetype j)
constexpr bool operator==(pointer p) const
void append(const_iterator i1, const_iterator i2)
iterator insert(const_iterator before, parameter_type t)
void removeFirst() noexcept
QList< T > & fill(parameter_type t, qsizetype size=-1)
const_pointer constData() const noexcept
void push_front(rvalue_ref t)
const_iterator begin() const noexcept
bool isDetached() const noexcept
void removeAt(qsizetype i)
QList< T > last(qsizetype n) const
bool isSharedWith(const QList< T > &other) const
QList< T > & operator+=(const QList< T > &l)
QList< T > operator+(const QList< T > &l) &&
reference emplaceFront(Args &&... args)
reference emplace_back(Args &&... args)
const T & constLast() const noexcept
iterator erase(const_iterator begin, const_iterator end)
void resizeForOverwrite(qsizetype size)
QList< T > sliced(qsizetype pos, qsizetype n) const
QList(std::initializer_list< T > args)
constexpr qsizetype max_size() const noexcept
QTypeTraits::compare_eq_result_container< QList, U > operator==(const QList &other) const
iterator insert(qsizetype i, parameter_type t)
bool empty() const noexcept
bool removeOne(const AT &t)
QList< T > toList() const noexcept
QList(InputIterator i1, InputIterator i2)
static QList< T > fromReadOnlyData(const T(&t)[N]) noexcept
static QList< T > fromList(const QList< T > &list) noexcept
QList(qsizetype size, parameter_type t)
const_reference back() const noexcept
qsizetype capacity() const
void swapItemsAt(qsizetype i, qsizetype j)
void push_back(parameter_type t)
QList< T > operator+(const QList< T > &l) const &
const_iterator end() const noexcept
iterator erase(const_iterator pos)
bool endsWith(parameter_type t) const
qsizetype count(const AT &t) const noexcept
bool startsWith(parameter_type t) const
friend qsizetype QtPrivate::lastIndexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
QList< T > operator+(QList< T > &&l) &&
std::reverse_iterator< iterator > reverse_iterator
const_reference at(qsizetype i) const noexcept
constexpr qsizetype size() const noexcept
QList< T > sliced(qsizetype pos) const
QList< T > toVector() const noexcept
T value(qsizetype i) const
void swap(QList &other) noexcept
iterator insert(const_iterator before, qsizetype n, parameter_type t)
QList< T > & operator=(std::initializer_list< T > args)
void move(qsizetype from, qsizetype to)
QList(DataPointer dd) noexcept
const_reverse_iterator crbegin() const noexcept
reference operator[](qsizetype i)
const_iterator constBegin() const noexcept
const_reference operator[](qsizetype i) const noexcept
const_reverse_iterator rbegin() const noexcept
constexpr QList() noexcept=default
void remove(qsizetype i, qsizetype n=1)
const DataPointer & data_ptr() const &
qsizetype removeIf(Predicate pred)
DataPointer & data_ptr() &
std::reverse_iterator< const_iterator > const_reverse_iterator
qsizetype removeAll(const AT &t)
iterator emplace(qsizetype i, Args &&... args)
const T & first() const noexcept
iterator insert(qsizetype i, qsizetype n, parameter_type t)
void append(QList< T > &&l)
reference emplaceBack(Args &&... args)
QList< T > mid(qsizetype pos, qsizetype len=-1) const
QTypeTraits::compare_lt_result_container< QList, U > operator>(const QList &other) const noexcept(noexcept(other< std::declval< QList< U > >()))
void prepend(rvalue_ref t)
QList< T > operator+(QList< T > &&l) const &
QList & assign(std::initializer_list< T > l)
void resize(qsizetype size, parameter_type c)
QList< T > first(qsizetype n) const
const T & constFirst() const noexcept
static constexpr qsizetype maxSize()
iterator emplace(const_iterator before, Args &&... args)
void reserve(qsizetype size)
QList & assign(InputIterator first, InputIterator last)
static QList< T > fromVector(const QList< T > &vector) noexcept
void replace(qsizetype i, parameter_type t)
reverse_iterator rbegin()
void pop_front() noexcept
constexpr bool isEmpty() const noexcept
const T & const_reference
const T & last() const noexcept
constexpr qsizetype count() const noexcept
void removeLast() noexcept
void resize(qsizetype size)
friend auto compareThreeWay(const QList &lhs, const QList &rhs)
const_iterator cend() const noexcept
void append(parameter_type t)
QList< T > & operator+=(parameter_type t)
QTypeTraits::compare_eq_result_container< QList, U > operator!=(const QList &other) const
const_iterator constEnd() const noexcept
const_reverse_iterator rend() const noexcept
T value(qsizetype i, parameter_type defaultValue) const
const_iterator cbegin() const noexcept
QList & assign(qsizetype n, parameter_type t)
QTypeTraits::compare_lt_result_container< QList, U > operator>=(const QList &other) const noexcept(noexcept(std::declval< QList< U > >()< other))
const_pointer data() const noexcept
constexpr qsizetype length() const noexcept
const_reference front() const noexcept
QList< T > & operator+=(QList< T > &&l)
friend qsizetype QtPrivate::indexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
DataPointer && data_ptr() &&
void append(const QList< T > &l)
const_iterator ConstIterator
const_reverse_iterator crend() const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
QString && asString(QString &&s)
constexpr QAnyStringArg qStringLikeToArg(QAnyStringView s) noexcept
qsizetype indexOf(const QList< T > &vector, const U &u, qsizetype from) noexcept
const QString & asString(const QString &s)
qsizetype lastIndexOf(const QList< T > &vector, const U &u, qsizetype from) noexcept
qsizetype lastIndexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
qsizetype indexOf(const QList< V > &list, const U &u, qsizetype from) noexcept
static constexpr qsizetype lengthHelperPointer(const Char *data) noexcept
std::is_same< Char, char32_t > IsCompatibleChar32TypeHelper
constexpr bool isLatin1(QLatin1StringView s) noexcept
QString operator""_s(const char16_t *str, size_t size) noexcept
QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION unsigned int qt_int_sqrt(unsigned int n)
\inmodule QtCore \title Global Qt Declarations
qsizetype erase(QList< T > &list, const AT &t)
QList(InputIterator, InputIterator) -> QList< ValueType >
qsizetype erase_if(QList< T > &list, Predicate pred)
QString operator+(const QString &s1, QChar s2)
QString operator+(QString &&lhs, const QString &rhs)
qsizetype erase_if(QString &s, Predicate pred)
#define QT_UNICODE_LITERAL(str)
QString operator+(QString &&lhs, QChar rhs)
QString operator+(QChar s1, const QString &s2)
QString operator+(const QString &s1, const QString &s2)
qsizetype erase(QString &s, const T &t)
QList< QList< qInternalCallback > > callbacks
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
const Self * self() const
bool contains(const AT &t) const noexcept
QListSpecialMethodsBase()=default
qsizetype lastIndexOf(const AT &t, qsizetype from=-1) const noexcept
QListSpecialMethods()=default
constexpr QAnyStringArg(QAnyStringView v) noexcept
constexpr QLatin1StringArg(QLatin1StringView v) noexcept
QLatin1StringArg()=default
constexpr QStringViewArg(QStringView v) noexcept