Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qbytearraylist.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Intel Corporation.
3// Copyright (C) 2014 by Southwest Research Institute (R)
4// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
5
6#include <QtCore/qlist.h>
7
8#ifndef QBYTEARRAYLIST_H
9#define QBYTEARRAYLIST_H
10
11#include <QtCore/qbytearray.h>
12
13#include <limits>
14
16
17#if !defined(QT_NO_JAVA_STYLE_ITERATORS)
18typedef QListIterator<QByteArray> QByteArrayListIterator;
19typedef QMutableListIterator<QByteArray> QMutableByteArrayListIterator;
20#endif
21
22#ifndef Q_QDOC
23
24namespace QtPrivate {
25#if QT_CORE_REMOVED_SINCE(6, 3) && QT_POINTER_SIZE != 4
26 QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *separator, int separatorLength);
27#endif
28 QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *sep, qsizetype len);
29}
30#endif
31
32#ifdef Q_QDOC
33class QByteArrayList : public QList<QByteArray>
34#else
35template <> struct QListSpecialMethods<QByteArray> : QListSpecialMethodsBase<QByteArray>
36#endif
37{
38#ifndef Q_QDOC
39protected:
40 ~QListSpecialMethods() = default;
41#endif
42public:
46
47 QByteArray join(QByteArrayView sep = {}) const
48 {
49 return QtPrivate::QByteArrayList_join(self(), sep.data(), sep.size());
50 }
52 inline QByteArray join(const QByteArray &sep) const
53 { return join(qToByteArrayViewIgnoringNull(sep)); }
54 inline QByteArray join(char sep) const
55 { return join({&sep, 1}); }
56};
57
59
60#endif // QBYTEARRAYLIST_H
\inmodule QtCore
\inmodule QtCore
Definition qbytearray.h:57
Definition qlist.h:75
Combined button and popup list for selecting options.
\macro QT_NO_KEYWORDS >
QByteArray Q_CORE_EXPORT QByteArrayList_join(const QByteArrayList *that, const char *sep, qsizetype len)
QString self
Definition language.cpp:58
QMutableListIterator< QByteArray > QMutableByteArrayListIterator
QT_BEGIN_NAMESPACE typedef QListIterator< QByteArray > QByteArrayListIterator
QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
#define Q_WEAK_OVERLOAD
static bool contains(const QJsonArray &haystack, unsigned needle)
Definition qopengl.cpp:116
GLenum GLsizei len
static constexpr QChar sep
ptrdiff_t qsizetype
Definition qtypes.h:165
list lastIndexOf("B")
list indexOf("B")