-rw-r--r-- | libkcal/incidence.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 39c14f5..fe9f854 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -341,8 +341,14 @@ void Incidence::setLastModifiedSubInvalid() mLastModifiedSub = QDateTime(); if ( mRelatedTo ) mRelatedTo->setLastModifiedSubInvalid(); } +QString Incidence::lastModifiedSubSortKey() const +{ + if ( mLastModifiedSubSortKey.isEmpty() ) + return lastModifiedSortKey(); + return mLastModifiedSubSortKey; +} QDateTime Incidence::lastModifiedSub() { if ( !mRelations.count() ) return lastModified(); @@ -354,8 +360,15 @@ QDateTime Incidence::lastModifiedSub() for (inc=Relations.first();inc;inc=Relations.next()) { if ( inc->lastModifiedSub() > mLastModifiedSub ) mLastModifiedSub = inc->lastModifiedSub(); } + mLastModifiedSubSortKey.sprintf("%04d%02d%02d%02d%02d%02d", + mLastModifiedSub.date().year(), + mLastModifiedSub.date().month(), + mLastModifiedSub.date().day(), + mLastModifiedSub.time().hour(), + mLastModifiedSub.time().minute(), + mLastModifiedSub.time().second() ); return mLastModifiedSub; } void Incidence::setCreated(QDateTime created) { |