debug operator added

This commit is contained in:
Uwe Rathmann 2019-06-19 13:26:29 +02:00
parent 6e10527a93
commit 8b6e00cc68
2 changed files with 37 additions and 12 deletions

View File

@ -75,3 +75,20 @@ void QskLayoutHint::normalize()
m_maximum = qMax( m_minimum, m_maximum );
m_preferred = qBound( m_minimum, m_preferred, m_maximum );
}
#ifndef QT_NO_DEBUG_STREAM
#include <qdebug.h>
QDebug operator<<( QDebug debug, const QskLayoutHint& hint )
{
QDebugStateSaver saver( debug );
debug.nospace();
debug << "LayoutHint" << "( " << hint.minimum() << ", "
<< hint.preferred() << ", " << hint.maximum() << " )";
return debug;
}
#endif

View File

@ -4,6 +4,8 @@
#include "QskGlobal.h"
#include <qglobal.h>
class QDebug;
class QSK_EXPORT QskLayoutHint
{
public:
@ -76,6 +78,12 @@ inline bool QskLayoutHint::operator!=( const QskLayoutHint& other ) const
return !( *this == other );
}
#ifndef QT_NO_DEBUG_STREAM
QSK_EXPORT QDebug operator<<( QDebug, const QskLayoutHint& );
#endif
Q_DECLARE_TYPEINFO( QskLayoutHint, Q_MOVABLE_TYPE );
#endif