author | zautrix <zautrix> | 2005-08-19 12:08:05 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-19 12:08:05 (UTC) |
commit | 9014049779be6cfec02d73e19596439f0f4f9bed (patch) (side-by-side diff) | |
tree | 3983282e83183cc15dd615ba4ac5a800da21efe0 /libkcal/incidence.cpp | |
parent | 81891a49afc2f7cd89db4e2770c3b7831644428d (diff) | |
download | kdepimpi-9014049779be6cfec02d73e19596439f0f4f9bed.zip kdepimpi-9014049779be6cfec02d73e19596439f0f4f9bed.tar.gz kdepimpi-9014049779be6cfec02d73e19596439f0f4f9bed.tar.bz2 |
list sort fix
-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 @@ -333,37 +333,50 @@ void Incidence::cloneRelations( Incidence * newInc ) void Incidence::setReadOnly( bool readOnly ) { IncidenceBase::setReadOnly( readOnly ); if ( mRecurrence ) mRecurrence->setRecurReadOnly( readOnly); } 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(); if ( mLastModifiedSub.isValid() ) return mLastModifiedSub; mLastModifiedSub = lastModified(); Incidence * inc; QPtrList<Incidence> Relations = relations(); 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) { if (mReadOnly) return; mCreated = getEvenTime(created); } QDateTime Incidence::created() const { return mCreated; } |