Changeset View
Changeset View
Standalone View
Standalone View
src/incidencedialog.cpp
Show First 20 Lines • Show All 638 Lines • ▼ Show 20 Line(s) | 629 | { | |||
---|---|---|---|---|---|
639 | // Otherwise it gets lost. | 639 | // Otherwise it gets lost. | ||
640 | // FIXME: Why don't we clone() incidenceInEditor then pass the clone to save(), | 640 | // FIXME: Why don't we clone() incidenceInEditor then pass the clone to save(), | ||
641 | // I wonder if we're not leaking other properties. | 641 | // I wonder if we're not leaking other properties. | ||
642 | newIncidence->setRelatedTo(incidenceInEditor->relatedTo()); | 642 | newIncidence->setRelatedTo(incidenceInEditor->relatedTo()); | ||
643 | 643 | | |||
644 | mEditor->save(newIncidence); | 644 | mEditor->save(newIncidence); | ||
645 | mEditor->save(result); | 645 | mEditor->save(result); | ||
646 | 646 | | |||
647 | // TODO: Remove this once we support moving of events/todo's | | |||
648 | mCalSelector->setEnabled(false); | | |||
649 | | ||||
650 | // Make sure that we don't loose uid for existing incidence | 647 | // Make sure that we don't loose uid for existing incidence | ||
651 | newIncidence->setUid(mEditor->incidence<KCalCore::Incidence>()->uid()); | 648 | newIncidence->setUid(mEditor->incidence<KCalCore::Incidence>()->uid()); | ||
652 | 649 | | |||
653 | // Mark the incidence as changed | 650 | // Mark the incidence as changed | ||
654 | if (mItem.isValid()) { | 651 | if (mItem.isValid()) { | ||
655 | newIncidence->setRevision(newIncidence->revision() + 1); | 652 | newIncidence->setRevision(newIncidence->revision() + 1); | ||
656 | } | 653 | } | ||
657 | 654 | | |||
▲ Show 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | |||||
755 | } | 752 | } | ||
756 | 753 | | |||
757 | void IncidenceDialog::load(const Akonadi::Item &item, const QDate &activeDate) | 754 | void IncidenceDialog::load(const Akonadi::Item &item, const QDate &activeDate) | ||
758 | { | 755 | { | ||
759 | Q_D(IncidenceDialog); | 756 | Q_D(IncidenceDialog); | ||
760 | d->mIeDateTime->setActiveDate(activeDate); | 757 | d->mIeDateTime->setActiveDate(activeDate); | ||
761 | if (item.isValid()) { // We're editing | 758 | if (item.isValid()) { // We're editing | ||
762 | d->mItemManager->load(item); | 759 | d->mItemManager->load(item); | ||
763 | // TODO: Remove this once we support moving of events/todo's | | |||
764 | d->mCalSelector->setEnabled(false); | | |||
765 | } else { // We're creating | 760 | } else { // We're creating | ||
766 | Q_ASSERT(d->hasSupportedPayload(item)); | 761 | Q_ASSERT(d->hasSupportedPayload(item)); | ||
767 | d->load(item); | 762 | d->load(item); | ||
768 | show(); | 763 | show(); | ||
769 | } | 764 | } | ||
770 | } | 765 | } | ||
771 | 766 | | |||
772 | void IncidenceDialog::selectCollection(const Akonadi::Collection &collection) | 767 | void IncidenceDialog::selectCollection(const Akonadi::Collection &collection) | ||
▲ Show 20 Lines • Show All 101 Lines • Show Last 20 Lines |