From 9834f6faf773643ae68b8764de3a8f26fa3425ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 25 Oct 2009 09:15:49 +0000 Subject: [PATCH] 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 --- tabbox/clientmodel.cpp | 4 ++-- tabbox/desktopmodel.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; }