[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdenetwork/kopete/protocols/groupwise/libgroupwise/tasks
From:       Will Stephenson <wstephenson () kde ! org>
Date:       2008-09-27 8:55:56
Message-ID: 1222505756.159714.13932.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 865247 by wstephens:

Backport r842122 from trunk - fix for \
https://bugzilla.novell.com:443/show_bug.cgi?id=354139

 M  +21 -4     getdetailstask.cpp  


--- branches/KDE/3.5/kdenetwork/kopete/protocols/groupwise/libgroupwise/tasks/getdetailstask.cpp \
#865246: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<Field::SingleField *>( *it );
-			QString propName = propField->tag();
-			QString propValue = propField->value().toString();
-			propMap.insert( propName, propValue );
+			Field::SingleField * propField = dynamic_cast<Field::SingleField *>( *it );
+			if ( propField ) {
+				QString propName = propField->tag();
+				QString propValue = propField->value().toString();
+				propMap.insert( propName, propValue );
+			} else {
+				Field::MultiField * mf2;
+				if ( ( mf2 = dynamic_cast<Field::MultiField *>( *it ) ) ) {
+					Field::FieldList fl2 = mf2->fields();
+					const Field::FieldListIterator end = fl2.end();
+					for ( Field::FieldListIterator it2 = fl2.begin(); it2 != end; ++it2 )
+					{
+						propField = dynamic_cast<Field::SingleField *>( *it2 );
+						if ( propField ) {
+							QString propName = propField->tag();
+							QString propValue = propField->value().toString();
+							propMap.insert( propName, propValue );
+						}
+					}
+				}
+			}
 		}
 	}
 	if ( !propMap.empty() )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic