Fix debug stream operators.

- Use QDebugStateSaver to restore space setting in stream operators
  instead of returning dbg.space() which breaks formatting on streams
  that already have nospace() set.
- Fix some single character string constants, streamline code.

Change-Id: I18ae7324b172ea801aa9b5fe56ddf6fe527fdde9
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
Friedemann Kleint
2015-04-01 17:09:45 +02:00
parent 9fccf8064d
commit 4d17db19f8
9 changed files with 150 additions and 124 deletions

View File

@@ -62,8 +62,9 @@ struct PtrWrapper
template <typename T> template <typename T>
inline QDebug& operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper) inline QDebug& operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper)
{ {
debug.nospace() << "[" << (void*)wrapper.m_ptr << "]"; QDebugStateSaver saver(debug);
return debug.space(); debug.nospace() << '[' << static_cast<const void *>(wrapper.m_ptr) << ']';
return debug;
} }
template<typename T> template<typename T>

View File

@@ -62,8 +62,9 @@ struct PtrWrapper
template <typename T> template <typename T>
inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper) inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper)
{ {
debug.nospace() << "[" << (void*)wrapper.m_ptr << "]"; QDebugStateSaver saver(debug);
return debug.space(); debug.nospace() << '[' << static_cast<const void *>(wrapper.m_ptr) << ']';
return debug;
} }
#ifdef ENABLE_TRACE #ifdef ENABLE_TRACE

View File

@@ -86,59 +86,62 @@ Q_CONSTRUCTOR_FUNCTION(qRegisterAudioMetaTypes)
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QAudio::Error error) QDebug operator<<(QDebug dbg, QAudio::Error error)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (error) { switch (error) {
case QAudio::NoError: case QAudio::NoError:
nospace << "NoError"; dbg << "NoError";
break; break;
case QAudio::OpenError: case QAudio::OpenError:
nospace << "OpenError"; dbg << "OpenError";
break; break;
case QAudio::IOError: case QAudio::IOError:
nospace << "IOError"; dbg << "IOError";
break; break;
case QAudio::UnderrunError: case QAudio::UnderrunError:
nospace << "UnderrunError"; dbg << "UnderrunError";
break; break;
case QAudio::FatalError: case QAudio::FatalError:
nospace << "FatalError"; dbg << "FatalError";
break; break;
} }
return nospace; return dbg;
} }
QDebug operator<<(QDebug dbg, QAudio::State state) QDebug operator<<(QDebug dbg, QAudio::State state)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (state) { switch (state) {
case QAudio::ActiveState: case QAudio::ActiveState:
nospace << "ActiveState"; dbg << "ActiveState";
break; break;
case QAudio::SuspendedState: case QAudio::SuspendedState:
nospace << "SuspendedState"; dbg << "SuspendedState";
break; break;
case QAudio::StoppedState: case QAudio::StoppedState:
nospace << "StoppedState"; dbg << "StoppedState";
break; break;
case QAudio::IdleState: case QAudio::IdleState:
nospace << "IdleState"; dbg << "IdleState";
break; break;
} }
return nospace; return dbg;
} }
QDebug operator<<(QDebug dbg, QAudio::Mode mode) QDebug operator<<(QDebug dbg, QAudio::Mode mode)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (mode) { switch (mode) {
case QAudio::AudioInput: case QAudio::AudioInput:
nospace << "AudioInput"; dbg << "AudioInput";
break; break;
case QAudio::AudioOutput: case QAudio::AudioOutput:
nospace << "AudioOutput"; dbg << "AudioOutput";
break; break;
} }
return nospace; return dbg;
} }
#endif #endif

View File

