summaryrefslogtreecommitdiffabout
path: root/libkcal/incidence.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/incidence.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/incidence.cpp13
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()
if ( mRelatedTo )
mRelatedTo->setLastModifiedSubInvalid();
}
+QString Incidence::lastModifiedSubSortKey() const
+{
+ if ( mLastModifiedSubSortKey.isEmpty() )
+ return lastModifiedSortKey();
+ return mLastModifiedSubSortKey;
+}
QDateTime Incidence::lastModifiedSub()
{
if ( !mRelations.count() )
@@ -355,6 +361,13 @@ QDateTime Incidence::lastModifiedSub()
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)