author | umopapisdn <umopapisdn> | 2003-04-12 00:22:57 (UTC) |
---|---|---|
committer | umopapisdn <umopapisdn> | 2003-04-12 00:22:57 (UTC) |
commit | 59e2de381eebb33238ee1b257736a9ae0afdbb7e (patch) (unidiff) | |
tree | b86025f2f75318aba65534048105cec36d4b7766 | |
parent | d37f3eac6b876285eb7a03ab01194ea261458ea5 (diff) | |
download | opie-59e2de381eebb33238ee1b257736a9ae0afdbb7e.zip opie-59e2de381eebb33238ee1b257736a9ae0afdbb7e.tar.gz opie-59e2de381eebb33238ee1b257736a9ae0afdbb7e.tar.bz2 |
Bugfix: (bug #0000833) Duplicating an event should also duplicate the category.
-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 ) | |||
409 | if (syncing) { | 409 | if (syncing) { |
410 | QMessageBox::warning( this, tr("Calendar"), | 410 | QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); |
411 | tr( "Can not edit data, currently syncing") ); | ||
412 | return; | 411 | return; |
@@ -414,13 +413,3 @@ void DateBook::duplicateEvent( const Event &e ) | |||
414 | 413 | ||
415 | Event dupevent; | 414 | Event dupevent(e);// Make a duplicate. |
416 | dupevent.setStart(e.start()); | ||
417 | dupevent.setEnd(e.end()); | ||
418 | dupevent.setDescription(e.description()); | ||
419 | dupevent.setLocation(e.location()); | ||
420 | // dupevent.setCategory(e.category());// how is this done?? | ||
421 | dupevent.setNotes(e.notes()); | ||
422 | dupevent.setAllDay(e.isAllDay()); | ||
423 | dupevent.setTimeZone(e.timeZone()); | ||
424 | if(e.hasAlarm()) dupevent.setAlarm(e.alarmDelay(),e.alarmSound()); | ||
425 | if(e.hasRepeat()) dupevent.setRepeat(e.repeatPattern()); | ||
426 | 415 | ||
@@ -445,10 +434,5 @@ void DateBook::duplicateEvent( const Event &e ) | |||
445 | Event newEv = entry->event(); | 434 | Event newEv = entry->event(); |
446 | if(newEv.description().isEmpty() && newEv.notes().isEmpty() ) | ||
447 | break; | ||
448 | newEv.setUid(e.uid()); // FIXME: Hack not to clear uid | ||
449 | QString error = checkEvent(newEv); | 435 | QString error = checkEvent(newEv); |
450 | if (!error.isNull()) { | 436 | if (!error.isNull()) { |
451 | if (QMessageBox::warning(this, "error box", | 437 | if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) |
452 | error, "Fix it", "Continue", | ||
453 | 0, 0, 1) == 0) | ||
454 | continue; | 438 | continue; |
@@ -464,4 +448,3 @@ void DateBook::editEvent( const Event &e ) | |||
464 | if (syncing) { | 448 | if (syncing) { |
465 | QMessageBox::warning( this, tr("Calendar"), | 449 | QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); |
466 | tr( "Can not edit data, currently syncing") ); | ||
467 | return; | 450 | return; |
@@ -493,6 +476,3 @@ void DateBook::editEvent( const Event &e ) | |||
493 | if (!error.isNull()) { | 476 | if (!error.isNull()) { |
494 | if (QMessageBox::warning(this, "error box", | 477 | if (QMessageBox::warning(this, "error box", error, "Fix it", "Continue", 0, 0, 1) == 0) continue; |
495 | error, "Fix it", "Continue", | ||
496 | 0, 0, 1) == 0) | ||
497 | continue; | ||
498 | } | 478 | } |
@@ -507,4 +487,3 @@ void DateBook::removeEvent( const Event &e ) | |||
507 | if (syncing) { | 487 | if (syncing) { |
508 | QMessageBox::warning( this, tr("Calendar"), | 488 | QMessageBox::warning( this, tr("Calendar"), tr( "Can not edit data, currently syncing") ); |
509 | tr( "Can not edit data, currently syncing") ); | ||
510 | return; | 489 | return; |