-rw-r--r-- | core/pim/datebook/datebook.cpp | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index 3e18374..1bc82a5 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -409,4 +409,3 @@ void DateBook::duplicateEvent( const Event &e ) if (syncing) { - QMessageBox::warning( this, tr("Calendar"), - tr( "Can not edit data, currently syncing") ); + QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); return; @@ -414,13 +413,3 @@ void DateBook::duplicateEvent( const Event &e ) - Event dupevent; - dupevent.setStart(e.start()); - dupevent.setEnd(e.end()); - dupevent.setDescription(e.description()); - dupevent.setLocation(e.location()); -// dupevent.setCategory(e.category()); // how is this done?? - dupevent.setNotes(e.notes()); - dupevent.setAllDay(e.isAllDay()); - dupevent.setTimeZone(e.timeZone()); - if(e.hasAlarm()) dupevent.setAlarm(e.alarmDelay(),e.alarmSound()); - if(e.hasRepeat()) dupevent.setRepeat(e.repeatPattern()); + Event dupevent(e); // Make a duplicate. @@ -445,10 +434,5 @@ void DateBook::duplicateEvent( const Event &e ) Event newEv = entry->event(); - if(newEv.description().isEmpty() && newEv.notes().isEmpty() ) - break; - newEv.setUid(e.uid()); // FIXME: Hack not to clear uid QString error = checkEvent(newEv); if (!error.isNull()) { - if (QMessageBox::warning(this, "error box", - error, "Fix it", "Continue", - 0, 0, 1) == 0) + if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) continue; @@ -464,4 +448,3 @@ void DateBook::editEvent( const Event &e ) if (syncing) { - QMessageBox::warning( this, tr("Calendar"), - tr( "Can not edit data, currently syncing") ); + QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); return; @@ -493,6 +476,3 @@ void DateBook::editEvent( const Event &e ) if (!error.isNull()) { - if (QMessageBox::warning(this, "error box", - error, "Fix it", "Continue", - 0, 0, 1) == 0) - continue; + if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) continue; } @@ -507,4 +487,3 @@ void DateBook::removeEvent( const Event &e ) if (syncing) { - QMessageBox::warning( this, tr("Calendar"), - tr( "Can not edit data, currently syncing") ); + QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); return; |