44 #include <QtCore/qalgorithms.h>
45 #include <QtCore/qhash.h>
46 #include <QtCore/qlist.h>
47 #include <QtCore/qmap.h>
48 #include <QtCore/qtextstream.h>
49 #include <QtCore/qstring.h>
50 #include <QtCore/qset.h>
51 #include <QtCore/qvarlengtharray.h>
52 #include <QtCore/qcontiguouscache.h>
53 #include <QtCore/qsharedpointer.h>
70 enum { VerbosityShift = 29, VerbosityMask = 0x7 };
88 bool noQuotes =
false;
89 bool message_output =
false;
90 int verbosity = DefaultVerbosity;
94 enum Latin1Content { ContainsBinary = 0, ContainsLatin1 };
96 void putUcs4(
uint ucs4);
98 void putByteArray(
const char *
begin,
size_t length, Latin1Content content);
118 enum VerbosityLevel { MinimumVerbosity = 0, DefaultVerbosity = 2, MaximumVerbosity = 7 };
144 #if QT_STRINGVIEW_LEVEL < 2
160 {
stream->ts <<
m;
return *
this; }
162 template <
typename T>
167 stream.nospace() << std::forward<T>(
object);
210 template <
typename SequentialContainer>
214 debug.nospace() << which <<
'(';
228 template <
typename AssociativeContainer>
232 debug.nospace() << which <<
"(";
234 it !=
c.constEnd(); ++
it) {
235 debug <<
'(' <<
it.key() <<
", " <<
it.value() <<
')';
243 template<
typename ...T>
245 std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator<QDebug, T>...>,
QDebug>;
247 template<
typename Container,
typename ...T>
249 std::enable_if_t<std::conjunction_v<QTypeTraits::has_ostream_operator_container<QDebug, Container, T>...>,
QDebug>;
259 template<
typename T, qsizetype P>
265 template <
typename T,
typename Alloc>
271 template <
typename T,
typename Alloc>
277 template <
typename Key,
typename T,
typename Compare,
typename Alloc>
283 template <
typename Key,
typename T,
typename Compare,
typename Alloc>
289 template <
class Key,
class T>
295 template <
class Key,
class T>
301 template <
class Key,
class T>
307 template <
class Key,
class T>
313 template <
class T1,
class T2>
317 debug.nospace() <<
"std::pair(" << pair.first <<
',' << pair.second <<
')';
321 template <
typename T>
331 debug.nospace() <<
"QContiguousCache(";
332 for (
int i =
cache.firstIndex();
i <=
cache.lastIndex(); ++
i) {
334 if (
i !=
cache.lastIndex())
345 template <
class T, qsizetype P>
348 template <
typename T,
typename Alloc>
351 template <
typename T,
typename Alloc>
354 template <
typename Key,
typename T,
typename Compare,
typename Alloc>
357 template <
typename Key,
typename T,
typename Compare,
typename Alloc>
360 template <
class Key,
class T>
363 template <
class Key,
class T>
366 template <
class Key,
class T>
369 template <
class Key,
class T>
372 template <
typename T>
375 template <
class T1,
class T2>
378 template <
class T1,
class T2>
381 template <
typename T>
390 debug.nospace() <<
"QSharedPointer(" << ptr.
data() <<
")";
396 template <
typename T,
typename Tag>
400 debug.nospace() <<
"QTaggedPointer(" << ptr.pointer() <<
", " << ptr.
tag() <<
")";
406 template <
typename Int>
412 bool needSeparator =
false;
413 for (
uint i = 0;
i < sizeofT * 8; ++
i) {
418 needSeparator =
true;
425 #if !defined(QT_NO_QOBJECT) && !defined(Q_QDOC)
434 const char *
name = qt_getEnumName(
value);
440 typename B =
typename std::enable_if<
sizeof(
T) <=
sizeof(
int),
void>
::type,
442 typename D =
typename std::enable_if<QtPrivate::IsQEnumHelper<QFlags<T>>
::Value,
void>
::type>
447 const char *
name = qt_getEnumName(FlagsT());
452 inline typename std::enable_if<
458 const char *
name = qt_getEnumName(
T());
463 inline typename std::enable_if<
481 return qt_QMetaEnum_flagDebugOperator_helper(
debug,
flags);
487 debug.nospace() <<
"QKeyCombination("
501 #define QT_FOR_EACH_CORE_FOUNDATION_TYPE(F) \
512 #define QT_FOR_EACH_MUTABLE_CORE_FOUNDATION_TYPE(F) \
516 #define QT_FOR_EACH_CORE_GRAPHICS_TYPE(F) \
519 #define QT_FOR_EACH_MUTABLE_CORE_GRAPHICS_TYPE(F) \
525 #define QT_FORWARD_DECLARE_CF_TYPE(type) Q_FORWARD_DECLARE_CF_TYPE(type);
526 #define QT_FORWARD_DECLARE_MUTABLE_CF_TYPE(type) Q_FORWARD_DECLARE_MUTABLE_CF_TYPE(type);
527 #define QT_FORWARD_DECLARE_CG_TYPE(type) Q_FORWARD_DECLARE_CG_TYPE(type);
528 #define QT_FORWARD_DECLARE_MUTABLE_CG_TYPE(type) Q_FORWARD_DECLARE_MUTABLE_CG_TYPE(type);
539 #define QT_FORWARD_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE(CFType) \
540 Q_CORE_EXPORT QDebug operator<<(QDebug, CFType##Ref);
542 #define Q_DECLARE_QDEBUG_OPERATOR_FOR_CF_TYPE(CFType) \
543 QDebug operator<<(QDebug debug, CFType##Ref ref) \
546 return debug << QT_STRINGIFY(CFType) "Ref(0x0)"; \
547 if (CFStringRef description = CFCopyDescription(ref)) { \
548 QDebugStateSaver saver(debug); \
549 debug.noquote() << description; \
550 CFRelease(description); \
564 #undef QT_FORWARD_DECLARE_CF_TYPE
565 #undef QT_FORWARD_DECLARE_MUTABLE_CF_TYPE
566 #undef QT_FORWARD_DECLARE_CG_TYPE
567 #undef QT_FORWARD_DECLARE_MUTABLE_CG_TYPE
small capitals from c petite p scientific i
[1]
The QByteArray class provides an array of bytes.
The QChar class provides a 16-bit Unicode character.
The QContiguousCache class is a template class that provides a contiguous cache.\reentrant.
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
QDebug & operator<<(const QString &t)
QDebug & operator<<(QTextStreamManipulator m)
QDebug & operator<<(quint64 t)
QDebug & operator<<(char32_t t)
QDebug & verbosity(int verbosityLevel)
void setAutoInsertSpaces(bool b)
QDebug & operator<<(signed int t)
QDebug & operator<<(const QByteArray &t)
QDebug & operator<<(unsigned long t)
static QString toString(T &&object)
QDebug & operator<<(const void *t)
QDebug & operator<<(QLatin1String t)
QDebug(QIODevice *device)
void setVerbosity(int verbosityLevel)
QDebug & operator<<(qint64 t)
QDebug(QDebug &&other) noexcept
QDebug & operator<<(const char *t)
QDebug & operator<<(signed long t)
QDebug & operator<<(float t)
QDebug & operator<<(QStringView s)
QDebug & operator<<(signed short t)
QDebug & operator<<(QUtf8StringView s)
bool autoInsertSpaces() const
QDebug & operator<<(char16_t t)
void swap(QDebug &other) noexcept
QDebug & operator<<(double t)
QDebug & operator<<(bool t)
QDebug & operator<<(char t)
QDebug & operator<<(QChar t)
QDebug & maybeQuote(char c='"')
QDebug & operator<<(const char16_t *t)
QDebug & operator<<(unsigned int t)
QDebug & operator=(const QDebug &other)
QDebug & operator<<(unsigned short t)
QDebug & operator<<(std::nullptr_t)
QDebug & operator<<(QByteArrayView t)
QDebug & operator<<(QTextStreamFunction f)
Convenience class for custom QDebug operators.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
std::conditional< std::is_unsigned< typename std::underlying_type< Enum >::type >::value, unsigned int, signed int >::type Int
The QHash class is a template class that provides a hash-table-based dictionary.
Base class for QIODevice that provides flags describing the mode in which a device is opened.
The QIODevice class is the base interface class of all I/O devices in Qt.
constexpr Qt::Key key() const noexcept
constexpr Qt::KeyboardModifiers keyboardModifiers() const noexcept
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal.
The QMessageLogContext class provides additional information about a log message.
The QMessageLogger class generates log messages.
The QMultiHash class is a convenience QHash subclass that provides multi-valued hashes.
QNoDebug & verbosity(int)
QNoDebug & operator<<(const T &)
QNoDebug & maybeQuote(const char='"')
QNoDebug & operator<<(QTextStreamManipulator)
QNoDebug & operator<<(QTextStreamFunction)
The QSharedPointer class holds a strong reference to a shared pointer.
T * data() const noexcept
The QString class provides a Unicode character string.
static QString fromUtf8(QByteArrayView utf8)
The QStringView class provides a unified view on UTF-16 strings with a read-only subset of the QStrin...
The QTextStream class provides a convenient interface for reading and writing text.
QHash< int, QWidget * > hash
[35multi]
QMap< QString, QString > map
[6]
QCache< int, Employee > cache
[0]
typename C::const_iterator const_iterator
QTextStream & hex(QTextStream &stream)
QTextStream & showbase(QTextStream &stream)
QDebug printAssociativeContainer(QDebug debug, const char *which, const AssociativeContainer &c)
QDebug printSequentialContainer(QDebug debug, const char *which, const SequentialContainer &c)
char qt_getEnumMetaObject(const T &)
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)
Q_FORWARD_DECLARE_OBJC_CLASS(NSObject)
Q_FORWARD_DECLARE_CF_TYPE(CTFontDescriptor)
std::enable_if_t< std::conjunction_v< QTypeTraits::has_ostream_operator_container< QDebug, Container, T >... >, QDebug > QDebugIfHasDebugStreamContainer
std::enable_if_t< std::conjunction_v< QTypeTraits::has_ostream_operator< QDebug, T >... >, QDebug > QDebugIfHasDebugStream
Q_CORE_EXPORT QDebug qt_QMetaEnum_debugOperator(QDebug &, qint64 value, const QMetaObject *meta, const char *name)
Q_CORE_EXPORT void qt_QMetaEnum_flagDebugOperator(QDebug &debug, size_t sizeofT, int value)
EGLOutputLayerEXT EGLint EGLAttrib value
unsigned long long quint64
#define Q_DISABLE_COPY(Class)
#define QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(Class)
GLenum GLuint GLenum GLsizei length
GLboolean GLboolean GLboolean b
GLsizei const GLchar *const * string
[0]
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QTextStream &(* QTextStreamFunction)(QTextStream &)
#define Q_DECLARE_SHARED(TYPE)
QFuture< QSet< QChar > > set
[10]