debug operator improved
This commit is contained in:
parent
148a258160
commit
d600fe9d7b
@ -80,13 +80,23 @@ void QskLayoutHint::normalize()
|
|||||||
|
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
|
|
||||||
|
static inline QString qskHintValueString( qreal value )
|
||||||
|
{
|
||||||
|
if ( value >= QskLayoutConstraint::unlimited )
|
||||||
|
return QStringLiteral( "unlimited" );
|
||||||
|
else
|
||||||
|
return QString::number( value );
|
||||||
|
}
|
||||||
|
|
||||||
QDebug operator<<( QDebug debug, const QskLayoutHint& hint )
|
QDebug operator<<( QDebug debug, const QskLayoutHint& hint )
|
||||||
{
|
{
|
||||||
QDebugStateSaver saver( debug );
|
QDebugStateSaver saver( debug );
|
||||||
debug.nospace();
|
debug.nospace();
|
||||||
|
|
||||||
debug << "LayoutHint" << "( " << hint.minimum() << ", "
|
debug << "LayoutHint" << "( "
|
||||||
<< hint.preferred() << ", " << hint.maximum() << " )";
|
<< qskHintValueString( hint.minimum() ) << ", "
|
||||||
|
<< qskHintValueString( hint.preferred() ) << ", "
|
||||||
|
<< qskHintValueString( hint.maximum() ) << " )";
|
||||||
|
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user