Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qdebug.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// Copyright (C) 2016 Intel Corporation.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QDEBUG_H
6#define QDEBUG_H
7
8#if 0
9#pragma qt_class(QtDebug)
10#endif
11
12#include <QtCore/qcontainerfwd.h>
13#include <QtCore/qtextstream.h>
14#include <QtCore/qstring.h>
15#include <QtCore/qcontiguouscache.h>
16#include <QtCore/qsharedpointer.h>
17
18// all these have already been included by various headers above, but don't rely on indirect includes:
19#include <chrono>
20#include <list>
21#include <map>
22#include <string>
23#include <string_view>
24#include <utility>
25#include <vector>
26
27#if !defined(QT_LEAN_HEADERS) || QT_LEAN_HEADERS < 1
28# include <QtCore/qlist.h>
29# include <QtCore/qmap.h>
30# include <QtCore/qset.h>
31# include <QtCore/qvarlengtharray.h>
32#endif
33
35
36class QT6_ONLY(Q_CORE_EXPORT) QDebug : public QIODeviceBase
37{
38 friend class QMessageLogger;
39 friend class QDebugStateSaver;
40 friend class QDebugStateSaverPrivate;
41 struct Stream {
42 enum { VerbosityShift = 29, VerbosityMask = 0x7 };
43
44 Stream(QIODevice *device)
45 : ts(device)
46 {}
47 Stream(QString *string)
48 : ts(string, WriteOnly)
49 {}
50 Stream(QtMsgType t)
51 : ts(&buffer, WriteOnly),
52 type(t),
53 message_output(true)
54 {}
55 QTextStream ts;
57 int ref = 1;
59 bool space = true;
60 bool noQuotes = false;
61 bool message_output = false;
62 int verbosity = DefaultVerbosity;
64 } *stream;
65
66 enum Latin1Content { ContainsBinary = 0, ContainsLatin1 };
67
68 QT7_ONLY(Q_CORE_EXPORT) void putUcs4(uint ucs4);
69 QT7_ONLY(Q_CORE_EXPORT) void putString(const QChar *begin, size_t length);
70 QT7_ONLY(Q_CORE_EXPORT) void putByteArray(const char *begin, size_t length, Latin1Content content);
71 QT7_ONLY(Q_CORE_EXPORT) void putTimeUnit(qint64 num, qint64 den);
72public:
73 explicit QDebug(QIODevice *device) : stream(new Stream(device)) {}
74 explicit QDebug(QString *string) : stream(new Stream(string)) {}
75 explicit QDebug(QtMsgType t) : stream(new Stream(t)) {}
76 QDebug(const QDebug &o) : stream(o.stream) { ++stream->ref; }
77 QDebug(QDebug &&other) noexcept : stream{std::exchange(other.stream, nullptr)} {}
78 inline QDebug &operator=(const QDebug &other);
79 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QDebug)
80 ~QDebug();
81 void swap(QDebug &other) noexcept { qt_ptr_swap(stream, other.stream); }
82
83 QT7_ONLY(Q_CORE_EXPORT) QDebug &resetFormat();
84
85 inline QDebug &space() { stream->space = true; stream->ts << ' '; return *this; }
86 inline QDebug &nospace() { stream->space = false; return *this; }
87 inline QDebug &maybeSpace() { if (stream->space) stream->ts << ' '; return *this; }
88 inline QDebug &verbosity(int verbosityLevel) { stream->verbosity = verbosityLevel; return *this; }
89 int verbosity() const { return stream->verbosity; }
90 void setVerbosity(int verbosityLevel) { stream->verbosity = verbosityLevel; }
91 enum VerbosityLevel { MinimumVerbosity = 0, DefaultVerbosity = 2, MaximumVerbosity = 7 };
92
93 bool autoInsertSpaces() const { return stream->space; }
94 void setAutoInsertSpaces(bool b) { stream->space = b; }
95
96 [[nodiscard]] bool quoteStrings() const noexcept { return !stream->noQuotes; }
97 void setQuoteStrings(bool b) { stream->noQuotes = !b; }
98
99 inline QDebug &quote() { stream->noQuotes = false; return *this; }
100 inline QDebug &noquote() { stream->noQuotes = true; return *this; }
101 inline QDebug &maybeQuote(char c = '"') { if (!stream->noQuotes) stream->ts << c; return *this; }
102
103 inline QDebug &operator<<(QChar t) { putUcs4(t.unicode()); return maybeSpace(); }
104 inline QDebug &operator<<(bool t) { stream->ts << (t ? "true" : "false"); return maybeSpace(); }
105 inline QDebug &operator<<(char t) { stream->ts << t; return maybeSpace(); }
106 inline QDebug &operator<<(signed short t) { stream->ts << t; return maybeSpace(); }
107 inline QDebug &operator<<(unsigned short t) { stream->ts << t; return maybeSpace(); }
108 inline QDebug &operator<<(char16_t t) { return *this << QChar(t); }
109 inline QDebug &operator<<(char32_t t) { putUcs4(t); return maybeSpace(); }
110 inline QDebug &operator<<(signed int t) { stream->ts << t; return maybeSpace(); }
111 inline QDebug &operator<<(unsigned int t) { stream->ts << t; return maybeSpace(); }
112 inline QDebug &operator<<(signed long t) { stream->ts << t; return maybeSpace(); }
113 inline QDebug &operator<<(unsigned long t) { stream->ts << t; return maybeSpace(); }
114 inline QDebug &operator<<(qint64 t) { stream->ts << t; return maybeSpace(); }
115 inline QDebug &operator<<(quint64 t) { stream->ts << t; return maybeSpace(); }
116 inline QDebug &operator<<(qfloat16 t) { stream->ts << t; return maybeSpace(); }
117 inline QDebug &operator<<(float t) { stream->ts << t; return maybeSpace(); }
118 inline QDebug &operator<<(double t) { stream->ts << t; return maybeSpace(); }
119 inline QDebug &operator<<(const char* t) { stream->ts << QString::fromUtf8(t); return maybeSpace(); }
120 inline QDebug &operator<<(const char16_t *t) { stream->ts << QStringView(t); return maybeSpace(); }
121 inline QDebug &operator<<(const QString & t) { putString(t.constData(), size_t(t.size())); return maybeSpace(); }
122 inline QDebug &operator<<(QStringView s) { putString(s.data(), size_t(s.size())); return maybeSpace(); }
123 inline QDebug &operator<<(QUtf8StringView s) { putByteArray(reinterpret_cast<const char*>(s.data()), s.size(), ContainsBinary); return maybeSpace(); }
124 inline QDebug &operator<<(QLatin1StringView t) { putByteArray(t.latin1(), t.size(), ContainsLatin1); return maybeSpace(); }
125 inline QDebug &operator<<(const QByteArray & t) { putByteArray(t.constData(), t.size(), ContainsBinary); return maybeSpace(); }
126 inline QDebug &operator<<(QByteArrayView t) { putByteArray(t.constData(), t.size(), ContainsBinary); return maybeSpace(); }
127 inline QDebug &operator<<(const void * t) { stream->ts << t; return maybeSpace(); }
128 inline QDebug &operator<<(std::nullptr_t) { stream->ts << "(nullptr)"; return maybeSpace(); }
130 stream->ts << f;
131 return *this;
132 }
133
135 { stream->ts << m; return *this; }
136
137#ifdef Q_QDOC
138 template <typename Char, typename...Args>
139 QDebug &operator<<(const std::basic_string<Char, Args...> &s);
140
141 template <typename Char, typename...Args>
142 QDebug &operator<<(std::basic_string_view<Char, Args...> s);
143#else
144 template <typename...Args>
145 QDebug &operator<<(const std::basic_string<char, Args...> &s)
146 { return *this << QUtf8StringView(s); }
147
148 template <typename...Args>
149 QDebug &operator<<(std::basic_string_view<char, Args...> s)
150 { return *this << QUtf8StringView(s); }
151
152#ifdef __cpp_char8_t
153 template <typename...Args>
154 QDebug &operator<<(const std::basic_string<char8_t, Args...> &s)
155 { return *this << QUtf8StringView(s); }
156
157 template <typename...Args>
158 QDebug &operator<<(std::basic_string_view<char8_t, Args...> s)
159 { return *this << QUtf8StringView(s); }
160#endif // __cpp_char8_t
161
162 template <typename...Args>
163 QDebug &operator<<(const std::basic_string<char16_t, Args...> &s)
164 { return *this << QStringView(s); }
165
166 template <typename...Args>
167 QDebug &operator<<(std::basic_string_view<char16_t, Args...> s)
168 { return *this << QStringView(s); }
169
170 template <typename...Args>
171 QDebug &operator<<(const std::basic_string<wchar_t, Args...> &s)
172 {
173 if constexpr (sizeof(wchar_t) == 2)
174 return *this << QStringView(s);
175 else
176 return *this << QString::fromWCharArray(s.data(), s.size()); // ### optimize
177 }
178
179 template <typename...Args>
180 QDebug &operator<<(std::basic_string_view<wchar_t, Args...> s)
181 {
182 if constexpr (sizeof(wchar_t) == 2)
183 return *this << QStringView(s);
184 else
185 return *this << QString::fromWCharArray(s.data(), s.size()); // ### optimize
186 }
187
188 template <typename...Args>
189 QDebug &operator<<(const std::basic_string<char32_t, Args...> &s)
190 { return *this << QString::fromUcs4(s.data(), s.size()); }
191
192 template <typename...Args>
193 QDebug &operator<<(std::basic_string_view<char32_t, Args...> s)
194 { return *this << QString::fromUcs4(s.data(), s.size()); }
195#endif // !Q_QDOC
196
197 template <typename Rep, typename Period>
198 QDebug &operator<<(std::chrono::duration<Rep, Period> duration)
199 {
200 stream->ts << duration.count();
201 putTimeUnit(Period::num, Period::den);
202 return maybeSpace();
203 }
204
205 template <typename T>
206 static QString toString(T &&object)
207 {
210 stream.nospace() << std::forward<T>(object);
211 return buffer;
212 }
213};
214
215Q_DECLARE_SHARED(QDebug)
216
219{
220public:
221 Q_NODISCARD_CTOR Q_CORE_EXPORT
223 Q_CORE_EXPORT
225private:
226 Q_DISABLE_COPY(QDebugStateSaver)
228};
229
230class QNoDebug
231{
232public:
233 inline QNoDebug &operator<<(QTextStreamFunction) { return *this; }
234 inline QNoDebug &operator<<(QTextStreamManipulator) { return *this; }
235 inline QNoDebug &space() { return *this; }
236 inline QNoDebug &nospace() { return *this; }
237 inline QNoDebug &maybeSpace() { return *this; }
238 inline QNoDebug &quote() { return *this; }
239 inline QNoDebug &noquote() { return *this; }
240 inline QNoDebug &maybeQuote(const char = '"') { return *this; }
241 inline QNoDebug &verbosity(int) { return *this; }
242
243 template<typename T>
244 inline QNoDebug &operator<<(const T &) { return *this; }
245};
246
247inline QDebug &QDebug::operator=(const QDebug &other)
248{
249 QDebug{other}.swap(*this);
250 return *this;
251}
252
253namespace QtPrivate {
254
255template <typename SequentialContainer>
256inline QDebug printSequentialContainer(QDebug debug, const char *which, const SequentialContainer &c)
257{
258 const QDebugStateSaver saver(debug);
259 debug.nospace() << which << '(';
260 typename SequentialContainer::const_iterator it = c.begin(), end = c.end();
261 if (it != end) {
262 debug << *it;
263 ++it;
264 }
265 while (it != end) {
266 debug << ", " << *it;
267 ++it;
268 }
269 debug << ')';
270 return debug;
271}
272
273template <typename AssociativeContainer>
274inline QDebug printAssociativeContainer(QDebug debug, const char *which, const AssociativeContainer &c)
275{
276 const QDebugStateSaver saver(debug);
277 debug.nospace() << which << "(";
278 for (typename AssociativeContainer::const_iterator it = c.constBegin();
279 it != c.constEnd(); ++it) {
280 debug << '(' << it.key() << ", " << it.value() << ')';
281 }
282 debug << ')';
283 return debug;
284}
285
286} // namespace QtPrivate
287
288template<typename ...T>
290 std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator<QDebug, T>...>, QDebug>;
291
292template<typename Container, typename ...T>
294 std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator_container<QDebug, Container, T>...>, QDebug>;
295
296#ifndef Q_QDOC
297
298template<typename T>
300{
301 return QtPrivate::printSequentialContainer(debug, "QList", vec);
302}
303
304template<typename T, qsizetype P>
306{
307 return QtPrivate::printSequentialContainer(debug, "QVarLengthArray", vec);
308}
309
310template <typename T, typename Alloc>
311inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, const std::vector<T, Alloc> &vec)
312{
313 return QtPrivate::printSequentialContainer(debug, "std::vector", vec);
314}
315
316template <typename T, typename Alloc>
317inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, const std::list<T, Alloc> &vec)
318{
319 return QtPrivate::printSequentialContainer(debug, "std::list", vec);
320}
321
322template <typename T>
323inline QDebugIfHasDebugStream<T> operator<<(QDebug debug, std::initializer_list<T> list)
324{
325 return QtPrivate::printSequentialContainer(debug, "std::initializer_list", list);
326}
327
328template <typename Key, typename T, typename Compare, typename Alloc>
329inline QDebugIfHasDebugStream<Key, T> operator<<(QDebug debug, const std::map<Key, T, Compare, Alloc> &map)
330{
331 return QtPrivate::printSequentialContainer(debug, "std::map", map); // yes, sequential: *it is std::pair
332}
333
334template <typename Key, typename T, typename Compare, typename Alloc>
335inline QDebugIfHasDebugStream<Key, T> operator<<(QDebug debug, const std::multimap<Key, T, Compare, Alloc> &map)
336{
337 return QtPrivate::printSequentialContainer(debug, "std::multimap", map); // yes, sequential: *it is std::pair
338}
339
340template <class Key, class T>
342{
344}
345
346template <class Key, class T>
348{
349 return QtPrivate::printAssociativeContainer(debug, "QMultiMap", map);
350}
351
352template <class Key, class T>
354{
356}
357
358template <class Key, class T>
360{
361 return QtPrivate::printAssociativeContainer(debug, "QMultiHash", hash);
362}
363
364template <class T1, class T2>
365inline QDebugIfHasDebugStream<T1, T2> operator<<(QDebug debug, const std::pair<T1, T2> &pair)
366{
367 const QDebugStateSaver saver(debug);
368 debug.nospace() << "std::pair(" << pair.first << ',' << pair.second << ')';
369 return debug;
370}
371
372template <typename T>
374{
376}
377
378template <class T>
380{
381 const QDebugStateSaver saver(debug);
382 debug.nospace() << "QContiguousCache(";
383 for (qsizetype i = cache.firstIndex(); i <= cache.lastIndex(); ++i) {
384 debug << cache[i];
385 if (i != cache.lastIndex())
386 debug << ", ";
387 }
388 debug << ')';
389 return debug;
390}
391
392#else
393template <class T>
395
396template <class T, qsizetype P>
398
399template <typename T, typename Alloc>
400QDebug operator<<(QDebug debug, const std::vector<T, Alloc> &vec);
401
402template <typename T, typename Alloc>
403QDebug operator<<(QDebug debug, const std::list<T, Alloc> &vec);
404
405template <typename Key, typename T, typename Compare, typename Alloc>
406QDebug operator<<(QDebug debug, const std::map<Key, T, Compare, Alloc> &map);
407
408template <typename Key, typename T, typename Compare, typename Alloc>
409QDebug operator<<(QDebug debug, const std::multimap<Key, T, Compare, Alloc> &map);
410
411template <class Key, class T>
413
414template <class Key, class T>
416
417template <class Key, class T>
419
420template <class Key, class T>
422
423template <typename T>
425
426template <class T1, class T2>
428
429template <class T1, class T2>
430QDebug operator<<(QDebug debug, const std::pair<T1, T2> &pair);
431
432template <typename T>
434
435#endif // Q_QDOC
436
437template <class T>
439{
440 QDebugStateSaver saver(debug);
441 debug.nospace() << "QSharedPointer(" << ptr.data() << ")";
442 return debug;
443}
444
445template <typename T, typename Tag> class QTaggedPointer;
446
447template <typename T, typename Tag>
449{
450 QDebugStateSaver saver(debug);
451 debug.nospace() << "QTaggedPointer(" << ptr.pointer() << ", " << ptr.tag() << ")";
452 return debug;
453}
454
455Q_CORE_EXPORT void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, int value);
456
457template <typename Int>
459{
460 const QDebugStateSaver saver(debug);
461 debug.resetFormat();
462 debug.nospace() << "QFlags(" << Qt::hex << Qt::showbase;
463 bool needSeparator = false;
464 for (size_t i = 0; i < sizeofT * 8; ++i) {
465 if (value & (Int(1) << i)) {
466 if (needSeparator)
467 debug << '|';
468 else
469 needSeparator = true;
470 debug << (Int(1) << i);
471 }
472 }
473 debug << ')';
474}
475
476#if !defined(QT_NO_QOBJECT) && !defined(Q_QDOC)
477Q_CORE_EXPORT QDebug qt_QMetaEnum_debugOperator(QDebug&, qint64 value, const QMetaObject *meta, const char *name);
478Q_CORE_EXPORT QDebug qt_QMetaEnum_flagDebugOperator(QDebug &dbg, quint64 value, const QMetaObject *meta, const char *name);
479
480template<typename T>
481typename std::enable_if<QtPrivate::IsQEnumHelper<T>::Value, QDebug>::type
482operator<<(QDebug dbg, T value)
483{
484 const QMetaObject *obj = qt_getEnumMetaObject(value);
485 const char *name = qt_getEnumName(value);
486 return qt_QMetaEnum_debugOperator(dbg, static_cast<typename std::underlying_type<T>::type>(value), obj, name);
487}
488
489template<typename T,
490 typename A = typename std::enable_if<std::is_enum<T>::value, void>::type,
491 typename B = typename std::enable_if<sizeof(T) <= sizeof(int), void>::type,
492 typename C = typename std::enable_if<!QtPrivate::IsQEnumHelper<T>::Value, void>::type,
493 typename D = typename std::enable_if<QtPrivate::IsQEnumHelper<QFlags<T>>::Value, void>::type>
494inline QDebug operator<<(QDebug dbg, T value)
495{
496 typedef QFlags<T> FlagsT;
497 const QMetaObject *obj = qt_getEnumMetaObject(FlagsT());
498 const char *name = qt_getEnumName(FlagsT());
499 return qt_QMetaEnum_debugOperator(dbg, typename FlagsT::Int(value), obj, name);
500}
501
502template <class T>
503inline typename std::enable_if<
506qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
507{
509 const char *name = qt_getEnumName(T());
511}
512
513template <class T>
514inline typename std::enable_if<
517qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
518#else // !QT_NO_QOBJECT && !Q_QDOC
519template <class T>
520inline QDebug qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags)
521#endif
522{
524 return debug;
525}
526
527template<typename T>
529{
530 // We have to use an indirection otherwise specialisation of some other overload of the
531 // operator<< the compiler would try to instantiate QFlags<T> for the std::enable_if
532 return qt_QMetaEnum_flagDebugOperator_helper(debug, flags);
533}
534
535inline QDebug operator<<(QDebug debug, QKeyCombination combination)
536{
537 QDebugStateSaver saver(debug);
538 debug.nospace() << "QKeyCombination("
539 << combination.keyboardModifiers()
540 << ", "
541 << combination.key()
542 << ")";
543 return debug;
544}
545
546#ifdef Q_OS_DARWIN
547
548// We provide QDebug stream operators for commonly used Core Foundation
549// and Core Graphics types, as well as NSObject. Additional CF/CG types
550// may be added by the user, using Q_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE.
551
552#define QT_FOR_EACH_CORE_FOUNDATION_TYPE(F) \
553 F(CFArray) \
554 F(CFURL) \
555 F(CFData) \
556 F(CFNumber) \
557 F(CFDictionary) \
558 F(CFLocale) \
559 F(CFDate) \
560 F(CFBoolean) \
561 F(CFTimeZone) \
562
563#define QT_FOR_EACH_MUTABLE_CORE_FOUNDATION_TYPE(F) \
564 F(CFError) \
565 F(CFBundle) \
566
567#define QT_FOR_EACH_CORE_GRAPHICS_TYPE(F) \
568 F(CGPath) \
569
570#define QT_FOR_EACH_MUTABLE_CORE_GRAPHICS_TYPE(F) \
571 F(CGColorSpace) \
572 F(CGImage) \
573 F(CGFont) \
574 F(CGColor) \
575
576#define QT_FORWARD_DECLARE_CF_TYPE(type) Q_FORWARD_DECLARE_CF_TYPE(type);
577#define QT_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type);
578#define QT_FORWARD_DECLARE_CG_TYPE(type) Q_FORWARD_DECLARE_CG_TYPE(type);
579#define QT_FORWARD_DECLARE_MUTABLE_CG_TYPE(type) Q_FORWARD_DECLARE_MUTABLE_CG_TYPE(type);
580
583struct objc_object;
585QT_FOR_EACH_CORE_FOUNDATION_TYPE(QT_FORWARD_DECLARE_CF_TYPE)
586QT_FOR_EACH_MUTABLE_CORE_FOUNDATION_TYPE(QT_FORWARD_DECLARE_MUTABLE_CF_TYPE)
587QT_FOR_EACH_CORE_GRAPHICS_TYPE(QT_FORWARD_DECLARE_CG_TYPE)
588QT_FOR_EACH_MUTABLE_CORE_GRAPHICS_TYPE(QT_FORWARD_DECLARE_MUTABLE_CG_TYPE)
590
591#define QT_FORWARD_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE(CFType) \
592 Q_CORE_EXPORT QDebug operator<<(QDebug, CFType##Ref);
593
594#define Q_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE(CFType) \
595 QDebug operator<<(QDebug debug, CFType##Ref ref) \
596 { \
597 if (!ref) \
598 return debug << QT_STRINGIFY(CFType) "Ref(0x0)"; \
599 if (CFStringRef description = CFCopyDescription(ref)) { \
600 QDebugStateSaver saver(debug); \
601 debug.noquote() << description; \
602 CFRelease(description); \
603 } \
604 return debug; \
605 }
606
607// Defined in qcore_mac_objc.mm
608#if defined(__OBJC__)
609Q_CORE_EXPORT QDebug operator<<(QDebug, id);
610#endif
611Q_CORE_EXPORT QDebug operator<<(QDebug, objc_object *);
612Q_CORE_EXPORT QDebug operator<<(QDebug, const NSObject *);
613Q_CORE_EXPORT QDebug operator<<(QDebug, CFStringRef);
614
615QT_FOR_EACH_CORE_FOUNDATION_TYPE(QT_FORWARD_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE)
616QT_FOR_EACH_MUTABLE_CORE_FOUNDATION_TYPE(QT_FORWARD_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE)
617QT_FOR_EACH_CORE_GRAPHICS_TYPE(QT_FORWARD_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE)
618QT_FOR_EACH_MUTABLE_CORE_GRAPHICS_TYPE(QT_FORWARD_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE)
619
620#undef QT_FORWARD_DECLARE_CF_TYPE
621#undef QT_FORWARD_DECLARE_MUTABLE_CF_TYPE
622#undef QT_FORWARD_DECLARE_CG_TYPE
623#undef QT_FORWARD_DECLARE_MUTABLE_CG_TYPE
624
625#endif // Q_OS_DARWIN
626
628
629#endif // QDEBUG_H
IOBluetoothDevice * device
\inmodule QtCore
Definition qbytearray.h:57
\inmodule QtCore
Definition qchar.h:48
\inmodule QtCore
\inmodule QtCore
\inmodule QtCore
std::conditional< std::is_unsigned< typenamestd::underlying_type< Enum >::type >::value, unsignedint, signedint >::type Int
Definition qflags.h:69
\inmodule QtCore
Definition qhash.h:818
\inheaderfile QIODevice \inmodule QtCore
\inmodule QtCore \reentrant
Definition qiodevice.h:34
constexpr Qt::Key key() const noexcept
constexpr Qt::KeyboardModifiers keyboardModifiers() const noexcept
Definition qlist.h:74
Definition qmap.h:186
\inmodule QtCore
Definition qlogging.h:39
\inmodule QtCore
Definition qlogging.h:68
\inmodule QtCore
Definition qhash.h:1348
\inmodule QtCore
Definition qset.h:18
iterator begin()
Definition qset.h:136
const_iterator constBegin() const noexcept
Definition qset.h:139
const_iterator constEnd() const noexcept
Definition qset.h:143
\inmodule QtCore
\inmodule QtCore
Definition qstringview.h:76
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
static QString fromUcs4(const char32_t *, qsizetype size=-1)
Definition qstring.cpp:5915
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:5857
static QString fromWCharArray(const wchar_t *string, qsizetype size=-1)
Definition qstring.h:1164
\inmodule QtCore
\keyword 16-bit Floating Point Support\inmodule QtCore \inheaderfile QFloat16
Definition qfloat16.h:46
QHash< int, QWidget * > hash
[35multi]
QMap< QString, QString > map
[6]
QCache< int, Employee > cache
[0]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
\macro QT_NAMESPACE
QDebug printAssociativeContainer(QDebug debug, const char *which, const AssociativeContainer &c)
Definition qdebug.h:274
QDebug printSequentialContainer(QDebug debug, const char *which, const SequentialContainer &c)
Definition qdebug.h:256
char qt_getEnumMetaObject(const T &)
QTextStream & hex(QTextStream &stream)
Calls QTextStream::setIntegerBase(16) on stream and returns stream.
QTextStream & showbase(QTextStream &stream)
Calls QTextStream::setNumberFlags(QTextStream::numberFlags() | QTextStream::ShowBase) on stream and r...
static void * context
#define Q_NODISCARD_CTOR
std::pair< T1, T2 > QPair
QT_FOR_EACH_CORE_GRAPHICS_TYPE(QT_DECLARE_WEAK_QDEBUG_OPERATOR_FOR_CF_TYPE)
QT_FOR_EACH_MUTABLE_CORE_FOUNDATION_TYPE(QT_DECLARE_WEAK_QDEBUG_OPERATOR_FOR_CF_TYPE)
QT_FOR_EACH_CORE_FOUNDATION_TYPE(QT_DECLARE_WEAK_QDEBUG_OPERATOR_FOR_CF_TYPE)
QT_FOR_EACH_MUTABLE_CORE_GRAPHICS_TYPE(QT_DECLARE_WEAK_QDEBUG_OPERATOR_FOR_CF_TYPE)
#define Q_FORWARD_DECLARE_CF_TYPE(type)
#define Q_FORWARD_DECLARE_OBJC_CLASS(classname)
QDebug qt_QMetaEnum_debugOperator(QDebug &dbg, qint64 value, const QMetaObject *meta, const char *name)
Definition qdebug.cpp:1186
void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, int value)
Definition qdebug.cpp:1145
std::enable_if_t< std::conjunction_v< QTypeTraits::has_ostream_operator_container< QDebug, Container, T >... >, QDebug > QDebugIfHasDebugStreamContainer
Definition qdebug.h:294
std::enable_if_t< std::conjunction_v< QTypeTraits::has_ostream_operator< QDebug, T >... >, QDebug > QDebugIfHasDebugStream
Definition qdebug.h:290
EGLStreamKHR stream
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
QtMsgType
Definition qlogging.h:29
@ QtDebugMsg
Definition qlogging.h:30
static ControlElement< T > * ptr(QWidget *widget)
n varying highp vec2 A
GLboolean GLboolean GLboolean b
const GLfloat * m
GLuint GLuint end
GLenum GLuint GLenum GLsizei length
GLfloat GLfloat f
GLenum GLuint buffer
GLenum type
GLbitfield flags
GLint ref
GLuint name
GLhandleARB obj
[2]
const GLubyte * c
GLenum array
GLdouble GLdouble t
Definition qopenglext.h:243
GLdouble s
[6]
Definition qopenglext.h:235
GLuint num
GLsizei const GLchar *const * string
[0]
Definition qopenglext.h:694
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QBasicUtf8StringView< false > QUtf8StringView
Definition qstringfwd.h:46
constexpr void qt_ptr_swap(T *&lhs, T *&rhs) noexcept
Definition qswap.h:43
char Char
QTextStream &(* QTextStreamFunction)(QTextStream &)
unsigned long long quint64
Definition qtypes.h:56
ptrdiff_t qsizetype
Definition qtypes.h:70
unsigned int uint
Definition qtypes.h:29
long long qint64
Definition qtypes.h:55
static QString quote(const QString &str)
QList< int > list
[14]
QFuture< QSet< QChar > > set
[10]
QDataStream & operator<<(QDataStream &out, const MyClass &myObj)
[4]
QSharedPointer< T > other(t)
[5]
this swap(other)
char * toString(const MyType &t)
[31]
\inmodule QtCore