-rw-r--r-- | libkcal/incidence.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index fe9f854..7dd9bd2 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp | |||
@@ -511,24 +511,30 @@ void Incidence::setRelatedToUid(const QString &relatedToUid) | |||
511 | if (mReadOnly) return; | 511 | if (mReadOnly) return; |
512 | mRelatedToUid = relatedToUid; | 512 | mRelatedToUid = relatedToUid; |
513 | } | 513 | } |
514 | void Incidence::clearRelations() | 514 | void Incidence::clearRelations() |
515 | { | 515 | { |
516 | mRelatedTo = 0; | 516 | mRelatedTo = 0; |
517 | mRelations.clear(); | 517 | mRelations.clear(); |
518 | } | 518 | } |
519 | QString Incidence::relatedToUid() const | 519 | QString Incidence::relatedToUid() const |
520 | { | 520 | { |
521 | return mRelatedToUid; | 521 | return mRelatedToUid; |
522 | } | 522 | } |
523 | void Incidence::resetRelatedTo() | ||
524 | { | ||
525 | QString store = mRelatedToUid; | ||
526 | setRelatedTo( 0 ); | ||
527 | mRelatedToUid = store; | ||
528 | } | ||
523 | 529 | ||
524 | void Incidence::setRelatedTo(Incidence *relatedTo) | 530 | void Incidence::setRelatedTo(Incidence *relatedTo) |
525 | { | 531 | { |
526 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); | 532 | //qDebug("Incidence::setRelatedTo %d ", relatedTo); |
527 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); | 533 | //qDebug("setRelatedTo(Incidence *relatedTo) %s %s", summary().latin1(), relatedTo->summary().latin1() ); |
528 | if (mReadOnly || mRelatedTo == relatedTo) return; | 534 | if (mReadOnly || mRelatedTo == relatedTo) return; |
529 | if(mRelatedTo) { | 535 | if(mRelatedTo) { |
530 | // updated(); | 536 | // updated(); |
531 | mRelatedTo->removeRelation(this); | 537 | mRelatedTo->removeRelation(this); |
532 | } | 538 | } |
533 | mRelatedTo = relatedTo; | 539 | mRelatedTo = relatedTo; |
534 | if (mRelatedTo) { | 540 | if (mRelatedTo) { |