-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 | |||
@@ -342,6 +342,12 @@ void Incidence::setLastModifiedSubInvalid() | |||
342 | if ( mRelatedTo ) | 342 | if ( mRelatedTo ) |
343 | mRelatedTo->setLastModifiedSubInvalid(); | 343 | mRelatedTo->setLastModifiedSubInvalid(); |
344 | } | 344 | } |
345 | QString Incidence::lastModifiedSubSortKey() const | ||
346 | { | ||
347 | if ( mLastModifiedSubSortKey.isEmpty() ) | ||
348 | return lastModifiedSortKey(); | ||
349 | return mLastModifiedSubSortKey; | ||
350 | } | ||
345 | QDateTime Incidence::lastModifiedSub() | 351 | QDateTime Incidence::lastModifiedSub() |
346 | { | 352 | { |
347 | if ( !mRelations.count() ) | 353 | if ( !mRelations.count() ) |
@@ -355,6 +361,13 @@ QDateTime Incidence::lastModifiedSub() | |||
355 | if ( inc->lastModifiedSub() > mLastModifiedSub ) | 361 | if ( inc->lastModifiedSub() > mLastModifiedSub ) |
356 | mLastModifiedSub = inc->lastModifiedSub(); | 362 | mLastModifiedSub = inc->lastModifiedSub(); |
357 | } | 363 | } |
364 | mLastModifiedSubSortKey.sprintf("%04d%02d%02d%02d%02d%02d", | ||
365 | mLastModifiedSub.date().year(), | ||
366 | mLastModifiedSub.date().month(), | ||
367 | mLastModifiedSub.date().day(), | ||
368 | mLastModifiedSub.time().hour(), | ||
369 | mLastModifiedSub.time().minute(), | ||
370 | mLastModifiedSub.time().second() ); | ||
358 | return mLastModifiedSub; | 371 | return mLastModifiedSub; |
359 | } | 372 | } |
360 | void Incidence::setCreated(QDateTime created) | 373 | void Incidence::setCreated(QDateTime created) |