rem: if( myself ) { myself->setStatus( status ); newMyself = new Attendee( myself->name(), receiver.isEmpty() ? myself->email() : receiver, myself->RSVP(), myself->status(), myself->role(), myself->uid() ); }
add: QString name; QString email; KPIM::getNameAndMail( receiver, name, email ); if ( name.isEmpty() && myself ) name = myself->name(); if ( email.isEmpty()&& myself ) email = myself->email(); Q_ASSERT( !email.isEmpty() ); newMyself = new Attendee( name, email, true, status, myself ? myself->role() : heuristicalRole( incidence ), myself ? myself->uid() : QString::null );
context:     void setStatusOnMyself( Incidence* incidence, Attendee* myself,                             Attendee::PartStat status, const QString &receiver ) const    {      Q_ASSERT( myself );      Attendee* newMyself = 0;      if( myself ) {        myself->setStatus( status );        newMyself = new Attendee( myself->name(),                                  receiver.isEmpty() ? myself->email() :                                  receiver,                                  myself->RSVP(),                                  myself->status(),                                  myself->role(),                                  myself->uid() );      }      // Make sure only ourselves is in the event      incidence->clearAttendees();      if( newMyself )        incidence->addAttendee( newMyself );    }