@@ -459,49 +459,50 @@ int QAudioFormat::bytesPerFrame() const
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QAudioFormat::Endian endian) QDebug operator<<(QDebug dbg, QAudioFormat::Endian endian)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (endian) { switch (endian) {
case QAudioFormat::BigEndian: case QAudioFormat::BigEndian:
nospace << "BigEndian"; dbg << "BigEndian";
break; break;
case QAudioFormat::LittleEndian: case QAudioFormat::LittleEndian:
nospace << "LittleEndian"; dbg << "LittleEndian";
break; break;
} }
return nospace; return dbg;
} }
QDebug operator<<(QDebug dbg, QAudioFormat::SampleType type) QDebug operator<<(QDebug dbg, QAudioFormat::SampleType type)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (type) { switch (type) {
case QAudioFormat::SignedInt: case QAudioFormat::SignedInt:
nospace << "SignedInt"; dbg << "SignedInt";
break; break;
case QAudioFormat::UnSignedInt: case QAudioFormat::UnSignedInt:
nospace << "UnSignedInt"; dbg << "UnSignedInt";
break; break;
case QAudioFormat::Float: case QAudioFormat::Float:
nospace << "Float"; dbg << "Float";
break; break;
default: default:
nospace << "Unknown"; dbg << "Unknown";
break; break;
} }
return nospace; return dbg;
} }
QDebug operator<<(QDebug dbg, const QAudioFormat &f) QDebug operator<<(QDebug dbg, const QAudioFormat &f)
{ {
dbg.nospace() << "QAudioFormat(" << f.sampleRate(); QDebugStateSaver saver(dbg);
dbg.nospace() << "Hz, " << f.sampleSize(); dbg.nospace();
dbg.nospace() << "bit, channelCount=" << f.channelCount(); dbg << "QAudioFormat(" << f.sampleRate() << "Hz, "
dbg.nospace() << ", sampleType=" << f.sampleType(); << f.sampleSize() << "bit, channelCount=" << f.channelCount()
dbg.nospace() << ", byteOrder=" << f.byteOrder(); << ", sampleType=" << f.sampleType() << ", byteOrder=" << f.byteOrder()
dbg.nospace() << ", codec=" << f.codec(); << ", codec=" << f.codec() << ')';
dbg.nospace() << ")";
return dbg.space(); return dbg;
} }
#endif #endif

View File

@@ -705,11 +705,13 @@ QMediaTimeRange operator-(const QMediaTimeRange &r1, const QMediaTimeRange &r2)
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QMediaTimeRange &range) QDebug operator<<(QDebug dbg, const QMediaTimeRange &range)
{ {
dbg.nospace() << "QMediaTimeRange( "; QDebugStateSaver saver(dbg);
foreach (const QMediaTimeInterval &interval, range.intervals()) { dbg.nospace();
dbg.nospace() << "(" << interval.start() << ", " << interval.end() << ") "; dbg << "QMediaTimeRange( ";
} foreach (const QMediaTimeInterval &interval, range.intervals())
dbg.space() << ")"; dbg << '(' << interval.start() << ", " << interval.end() << ") ";
dbg.space();
dbg << ')';
return dbg; return dbg;
} }
#endif #endif

View File

