author | zautrix <zautrix> | 2005-07-28 17:20:12 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-28 17:20:12 (UTC) |
commit | 21e3b4936180fe45ba9545cb3fe28b574f86f1b5 (patch) (side-by-side diff) | |
tree | 59667b0b2738776f69206209c4653dc2e4487d3f | |
parent | 1f1a6829b042c804e5b547b181dc50c4539d5551 (diff) | |
download | kdepimpi-21e3b4936180fe45ba9545cb3fe28b574f86f1b5.zip kdepimpi-21e3b4936180fe45ba9545cb3fe28b574f86f1b5.tar.gz kdepimpi-21e3b4936180fe45ba9545cb3fe28b574f86f1b5.tar.bz2 |
rec fix
-rw-r--r-- | libkcal/incidence.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 201f593..52d94fb 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -707,97 +707,98 @@ QStringList Incidence::secrecyList() } QPtrList<Alarm> Incidence::alarms() const { return mAlarms; } Alarm* Incidence::newAlarm() { Alarm* alarm = new Alarm(this); mAlarms.append(alarm); // updated(); return alarm; } void Incidence::addAlarm(Alarm *alarm) { mAlarms.append(alarm); updated(); } void Incidence::removeAlarm(Alarm *alarm) { mAlarms.removeRef(alarm); updated(); } void Incidence::clearAlarms() { mAlarms.clear(); updated(); } bool Incidence::isAlarmEnabled() const { Alarm* alarm; for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) { if (alarm->enabled()) return true; } return false; } #include <stdlib.h> Recurrence *Incidence::recurrence() { if ( ! mRecurrence ) { mRecurrence = new Recurrence(this); - qDebug("creating new recurence "); + mRecurrence->setRecurStart( dtStart() ); + //qDebug("creating new recurence "); //abort(); } return mRecurrence; } void Incidence::setRecurrence( Recurrence * r) { if ( mRecurrence ) delete mRecurrence; mRecurrence = r; } void Incidence::setLocation(const QString &location) { if (mReadOnly) return; mLocation = location; updated(); } QString Incidence::location() const { return mLocation; } QString Incidence::recurrenceText() const { if ( mRecurrence ) return mRecurrence->recurrenceText(); return i18n("No"); } ushort Incidence::doesRecur() const { if ( mRecurrence ) return mRecurrence->doesRecur(); else return Recurrence::rNone; } QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const { QDateTime incidenceStart = dt; *ok = false; if ( doesRecur() ) { bool last; mRecurrence->getPreviousDateTime( incidenceStart , &last ); int count = 0; if ( !last ) { while ( !last ) { ++count; incidenceStart = mRecurrence->getNextDateTime( incidenceStart, &last ); if ( recursOn( incidenceStart.date() ) ) { last = true; // exit while llop |