~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to akonadi/calendar/itiphandler.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-09-30 14:20:53 UTC
  • mfrom: (1.1.101)
  • Revision ID: package-import@ubuntu.com-20130930142053-k66oi27s75lt8l51
Tags: 4:4.11.2-0ubuntu1
New upstream bugfix release

Show diffs side-by-side

added added

removed removed

Lines of Context:
241
241
  delete publishdlg;
242
242
}
243
243
 
244
 
void ITIPHandler::sendAsICalendar( const KCalCore::Incidence::Ptr &incidence,
 
244
void ITIPHandler::sendAsICalendar( const KCalCore::Incidence::Ptr &originalIncidence,
245
245
                                   QWidget *parentWidget )
246
246
{
247
247
  Q_UNUSED( parentWidget );
248
 
  Q_ASSERT( incidence );
249
 
  if ( !incidence ) {
 
248
  Q_ASSERT( originalIncidence );
 
249
  if ( !originalIncidence ) {
250
250
    kError() << "Invalid incidence";
251
251
    return;
252
252
  }
253
253
 
 
254
  // Clone so we can change organizer and recurid
 
255
  KCalCore::Incidence::Ptr incidence = KCalCore::Incidence::Ptr( originalIncidence->clone() );
 
256
 
254
257
  KPIMIdentities::IdentityManager identityManager;
255
258
 
256
259
  QPointer<Akonadi::PublishDialog> publishdlg = new Akonadi::PublishDialog;
262
265
                                                       Akonadi::CalendarUtils::email() ) ) );
263
266
    }
264
267
 
 
268
    if ( incidence->hasRecurrenceId() ) {
 
269
      // For an individual occurrence, recur id doesn't make sense, since we're not sending the whole recurrence series.
 
270
      incidence->setRecurrenceId(KDateTime());
 
271
    }
 
272
 
265
273
    KCalCore::ICalFormat format;
266
274
    const QString from = Akonadi::CalendarUtils::email();
267
275
    const bool bccMe = Akonadi::CalendarSettings::self()->bcc();