Tighten the type of the template parameter for calculateSize() so that sum() can actually be used.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=746990
This commit is contained in:
Adriaan de Groot 2007-12-10 19:46:58 +00:00
parent 02023370f2
commit 4db2399b6e

View File

@ -183,7 +183,7 @@ public:
// 'op' - A function to apply to the size of each item in the layout
// , usually qMax,qMin or sum
template <class T>
qreal calculateSize(SizeType sizeType , Qt::Orientation dir , T (*op)(T,T)) const
qreal calculateSize(SizeType sizeType , Qt::Orientation dir , T (*op)(const T,const T)) const
{
qreal value = 0;
for ( int i = 0 ; i < children.count() ; i++ ) {