--- branches/KDE/3.5/kdenetwork/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp 2006/08/17 13:37:13 573903 +++ branches/KDE/3.5/kdenetwork/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp 2008/09/27 08:55:54 865247 @@ -104,10 +104,27 @@ const Field::FieldListIterator end = fl.end(); for ( Field::FieldListIterator it = fl.begin(); it != end; ++it ) { - Field::SingleField * propField = static_cast( *it ); - QString propName = propField->tag(); - QString propValue = propField->value().toString(); - propMap.insert( propName, propValue ); + Field::SingleField * propField = dynamic_cast( *it ); + if ( propField ) { + QString propName = propField->tag(); + QString propValue = propField->value().toString(); + propMap.insert( propName, propValue ); + } else { + Field::MultiField * mf2; + if ( ( mf2 = dynamic_cast( *it ) ) ) { + Field::FieldList fl2 = mf2->fields(); + const Field::FieldListIterator end = fl2.end(); + for ( Field::FieldListIterator it2 = fl2.begin(); it2 != end; ++it2 ) + { + propField = dynamic_cast( *it2 ); + if ( propField ) { + QString propName = propField->tag(); + QString propValue = propField->value().toString(); + propMap.insert( propName, propValue ); + } + } + } + } } } if ( !propMap.empty() )