@@ -350,33 +350,37 @@ uchar *QAbstractPlanarVideoBuffer::map(MapMode mode, int *numBytes, int *bytesPe
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QAbstractVideoBuffer::HandleType type) QDebug operator<<(QDebug dbg, QAbstractVideoBuffer::HandleType type)
{ {
QDebugStateSaver saver(dbg);
dbg.nospace();
switch (type) { switch (type) {
case QAbstractVideoBuffer::NoHandle: case QAbstractVideoBuffer::NoHandle:
return dbg.nospace() << "NoHandle"; return dbg << "NoHandle";
case QAbstractVideoBuffer::GLTextureHandle: case QAbstractVideoBuffer::GLTextureHandle:
return dbg.nospace() << "GLTextureHandle"; return dbg << "GLTextureHandle";
case QAbstractVideoBuffer::XvShmImageHandle: case QAbstractVideoBuffer::XvShmImageHandle:
return dbg.nospace() << "XvShmImageHandle"; return dbg << "XvShmImageHandle";
case QAbstractVideoBuffer::CoreImageHandle: case QAbstractVideoBuffer::CoreImageHandle:
return dbg.nospace() << "CoreImageHandle"; return dbg << "CoreImageHandle";
case QAbstractVideoBuffer::QPixmapHandle: case QAbstractVideoBuffer::QPixmapHandle:
return dbg.nospace() << "QPixmapHandle"; return dbg << "QPixmapHandle";
default: default:
return dbg.nospace() << QString(QLatin1String("UserHandle(%1)")).arg(int(type)).toLatin1().constData(); return dbg << "UserHandle(" << int(type) << ')';
} }
} }
QDebug operator<<(QDebug dbg, QAbstractVideoBuffer::MapMode mode) QDebug operator<<(QDebug dbg, QAbstractVideoBuffer::MapMode mode)
{ {
QDebugStateSaver saver(dbg);
dbg.nospace();
switch (mode) { switch (mode) {
case QAbstractVideoBuffer::ReadOnly: case QAbstractVideoBuffer::ReadOnly:
return dbg.nospace() << "ReadOnly"; return dbg << "ReadOnly";
case QAbstractVideoBuffer::ReadWrite: case QAbstractVideoBuffer::ReadWrite:
return dbg.nospace() << "ReadWrite"; return dbg << "ReadWrite";
case QAbstractVideoBuffer::WriteOnly: case QAbstractVideoBuffer::WriteOnly:
return dbg.nospace() << "WriteOnly"; return dbg << "WriteOnly";
default: default:
return dbg.nospace() << "NotMapped"; return dbg << "NotMapped";
} }
} }
#endif #endif

View File

@@ -353,18 +353,26 @@ void QAbstractVideoSurface::setNativeResolution(const QSize &resolution)
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, const QAbstractVideoSurface::Error& error) QDebug operator<<(QDebug dbg, const QAbstractVideoSurface::Error& error)
{ {
QDebugStateSaver saver(dbg);
dbg.nospace();
switch (error) { switch (error) {
case QAbstractVideoSurface::UnsupportedFormatError: case QAbstractVideoSurface::UnsupportedFormatError:
return dbg.nospace() << "UnsupportedFormatError"; dbg << "UnsupportedFormatError";
break;
case QAbstractVideoSurface::IncorrectFormatError: case QAbstractVideoSurface::IncorrectFormatError:
return dbg.nospace() << "IncorrectFormatError"; dbg << "IncorrectFormatError";
break;
case QAbstractVideoSurface::StoppedError: case QAbstractVideoSurface::StoppedError:
return dbg.nospace() << "StoppedError"; dbg << "StoppedError";
break;
case QAbstractVideoSurface::ResourceError: case QAbstractVideoSurface::ResourceError:
return dbg.nospace() << "ResourceError"; dbg << "ResourceError";
break;
default: default:
return dbg.nospace() << "NoError"; dbg << "NoError";
break;
} }
return dbg;
} }
#endif #endif

View File

