diff --git a/tabbox/clientmodel.cpp b/tabbox/clientmodel.cpp index 3b0f1dbddc..063bc975e5 100644 --- a/tabbox/clientmodel.cpp +++ b/tabbox/clientmodel.cpp @@ -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 ); diff --git a/tabbox/desktopmodel.cpp b/tabbox/desktopmodel.cpp index 07388c33a4..f5d2f29a42 100644 --- a/tabbox/desktopmodel.cpp +++ b/tabbox/desktopmodel.cpp @@ -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; }