code more readable

This commit is contained in:
Uwe Rathmann 2019-09-20 07:44:39 +02:00
parent ceaae8aa60
commit 1707eefbec
1 changed files with 10 additions and 8 deletions

View File

@ -80,15 +80,17 @@ bool QskLayoutHint::isDefault() const
qreal QskLayoutHint::combined( int which, qreal value1, qreal value2 ) qreal QskLayoutHint::combined( int which, qreal value1, qreal value2 )
{ {
if ( which == Qt::MaximumSize )
{
if ( value1 < 0.0 ) if ( value1 < 0.0 )
return value2; return value2;
if ( value2 < 0.0 ) if ( value2 < 0.0 )
return value1; return value1;
if ( which == Qt::MaximumSize )
return qMin( value1, value2 ); return qMin( value1, value2 );
else }
return qMax( value1, value2 ); return qMax( value1, value2 );
} }