@@ -1002,90 +1002,94 @@ QImage::Format QVideoFrame::imageFormatFromPixelFormat(PixelFormat format)
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QVideoFrame::PixelFormat pf) QDebug operator<<(QDebug dbg, QVideoFrame::PixelFormat pf)
{ {
QDebugStateSaver saver(dbg);
dbg.nospace();
switch (pf) { switch (pf) {
case QVideoFrame::Format_Invalid: case QVideoFrame::Format_Invalid:
return dbg.nospace() << "Format_Invalid"; return dbg << "Format_Invalid";
case QVideoFrame::Format_ARGB32: case QVideoFrame::Format_ARGB32:
return dbg.nospace() << "Format_ARGB32"; return dbg << "Format_ARGB32";
case QVideoFrame::Format_ARGB32_Premultiplied: case QVideoFrame::Format_ARGB32_Premultiplied:
return dbg.nospace() << "Format_ARGB32_Premultiplied"; return dbg << "Format_ARGB32_Premultiplied";
case QVideoFrame::Format_RGB32: case QVideoFrame::Format_RGB32:
return dbg.nospace() << "Format_RGB32"; return dbg << "Format_RGB32";
case QVideoFrame::Format_RGB24: case QVideoFrame::Format_RGB24:
return dbg.nospace() << "Format_RGB24"; return dbg << "Format_RGB24";
case QVideoFrame::Format_RGB565: case QVideoFrame::Format_RGB565:
return dbg.nospace() << "Format_RGB565"; return dbg << "Format_RGB565";
case QVideoFrame::Format_RGB555: case QVideoFrame::Format_RGB555:
return dbg.nospace() << "Format_RGB555"; return dbg << "Format_RGB555";
case QVideoFrame::Format_ARGB8565_Premultiplied: case QVideoFrame::Format_ARGB8565_Premultiplied:
return dbg.nospace() << "Format_ARGB8565_Premultiplied"; return dbg << "Format_ARGB8565_Premultiplied";
case QVideoFrame::Format_BGRA32: case QVideoFrame::Format_BGRA32:
return dbg.nospace() << "Format_BGRA32"; return dbg << "Format_BGRA32";
case QVideoFrame::Format_BGRA32_Premultiplied: case QVideoFrame::Format_BGRA32_Premultiplied:
return dbg.nospace() << "Format_BGRA32_Premultiplied"; return dbg << "Format_BGRA32_Premultiplied";
case QVideoFrame::Format_BGR32: case QVideoFrame::Format_BGR32:
return dbg.nospace() << "Format_BGR32"; return dbg << "Format_BGR32";
case QVideoFrame::Format_BGR24: case QVideoFrame::Format_BGR24:
return dbg.nospace() << "Format_BGR24"; return dbg << "Format_BGR24";
case QVideoFrame::Format_BGR565: case QVideoFrame::Format_BGR565:
return dbg.nospace() << "Format_BGR565"; return dbg << "Format_BGR565";
case QVideoFrame::Format_BGR555: case QVideoFrame::Format_BGR555:
return dbg.nospace() << "Format_BGR555"; return dbg << "Format_BGR555";
case QVideoFrame::Format_BGRA5658_Premultiplied: case QVideoFrame::Format_BGRA5658_Premultiplied:
return dbg.nospace() << "Format_BGRA5658_Premultiplied"; return dbg << "Format_BGRA5658_Premultiplied";
case QVideoFrame::Format_AYUV444: case QVideoFrame::Format_AYUV444:
return dbg.nospace() << "Format_AYUV444"; return dbg << "Format_AYUV444";
case QVideoFrame::Format_AYUV444_Premultiplied: case QVideoFrame::Format_AYUV444_Premultiplied:
return dbg.nospace() << "Format_AYUV444_Premultiplied"; return dbg << "Format_AYUV444_Premultiplied";
case QVideoFrame::Format_YUV444: case QVideoFrame::Format_YUV444:
return dbg.nospace() << "Format_YUV444"; return dbg << "Format_YUV444";
case QVideoFrame::Format_YUV420P: case QVideoFrame::Format_YUV420P:
return dbg.nospace() << "Format_YUV420P"; return dbg << "Format_YUV420P";
case QVideoFrame::Format_YV12: case QVideoFrame::Format_YV12:
return dbg.nospace() << "Format_YV12"; return dbg << "Format_YV12";
case QVideoFrame::Format_UYVY: case QVideoFrame::Format_UYVY:
return dbg.nospace() << "Format_UYVY"; return dbg << "Format_UYVY";
case QVideoFrame::Format_YUYV: case QVideoFrame::Format_YUYV:
return dbg.nospace() << "Format_YUYV"; return dbg << "Format_YUYV";
case QVideoFrame::Format_NV12: case QVideoFrame::Format_NV12:
return dbg.nospace() << "Format_NV12"; return dbg << "Format_NV12";
case QVideoFrame::Format_NV21: case QVideoFrame::Format_NV21:
return dbg.nospace() << "Format_NV21"; return dbg << "Format_NV21";
case QVideoFrame::Format_IMC1: case QVideoFrame::Format_IMC1:
return dbg.nospace() << "Format_IMC1"; return dbg << "Format_IMC1";
case QVideoFrame::Format_IMC2: case QVideoFrame::Format_IMC2:
return dbg.nospace() << "Format_IMC2"; return dbg << "Format_IMC2";
case QVideoFrame::Format_IMC3: case QVideoFrame::Format_IMC3:
return dbg.nospace() << "Format_IMC3"; return dbg << "Format_IMC3";
case QVideoFrame::Format_IMC4: case QVideoFrame::Format_IMC4:
return dbg.nospace() << "Format_IMC4"; return dbg << "Format_IMC4";
case QVideoFrame::Format_Y8: case QVideoFrame::Format_Y8:
return dbg.nospace() << "Format_Y8"; return dbg << "Format_Y8";
case QVideoFrame::Format_Y16: case QVideoFrame::Format_Y16:
return dbg.nospace() << "Format_Y16"; return dbg << "Format_Y16";
case QVideoFrame::Format_Jpeg: case QVideoFrame::Format_Jpeg:
return dbg.nospace() << "Format_Jpeg"; return dbg << "Format_Jpeg";
case QVideoFrame::Format_AdobeDng: case QVideoFrame::Format_AdobeDng:
return dbg.nospace() << "Format_AdobeDng"; return dbg << "Format_AdobeDng";
case QVideoFrame::Format_CameraRaw: case QVideoFrame::Format_CameraRaw:
return dbg.nospace() << "Format_CameraRaw"; return dbg << "Format_CameraRaw";
default: default:
return dbg.nospace() << QString(QLatin1String("UserType(%1)" )).arg(int(pf)).toLatin1().constData(); return dbg << QString(QLatin1String("UserType(%1)" )).arg(int(pf)).toLatin1().constData();
} }
} }
QDebug operator<<(QDebug dbg, QVideoFrame::FieldType f) QDebug operator<<(QDebug dbg, QVideoFrame::FieldType f)
{ {
QDebugStateSaver saver(dbg);
dbg.nospace();
switch (f) { switch (f) {
case QVideoFrame::TopField: case QVideoFrame::TopField:
return dbg.nospace() << "TopField"; return dbg << "TopField";
case QVideoFrame::BottomField: case QVideoFrame::BottomField:
return dbg.nospace() << "BottomField"; return dbg << "BottomField";
case QVideoFrame::InterlacedFrame: case QVideoFrame::InterlacedFrame:
return dbg.nospace() << "InterlacedFrame"; return dbg << "InterlacedFrame";
default: default:
return dbg.nospace() << "ProgressiveFrame"; return dbg << "ProgressiveFrame";
} }
} }
@@ -1161,16 +1165,17 @@ static QString qFormatTimeStamps(qint64 start, qint64 end)
QDebug operator<<(QDebug dbg, const QVideoFrame& f) QDebug operator<<(QDebug dbg, const QVideoFrame& f)
{ {
dbg.nospace() << "QVideoFrame(" << f.size() << ", " QDebugStateSaver saver(dbg);
dbg.nospace();
dbg << "QVideoFrame(" << f.size() << ", "
<< f.pixelFormat() << ", " << f.pixelFormat() << ", "
<< f.handleType() << ", " << f.handleType() << ", "
<< f.mapMode() << ", " << f.mapMode() << ", "
<< qFormatTimeStamps(f.startTime(), f.endTime()).toLatin1().constData(); << qFormatTimeStamps(f.startTime(), f.endTime()).toLatin1().constData();
if (f.availableMetaData().count()) { if (f.availableMetaData().count())
dbg.nospace() << ", metaData: "; dbg << ", metaData: " << f.availableMetaData();
dbg.nospace() << f.availableMetaData(); dbg << ')';
} return dbg;
return dbg.nospace() << ")";
} }
#endif #endif

