diff --git a/kmcommands.cpp b/kmcommands.cpp index 3d5561548..1f8d48a0d 100644 --- a/kmcommands.cpp +++ b/kmcommands.cpp @@ -1313,17 +1313,13 @@ KMCommand::Result KMForwardCommand::execute() fwdMsg->initHeader(id); fwdMsg->setAutomaticFields(true); fwdMsg->setCharset("utf-8"); - // fwdMsg->setBody(msgText); - for ( QList::const_iterator it2 = linklist.begin(); - it2 != linklist.end(); ++it2 ) - { - KMMessage *msg = *it; + foreach( KMMessage *msg, linklist ) { TemplateParser parser( fwdMsg, TemplateParser::Forward, msg->body(), false, false, false ); parser.process( msg, 0, true ); - fwdMsg->link( (*it), MessageStatus::statusForwarded() ); + fwdMsg->link( msg, MessageStatus::statusForwarded() ); } KCursorSaver busy(KBusyPtr::busy());