-rw-r--r-- | library/datebookdb.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/library/datebookdb.cpp b/library/datebookdb.cpp index 0fedfa8..2f33255 100644 --- a/library/datebookdb.cpp +++ b/library/datebookdb.cpp @@ -68,13 +68,13 @@ bool nextOccurance(const Event &e, const QDate &from, QDateTime &next) int freq = e.repeatPattern().frequency; int diff, diff2, a; int iday, imonth, iyear; int dayOfWeek = 0; int firstOfWeek = 0; int weekOfMonth; - + if (e.repeatPattern().hasEndDate && e.repeatPattern().endDate() < from) return FALSE; if (e.start() >= from) { next = e.start(); @@ -458,13 +458,13 @@ QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDate &from, EffectiveEvent effEv; QDateTime dtTmp, dtEnd; for (it = eventList.begin(); it != eventList.end(); ++it ) { - if (!(*it).isValidUid()) + if (!(*it).isValidUid()) (*it).assignUid(); // FIXME: Hack to restore cleared uids dtTmp = (*it).start(TRUE); dtEnd = (*it).end(TRUE); if ( dtTmp.date() >= from && dtTmp.date() <= to ) { @@ -503,13 +503,13 @@ QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDate &from, } } } // check for repeating events... QDateTime repeat; for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) { - if (!(*it).isValidUid()) + if (!(*it).isValidUid()) (*it).assignUid(); // FIXME: Hack to restore cleared uids /* create a false end date, to short circuit on hard MonthlyDay recurences */ Event dummy_event = *it; int duration = (*it).start().date().daysTo( (*it).end().date() ); @@ -620,13 +620,13 @@ void DateBookDB::editEvent( const Event &old, Event &editedEv ) saveJournalEntry( editedEv, ACTION_REPLACE, oldIndex, oldHadRepeat ); // Delete old event if ( old.hasAlarm() ) delEventAlarm( old ); if ( oldHadRepeat ) { - if ( editedEv.hasRepeat() ) { // This mean that origRepeat was run above and + if ( editedEv.hasRepeat() ) { // This mean that origRepeat was run above and // orig is initialized // assumption, when someone edits a repeating event, they // want to change them all, maybe not perfect, but it works // for the moment... repeatEvents.remove( orig ); } else @@ -669,13 +669,13 @@ void DateBookDB::removeJFEvent( const Event&ev ) } } // also handles journaling... void DateBookDB::loadFile( const QString &strFile ) { - + QFile f( strFile ); if ( !f.open( IO_ReadOnly ) ) return; enum Attribute { FDescription = 0, @@ -720,13 +720,13 @@ void DateBookDB::loadFile( const QString &strFile ) dict.insert( "note", new int(FNote) ); dict.insert( "created", new int(FCreated) ); dict.insert( "action", new int(FAction) ); dict.insert( "actionkey", new int(FActionKey) ); dict.insert( "actionorig", new int (FJournalOrigHadRepeat) ); - + QByteArray ba = f.readAll(); char* dt = ba.data(); int len = ba.size(); int currentAction, journalKey, origHadRepeat; // should be bool, but we need tri-state(not being used) |