Fix a compile fail on OpenSolaris.
Thanks to tropikhajma for reporting the bug and providing a patch. BUG: 211686 svn path=/trunk/KDE/kdebase/workspace/; revision=1039986
This commit is contained in:
parent
65e9a53e9d
commit
9834f6faf7
2 changed files with 4 additions and 4 deletions
|
@ -95,7 +95,7 @@ int ClientModel::columnCount( const QModelIndex& parent ) const
|
|||
count = 1;
|
||||
break;
|
||||
case TabBoxConfig::HorizontalVerticalLayout:
|
||||
count = qRound( sqrt( m_clientList.count() ) );
|
||||
count = qRound( sqrt(float( m_clientList.count() )) );
|
||||
if( count * count < m_clientList.count() )
|
||||
count++;
|
||||
break;
|
||||
|
@ -116,7 +116,7 @@ int ClientModel::rowCount( const QModelIndex& parent ) const
|
|||
count = m_clientList.count();
|
||||
break;
|
||||
case TabBoxConfig::HorizontalVerticalLayout:
|
||||
count = qRound( sqrt( m_clientList.count() ) );
|
||||
count = qRound( sqrt( float( m_clientList.count() )) );
|
||||
break;
|
||||
}
|
||||
return qMax( count, 1 );
|
||||
|
|
|
@ -75,7 +75,7 @@ int DesktopModel::columnCount( const QModelIndex& parent ) const
|
|||
count = 1;
|
||||
break;
|
||||
case TabBoxConfig::HorizontalVerticalLayout:
|
||||
count = qRound( sqrt( m_desktopList.count() ) );
|
||||
count = qRound( sqrt( float(m_desktopList.count() )) );
|
||||
if( count * count < m_desktopList.count() )
|
||||
count++;
|
||||
// TODO: pager layout?
|
||||
|
@ -97,7 +97,7 @@ int DesktopModel::rowCount( const QModelIndex& parent ) const
|
|||
count = m_desktopList.count();
|
||||
break;
|
||||
case TabBoxConfig::HorizontalVerticalLayout:
|
||||
count = qRound( sqrt( m_desktopList.count() ) );
|
||||
count = qRound( sqrt( float(m_desktopList.count()) ) );
|
||||
// TODO: pager layout?
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue