QtBase  v6.3.1
qbytearrayview.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2021 The Qt Company Ltd.
4 ** Contact: https://www.qt.io/licensing/
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and The Qt Company. For licensing terms
14 ** and conditions see https://www.qt.io/terms-conditions. For further
15 ** information use the contact form at https://www.qt.io/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 3 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 3 requirements
23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24 **
25 ** GNU General Public License Usage
26 ** Alternatively, this file may be used under the terms of the GNU
27 ** General Public License version 2.0 or (at your option) the GNU General
28 ** Public license version 3 or any later version approved by the KDE Free
29 ** Qt Foundation. The licenses are as published by the Free Software
30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31 ** included in the packaging of this file. Please review the following
32 ** information to ensure the GNU General Public License requirements will
33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34 ** https://www.gnu.org/licenses/gpl-3.0.html.
35 **
36 ** $QT_END_LICENSE$
37 **
38 ****************************************************************************/
39 #ifndef QBYTEARRAYVIEW_H
40 #define QBYTEARRAYVIEW_H
41 
42 #include <QtCore/qbytearrayalgorithms.h>
43 
44 #include <string>
45 
47 
48 class QByteArray;
49 class QLatin1String;
50 
51 namespace QtPrivate {
52 
53 template <typename Byte>
55  : std::integral_constant<bool,
56  std::is_same_v<Byte, char> ||
57  std::is_same_v<Byte, uchar> ||
58  std::is_same_v<Byte, signed char> ||
59  std::is_same_v<Byte, std::byte>> {};
60 
61 template <typename Byte>
64  typename std::remove_cv_t<typename std::remove_reference_t<Byte>>> {};
65 
66 template <typename Pointer>
67 struct IsCompatibleByteArrayPointerHelper : std::false_type {};
68 template <typename Byte>
71 template<typename Pointer>
74  typename std::remove_cv_t<typename std::remove_reference_t<Pointer>>> {};
75 
76 template <typename T, typename Enable = void>
77 struct IsContainerCompatibleWithQByteArrayView : std::false_type {};
78 
79 template <typename T>
81  std::conjunction_v<
82  // lacking concepts and ranges, we accept any T whose std::data yields a suitable
83  // pointer ...
84  IsCompatibleByteArrayPointer<decltype(std::data(std::declval<const T &>()))>,
85  // ... and that has a suitable size ...
86  std::is_convertible<decltype(std::size(std::declval<const T &>())), qsizetype>,
87  // ... and it's a range as it defines an iterator-like API
88  IsCompatibleByteType<typename std::iterator_traits<decltype(
89  std::begin(std::declval<const T &>()))>::value_type>,
90  std::is_convertible<decltype(std::begin(std::declval<const T &>())
91  != std::end(std::declval<const T &>())),
92  bool>,
93 
94  // This needs to be treated specially due to the empty vs null distinction
95  std::negation<std::is_same<std::decay_t<T>, QByteArray>>,
96 
97  // We handle array literals specially for source compat reasons
98  std::negation<std::is_array<T>>,
99 
100  // Don't make an accidental copy constructor
101  std::negation<std::is_same<std::decay_t<T>, QByteArrayView>>>>> : std::true_type {};
102 
103 } // namespace QtPrivate
104 
105 class Q_CORE_EXPORT QByteArrayView
106 {
107 public:
108  typedef char storage_type;
109  typedef const char value_type;
114  typedef value_type *pointer;
116 
117  typedef pointer iterator;
119  typedef std::reverse_iterator<iterator> reverse_iterator;
120  typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
121 
122 private:
123  template <typename Byte>
124  using if_compatible_byte =
126 
127  template <typename Pointer>
128  using if_compatible_pointer =
130  bool>;
131 
132  template <typename T>
133  using if_compatible_qbytearray_like =
134  typename std::enable_if_t<std::is_same_v<T, QByteArray>, bool>;
135 
136  template <typename T>
137  using if_compatible_container =
139  bool>;
140 
141  template <typename Char>
142  static constexpr qsizetype lengthHelperPointer(const Char *data) noexcept
143  {
145  }
146 
147  template <typename Container>
148  static constexpr qsizetype lengthHelperContainer(const Container &c) noexcept
149  {
150  return qsizetype(std::size(c));
151  }
152 
153  static constexpr qsizetype lengthHelperCharArray(const char *data, size_t size) noexcept
154  {
155  const auto it = std::char_traits<char>::find(data, size, '\0');
156  const auto end = it ? it : std::next(data, size);
157  return qsizetype(std::distance(data, end));
158  }
159 
160  template <typename Byte>
161  static const storage_type *castHelper(const Byte *data) noexcept
162  { return reinterpret_cast<const storage_type*>(data); }
163  static constexpr const storage_type *castHelper(const storage_type *data) noexcept
164  { return data; }
165 
166 public:
167  constexpr QByteArrayView() noexcept
168  : m_size(0), m_data(nullptr) {}
169  constexpr QByteArrayView(std::nullptr_t) noexcept
170  : QByteArrayView() {}
171 
172  template <typename Byte, if_compatible_byte<Byte> = true>
173  constexpr QByteArrayView(const Byte *data, qsizetype len)
174  : m_size((Q_ASSERT(len >= 0), Q_ASSERT(data || !len), len)),
175  m_data(castHelper(data)) {}
176 
177  template <typename Byte, if_compatible_byte<Byte> = true>
178  constexpr QByteArrayView(const Byte *first, const Byte *last)
179  : QByteArrayView(first, last - first) {}
180 
181 #ifdef Q_QDOC
182  template <typename Byte>
183  constexpr QByteArrayView(const Byte *data) noexcept;
184 #else
185  template <typename Pointer, if_compatible_pointer<Pointer> = true>
186  constexpr QByteArrayView(const Pointer &data) noexcept
187  : QByteArrayView(
188  data, data ? lengthHelperPointer(data) : 0) {}
189 #endif
190 
191 #ifdef Q_QDOC
192  QByteArrayView(const QByteArray &data) noexcept;
193 #else
194  template <typename ByteArray, if_compatible_qbytearray_like<ByteArray> = true>
195  QByteArrayView(const ByteArray &ba) noexcept
196  : QByteArrayView(ba.isNull() ? nullptr : ba.data(), qsizetype(ba.size())) {}
197 #endif
198 
199  template <typename Container, if_compatible_container<Container> = true>
200  constexpr QByteArrayView(const Container &c) noexcept
201  : QByteArrayView(std::data(c), lengthHelperContainer(c)) {}
202  template <size_t Size>
203  constexpr QByteArrayView(const char (&data)[Size]) noexcept
204  : QByteArrayView(data, lengthHelperCharArray(data, Size)) {}
205 
206 #ifdef Q_QDOC
207  template <typename Byte, size_t Size>
208 #else
209  template <typename Byte, size_t Size, if_compatible_byte<Byte> = true>
210 #endif
211  [[nodiscard]] constexpr static QByteArrayView fromArray(const Byte (&data)[Size]) noexcept
212  { return QByteArrayView(data, Size); }
213  [[nodiscard]] inline QByteArray toByteArray() const; // defined in qbytearray.h
214 
215  [[nodiscard]] constexpr qsizetype size() const noexcept { return m_size; }
216  [[nodiscard]] constexpr const_pointer data() const noexcept { return m_data; }
217  [[nodiscard]] constexpr const_pointer constData() const noexcept { return data(); }
218 
219  [[nodiscard]] constexpr char operator[](qsizetype n) const
220  { Q_ASSERT(n >= 0); Q_ASSERT(n < size()); return m_data[n]; }
221 
222  //
223  // QByteArray API
224  //
225  [[nodiscard]] constexpr char at(qsizetype n) const { return (*this)[n]; }
226 
227  [[nodiscard]] constexpr QByteArrayView first(qsizetype n) const
228  { Q_ASSERT(n >= 0); Q_ASSERT(n <= size()); return QByteArrayView(data(), n); }
229  [[nodiscard]] constexpr QByteArrayView last(qsizetype n) const
230  { Q_ASSERT(n >= 0); Q_ASSERT(n <= size()); return QByteArrayView(data() + size() - n, n); }
231  [[nodiscard]] constexpr QByteArrayView sliced(qsizetype pos) const
232  { Q_ASSERT(pos >= 0); Q_ASSERT(pos <= size()); return QByteArrayView(data() + pos, size() - pos); }
233  [[nodiscard]] constexpr QByteArrayView sliced(qsizetype pos, qsizetype n) const
234  { Q_ASSERT(pos >= 0); Q_ASSERT(n >= 0); Q_ASSERT(size_t(pos) + size_t(n) <= size_t(size())); return QByteArrayView(data() + pos, n); }
235  [[nodiscard]] constexpr QByteArrayView chopped(qsizetype len) const
236  { Q_ASSERT(len >= 0); Q_ASSERT(len <= size()); return first(size() - len); }
237 
238  constexpr void truncate(qsizetype n)
239  { Q_ASSERT(n >= 0); Q_ASSERT(n <= size()); m_size = n; }
240  constexpr void chop(qsizetype n)
241  { Q_ASSERT(n >= 0); Q_ASSERT(n <= size()); m_size -= n; }
242 
243  // Defined in qbytearray.cpp:
244  [[nodiscard]] QByteArrayView trimmed() const noexcept
245  { return QtPrivate::trimmed(*this); }
246  [[nodiscard]] short toShort(bool *ok = nullptr, int base = 10) const
247  { return QtPrivate::toIntegral<short>(*this, ok, base); }
248  [[nodiscard]] ushort toUShort(bool *ok = nullptr, int base = 10) const
249  { return QtPrivate::toIntegral<ushort>(*this, ok, base); }
250  [[nodiscard]] int toInt(bool *ok = nullptr, int base = 10) const
251  { return QtPrivate::toIntegral<int>(*this, ok, base); }
252  [[nodiscard]] uint toUInt(bool *ok = nullptr, int base = 10) const
253  { return QtPrivate::toIntegral<uint>(*this, ok, base); }
254  [[nodiscard]] long toLong(bool *ok = nullptr, int base = 10) const
255  { return QtPrivate::toIntegral<long>(*this, ok, base); }
256  [[nodiscard]] ulong toULong(bool *ok = nullptr, int base = 10) const
257  { return QtPrivate::toIntegral<ulong>(*this, ok, base); }
258  [[nodiscard]] qlonglong toLongLong(bool *ok = nullptr, int base = 10) const
259  { return QtPrivate::toIntegral<qlonglong>(*this, ok, base); }
260  [[nodiscard]] qulonglong toULongLong(bool *ok = nullptr, int base = 10) const
261  { return QtPrivate::toIntegral<qulonglong>(*this, ok, base); }
262  [[nodiscard]] float toFloat(bool *ok = nullptr) const
263  {
264  const auto r = QtPrivate::toFloat(*this);
265  if (ok)
266  *ok = bool(r);
267  return r.value_or(0.0f);
268  }
269  [[nodiscard]] double toDouble(bool *ok = nullptr) const
270  {
271  const auto r = QtPrivate::toDouble(*this);
272  if (ok)
273  *ok = bool(r);
274  return r.value_or(0.0);
275  }
276 
277  [[nodiscard]] bool startsWith(QByteArrayView other) const noexcept
278  { return QtPrivate::startsWith(*this, other); }
279  [[nodiscard]] bool startsWith(char c) const noexcept
280  { return !empty() && front() == c; }
281 
282  [[nodiscard]] bool endsWith(QByteArrayView other) const noexcept
283  { return QtPrivate::endsWith(*this, other); }
284  [[nodiscard]] bool endsWith(char c) const noexcept
285  { return !empty() && back() == c; }
286 
287  [[nodiscard]] qsizetype indexOf(QByteArrayView a, qsizetype from = 0) const noexcept
288  { return QtPrivate::findByteArray(*this, from, a); }
289  [[nodiscard]] qsizetype indexOf(char ch, qsizetype from = 0) const noexcept
290  { return QtPrivate::findByteArray(*this, from, QByteArrayView(&ch, 1)); }
291 
292  [[nodiscard]] bool contains(QByteArrayView a) const noexcept
293  { return indexOf(a) != qsizetype(-1); }
294  [[nodiscard]] bool contains(char c) const noexcept
295  { return indexOf(c) != qsizetype(-1); }
296 
297  [[nodiscard]] qsizetype lastIndexOf(QByteArrayView a) const noexcept
298  { return lastIndexOf(a, size()); }
299  [[nodiscard]] qsizetype lastIndexOf(QByteArrayView a, qsizetype from) const noexcept
300  { return QtPrivate::lastIndexOf(*this, from, a); }
301  [[nodiscard]] qsizetype lastIndexOf(char ch, qsizetype from = -1) const noexcept
302  { return QtPrivate::lastIndexOf(*this, from, QByteArrayView(&ch, 1)); }
303 
304  [[nodiscard]] qsizetype count(QByteArrayView a) const noexcept
305  { return QtPrivate::count(*this, a); }
306  [[nodiscard]] qsizetype count(char ch) const noexcept
307  { return QtPrivate::count(*this, QByteArrayView(&ch, 1)); }
308 
309  inline int compare(QByteArrayView a, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept;
310 
311  [[nodiscard]] inline bool isValidUtf8() const noexcept { return QtPrivate::isValidUtf8(*this); }
312 
313  //
314  // STL compatibility API:
315  //
316  [[nodiscard]] constexpr const_iterator begin() const noexcept { return data(); }
317  [[nodiscard]] constexpr const_iterator end() const noexcept { return data() + size(); }
318  [[nodiscard]] constexpr const_iterator cbegin() const noexcept { return begin(); }
319  [[nodiscard]] constexpr const_iterator cend() const noexcept { return end(); }
320  [[nodiscard]] constexpr const_reverse_iterator rbegin() const noexcept { return const_reverse_iterator(end()); }
321  [[nodiscard]] constexpr const_reverse_iterator rend() const noexcept { return const_reverse_iterator(begin()); }
322  [[nodiscard]] constexpr const_reverse_iterator crbegin() const noexcept { return rbegin(); }
323  [[nodiscard]] constexpr const_reverse_iterator crend() const noexcept { return rend(); }
324 
325  [[nodiscard]] constexpr bool empty() const noexcept { return size() == 0; }
326  [[nodiscard]] constexpr char front() const { Q_ASSERT(!empty()); return m_data[0]; }
327  [[nodiscard]] constexpr char back() const { Q_ASSERT(!empty()); return m_data[m_size - 1]; }
328 
329  //
330  // Qt compatibility API:
331  //
332  [[nodiscard]] constexpr bool isNull() const noexcept { return !m_data; }
333  [[nodiscard]] constexpr bool isEmpty() const noexcept { return empty(); }
334  [[nodiscard]] constexpr qsizetype length() const noexcept
335  { return size(); }
336  [[nodiscard]] constexpr char first() const { return front(); }
337  [[nodiscard]] constexpr char last() const { return back(); }
338 
339  friend inline bool operator==(QByteArrayView lhs, QByteArrayView rhs) noexcept
340  { return lhs.size() == rhs.size() && QtPrivate::compareMemory(lhs, rhs) == 0; }
341  friend inline bool operator!=(QByteArrayView lhs, QByteArrayView rhs) noexcept
342  { return !(lhs == rhs); }
343  friend inline bool operator< (QByteArrayView lhs, QByteArrayView rhs) noexcept
344  { return QtPrivate::compareMemory(lhs, rhs) < 0; }
345  friend inline bool operator<=(QByteArrayView lhs, QByteArrayView rhs) noexcept
346  { return QtPrivate::compareMemory(lhs, rhs) <= 0; }
347  friend inline bool operator> (QByteArrayView lhs, QByteArrayView rhs) noexcept
348  { return !(lhs <= rhs); }
349  friend inline bool operator>=(QByteArrayView lhs, QByteArrayView rhs) noexcept
350  { return !(lhs < rhs); }
351 
352 private:
353  qsizetype m_size;
354  const storage_type *m_data;
355 };
357 
358 template<typename QByteArrayLike,
359  std::enable_if_t<std::is_same_v<QByteArrayLike, QByteArray>, bool> = true>
360 [[nodiscard]] inline QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
361 { return QByteArrayView(b.data(), b.size()); }
362 
364 {
365  return cs == Qt::CaseSensitive ? QtPrivate::compareMemory(*this, a) :
366  qstrnicmp(data(), size(), a.data(), a.size());
367 }
368 
369 #if QT_DEPRECATED_SINCE(6, 0)
370 QT_DEPRECATED_VERSION_X_6_0("Use the QByteArrayView overload.")
372  Qt::ChecksumType standard = Qt::ChecksumIso3309)
373 { return qChecksum(QByteArrayView(s, len), standard); }
374 #endif
375 
377 
378 #endif // QBYTEARRAYVIEW_H
#define value
[5]
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:85
char * data()
Definition: qbytearray.h:516
qsizetype size() const noexcept
Definition: qbytearray.h:470
quint16 qChecksum(QByteArrayView data, Qt::ChecksumType standard)
Definition: qbytearray.cpp:497
char * data()
int qstrnicmp(const char *str1, const char *str2, size_t len)
Definition: qbytearray.cpp:350
bool isNull() const noexcept
constexpr char front() const
constexpr bool isNull() const noexcept
std::reverse_iterator< const_iterator > const_reverse_iterator
constexpr char first() const
qsizetype lastIndexOf(QByteArrayView a, qsizetype from) const noexcept
friend bool operator==(QByteArrayView lhs, QByteArrayView rhs) noexcept
constexpr char back() const
qsizetype lastIndexOf(char ch, qsizetype from=-1) const noexcept
qptrdiff difference_type
const char value_type
constexpr char operator[](qsizetype n) const
std::reverse_iterator< iterator > reverse_iterator
constexpr QByteArrayView(const Container &c) noexcept
constexpr qsizetype length() const noexcept
bool contains(QByteArrayView a) const noexcept
constexpr const_iterator begin() const noexcept
bool startsWith(QByteArrayView other) const noexcept
constexpr char at(qsizetype n) const
constexpr const_iterator end() const noexcept
qlonglong toLongLong(bool *ok=nullptr, int base=10) const
int toInt(bool *ok=nullptr, int base=10) const
uint toUInt(bool *ok=nullptr, int base=10) const
qulonglong toULongLong(bool *ok=nullptr, int base=10) const
constexpr QByteArrayView(const Byte *data, qsizetype len)
constexpr const_reverse_iterator rend() const noexcept
constexpr QByteArrayView last(qsizetype n) const
qsizetype size_type
qsizetype count(char ch) const noexcept
friend bool operator>=(QByteArrayView lhs, QByteArrayView rhs) noexcept
ushort toUShort(bool *ok=nullptr, int base=10) const
qsizetype indexOf(char ch, qsizetype from=0) const noexcept
float toFloat(bool *ok=nullptr) const
value_type & reference
constexpr char last() const
value_type & const_reference
constexpr const_reverse_iterator rbegin() const noexcept
friend bool operator<=(QByteArrayView lhs, QByteArrayView rhs) noexcept
bool endsWith(QByteArrayView other) const noexcept
ulong toULong(bool *ok=nullptr, int base=10) const
short toShort(bool *ok=nullptr, int base=10) const
constexpr QByteArrayView sliced(qsizetype pos) const
constexpr QByteArrayView first(qsizetype n) const
const_pointer const_iterator
constexpr void truncate(qsizetype n)
bool endsWith(char c) const noexcept
constexpr bool isEmpty() const noexcept
qsizetype count(QByteArrayView a) const noexcept
constexpr const_reverse_iterator crbegin() const noexcept
constexpr qsizetype size() const noexcept
value_type * const_pointer
constexpr QByteArrayView() noexcept
constexpr const_iterator cbegin() const noexcept
QByteArrayView(const ByteArray &ba) noexcept
constexpr QByteArrayView(const Byte *first, const Byte *last)
constexpr bool empty() const noexcept
qsizetype lastIndexOf(QByteArrayView a) const noexcept
bool contains(char c) const noexcept
int compare(QByteArrayView a, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
constexpr QByteArrayView chopped(qsizetype len) const
constexpr void chop(qsizetype n)
constexpr QByteArrayView sliced(qsizetype pos, qsizetype n) const
value_type * pointer
bool isValidUtf8() const noexcept
constexpr const_reverse_iterator crend() const noexcept
constexpr const_pointer data() const noexcept
constexpr QByteArrayView(std::nullptr_t) noexcept
constexpr QByteArrayView(const Pointer &data) noexcept
long toLong(bool *ok=nullptr, int base=10) const
qsizetype indexOf(QByteArrayView a, qsizetype from=0) const noexcept
QByteArrayView trimmed() const noexcept
double toDouble(bool *ok=nullptr) const
constexpr const_iterator cend() const noexcept
constexpr const_pointer constData() const noexcept
constexpr QByteArrayView(const char(&data)[Size]) noexcept
constexpr static QByteArrayView fromArray(const Byte(&data)[Size]) noexcept
bool startsWith(char c) const noexcept
friend bool operator!=(QByteArrayView lhs, QByteArrayView rhs) noexcept
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
Definition: qstring.h:84
Definition: base.h:37
unsigned char Byte
Definition: ftzconf.h:219
auto it unsigned count const
Definition: hb-iter.hh:848
short next
Definition: keywords.cpp:454
#define inline
Definition: md4c.c:45
QT_BEGIN_NAMESPACE bool operator<(const QMimeType &t1, const QMimeType &t2)
Definition: qnamespace.h:55
ChecksumType
Definition: qnamespace.h:1718
@ ChecksumIso3309
Definition: qnamespace.h:1719
CaseSensitivity
Definition: qnamespace.h:1282
@ CaseSensitive
Definition: qnamespace.h:1284
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool endsWith(QByteArrayView haystack, QByteArrayView needle) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION QByteArrayView trimmed(QByteArrayView s) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool startsWith(QByteArrayView haystack, QByteArrayView needle) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype lastIndexOf(QByteArrayView haystack, qsizetype from, QByteArrayView needle) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype count(QByteArrayView haystack, QByteArrayView needle) noexcept
Q_CORE_EXPORT int compareMemory(QByteArrayView lhs, QByteArrayView rhs)
Definition: qbytearray.cpp:419
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION ParsedNumber< float > toFloat(QByteArrayView a) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION qsizetype findByteArray(QByteArrayView haystack, qsizetype from, QByteArrayView needle) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION ParsedNumber< double > toDouble(QByteArrayView a) noexcept
Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isValidUtf8(QByteArrayView s) noexcept
Definition: qbytearray.cpp:435
Definition: qfloat16.h:381
int distance(TestIterator &a, TestIterator &b)
QByteArrayView qToByteArrayViewIgnoringNull(const QByteArrayLike &b) noexcept
Q_DECLARE_TYPEINFO(QByteArrayView, Q_PRIMITIVE_TYPE)
constexpr bool operator>(const QFixed &f, int i)
Definition: qfixed_p.h:182
unsigned short quint16
Definition: qglobal.h:286
unsigned long ulong
Definition: qglobal.h:335
ptrdiff_t qptrdiff
Definition: qglobal.h:307
quint64 qulonglong
Definition: qglobal.h:302
ptrdiff_t qsizetype
Definition: qglobal.h:308
unsigned int uint
Definition: qglobal.h:334
#define QT_DEPRECATED_VERSION_X_6_0(text)
Definition: qglobal.h:444
unsigned short ushort
Definition: qglobal.h:333
qint64 qlonglong
Definition: qglobal.h:301
GLenum GLuint GLenum GLsizei length
Definition: qopengl.h:270
GLboolean GLboolean GLboolean b
GLboolean r
[2]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLuint end
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint first
GLfloat n
const GLubyte * c
Definition: qopenglext.h:12701
GLenum GLsizei len
Definition: qopenglext.h:3292
GLdouble s
[6]
Definition: qopenglext.h:235
#define Q_ASSERT(cond)
Definition: qrandom.cpp:84
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QT_BEGIN_NAMESPACE typedef char Char
@ Q_PRIMITIVE_TYPE
Definition: qtypeinfo.h:155
QByteArray ba
[0]
QSharedPointer< T > other(t)
[5]
QStringList::Iterator it
Definition: main.cpp:38
void compare(Input input, FnUnderTest fn_under_test, const QByteArray &output)
#define rhs
QDomElement find(const QString &tagName, const QDomElement &e)
Definition: main.cpp:39