rem: QStringList toAddresses = KMMessage::splitEmailAddrList( msgOld->to() );
add: QStringList toAddresses = KPIM::splitEmailAddrList( msgOld->to() );
context: static void iCalRequest( const QString& receiver, const QString& iCal,                         const QString& choice ){#if 0  // FIXME: Reinstate Outlook workaround  // If we are in legacy mode, and there is more than one receiver, we  // need to ask the user which address to use  KMMessage* msgOld = mMainWidget->headers()->currentMsg();  KConfigGroup options( KMKernel::config(), "Groupware" );  QString fromAddress; // this variable is only used in legacy mode  if( options.readBoolEntry( "LegacyMangleFromToHeaders", false ) ) {      QStringList toAddresses = KMMessage::splitEmailAddrList( msgOld->to() );      if( toAddresses.count() <= 1 )          // only one address: no problem, we can spare the user the dialog          // and just take the from address          fromAddress = msgOld->to();      else {          // We have more than one To: address and are in legacy mode. Next          // try is to search the identities for one of the email addresses          // in the toAddresses list.          for( QStringList::Iterator sit = toAddresses.begin();               sit != toAddresses.end(); ++sit ) {              if( KMMessage::getEmailAddr( *sit ) ==                  kmkernel->identityManager()->defaultIdentity().emailAddr().local8Bit() ) {                  // our default identity was contained in the To: list,                  // copy that from To: to From:                  fromAddress = *sit;                  break; // We are done              }          }          // If we still haven't found anything, we have to ask the user          // what to do.          if( fromAddress.isEmpty() ) {              bool bOk;              fromAddress = KInputDialog::getItem( i18n( "Select Address" ),                                                   i18n( "In order to let Outlook recognize you as the receiver, you need to indicate which one of the following addresses is your email address:" ),                                                   toAddresses, 0, false, &bOk,                                                   kmkernel->mainWin() );              if( !bOk )                  // If the user didn't select anything, just take the                  // first one so that we have something at all.                  fromAddress = toAddresses.first();          }      }  }#endif  if ( !connectToKOrganizer() )    kdError() << "DCOP error during KMGroupware::processVCalRequest()\n";  else {    bool rc = mKOrganizerIfaceStub->eventRequest( choice, receiver, iCal );    kdDebug(5006) << "KOrganizer call succeeded, rc = " << rc << endl;#if 0    // TODO(bo): We need to delete the msg somehow    if( rc && mMainWidget ) mMainWidget->slotTrashMsg();#endif  }}