18#include <QtCore/private/qglobal_p.h>
19#include "QtCore/qdebug.h"
20#include "QtCore/qmetaobject.h"
21#include "QtCore/qflags.h"
22#include "QtCore/qbytearray.h"
35 debug << point.x() <<
',' << point.y();
39static inline void formatQSize(QDebug &debug,
const Size &size)
41 debug << size.width() <<
", " << size.height();
45static inline void formatQRect(QDebug &debug,
const Rect &rect)
47 debug << rect.x() <<
',' << rect.y() <<
' ' << rect.width() <<
'x' << rect.height();
50template <
class Margins>
53 debug << margins.left() <<
", " << margins.top() <<
", " << margins.right()
54 <<
", " << margins.bottom();
61 const QMetaObject *metaObject = qt_getEnumMetaObject(value);
62 const QMetaEnum me = metaObject->enumerator(metaObject->indexOfEnumerator(qt_getEnumName(value)));
63 if (
const char *key = me.valueToKey(
int(value)))
74 formatQEnum(debug, value);
79static inline void formatQFlags(QDebug &debug,
const QFlags<Enum> &value)
81 const QMetaEnum me = QMetaEnum::fromType<QFlags<Enum>>();
82 const QDebugStateSaver saver(debug);
84 debug << me.valueToKeys(value.toInt());
92 formatQFlags(debug, value);
static void formatNonNullQEnum(QDebug &debug, const char *prefix, QEnum value)
static void formatQEnum(QDebug &debug, QEnum value)
static void formatQRect(QDebug &debug, const Rect &rect)
static void formatQMargins(QDebug &debug, const Margins &margins)
static void formatQFlags(QDebug &debug, const QFlags< Enum > &value)
static void formatQSize(QDebug &debug, const Size &size)
static void formatQPoint(QDebug &debug, const Point &point)
static void formatNonNullQFlags(QDebug &debug, const char *prefix, const QFlags< Enum > &value)