From 4db2399b6ef4fcff70986239ed282f575249a50f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 10 Dec 2007 19:46:58 +0000 Subject: [PATCH] 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 --- layouts/boxlayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/boxlayout.cpp b/layouts/boxlayout.cpp index 327e78dc7..d3779bef3 100644 --- a/layouts/boxlayout.cpp +++ b/layouts/boxlayout.cpp @@ -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 - 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++ ) {