View File

@@ -569,61 +569,62 @@ void QVideoSurfaceFormat::setProperty(const char *name, const QVariant &value)
#ifndef QT_NO_DEBUG_STREAM #ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::YCbCrColorSpace cs) QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::YCbCrColorSpace cs)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (cs) { switch (cs) {
case QVideoSurfaceFormat::YCbCr_BT601: case QVideoSurfaceFormat::YCbCr_BT601:
nospace << "YCbCr_BT601"; dbg << "YCbCr_BT601";
break; break;
case QVideoSurfaceFormat::YCbCr_BT709: case QVideoSurfaceFormat::YCbCr_BT709:
nospace << "YCbCr_BT709"; dbg << "YCbCr_BT709";
break; break;
case QVideoSurfaceFormat::YCbCr_JPEG: case QVideoSurfaceFormat::YCbCr_JPEG:
nospace << "YCbCr_JPEG"; dbg << "YCbCr_JPEG";
break; break;
case QVideoSurfaceFormat::YCbCr_xvYCC601: case QVideoSurfaceFormat::YCbCr_xvYCC601:
nospace << "YCbCr_xvYCC601"; dbg << "YCbCr_xvYCC601";
break; break;
case QVideoSurfaceFormat::YCbCr_xvYCC709: case QVideoSurfaceFormat::YCbCr_xvYCC709:
nospace << "YCbCr_xvYCC709"; dbg << "YCbCr_xvYCC709";
break; break;
case QVideoSurfaceFormat::YCbCr_CustomMatrix: case QVideoSurfaceFormat::YCbCr_CustomMatrix:
nospace << "YCbCr_CustomMatrix"; dbg << "YCbCr_CustomMatrix";
break; break;
default: default:
nospace << "YCbCr_Undefined"; dbg << "YCbCr_Undefined";
break; break;
} }
return nospace; return dbg;
} }
QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::Direction dir) QDebug operator<<(QDebug dbg, QVideoSurfaceFormat::Direction dir)
{ {
QDebug nospace = dbg.nospace(); QDebugStateSaver saver(dbg);
dbg.nospace();
switch (dir) { switch (dir) {
case QVideoSurfaceFormat::BottomToTop: case QVideoSurfaceFormat::BottomToTop:
nospace << "BottomToTop"; dbg << "BottomToTop";
break; break;
case QVideoSurfaceFormat::TopToBottom: case QVideoSurfaceFormat::TopToBottom:
nospace << "TopToBottom"; dbg << "TopToBottom";
break; break;
} }
return nospace; return dbg;
} }
QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f) QDebug operator<<(QDebug dbg, const QVideoSurfaceFormat &f)
{ {
dbg.nospace() << "QVideoSurfaceFormat(" << f.pixelFormat(); QDebugStateSaver saver(dbg);
dbg.nospace() << ", " << f.frameSize(); dbg.nospace();
dbg.nospace() << ", viewport=" << f.viewport(); dbg << "QVideoSurfaceFormat(" << f.pixelFormat() << ", " << f.frameSize()
dbg.nospace() << ", pixelAspectRatio=" << f.pixelAspectRatio(); << ", viewport=" << f.viewport() << ", pixelAspectRatio=" << f.pixelAspectRatio()
dbg.nospace() << ", handleType=" << f.handleType(); << ", handleType=" << f.handleType() << ", yCbCrColorSpace=" << f.yCbCrColorSpace()
dbg.nospace() << ", yCbCrColorSpace=" << f.yCbCrColorSpace(); << ')';
dbg.nospace() << ")";
foreach(const QByteArray& propertyName, f.propertyNames()) foreach(const QByteArray& propertyName, f.propertyNames())
dbg << "\n " << propertyName.data() << " = " << f.property(propertyName.data()); dbg << "\n " << propertyName.data() << " = " << f.property(propertyName.data());
return dbg.space(); return dbg;
} }
#endif #endif