-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 @@ -66,17 +66,17 @@ bool nextOccurance(const Event &e, const QDate &from, QDateTime &next) // easy checks, first are we too far in the future or too far in the past? QDate tmpDate; 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(); return TRUE; } @@ -456,17 +456,17 @@ QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDate &from, QValueList<EffectiveEvent> tmpList; QValueListIterator<Event> it; 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 ) { Event tmpEv = *it; effEv.setEvent(tmpEv); @@ -501,17 +501,17 @@ QValueList<EffectiveEvent> DateBookDB::getEffectiveEvents( const QDate &from, } dt = dt.addDays( 1 ); } } } // 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() ); QDate itDate = from.addDays(-duration); @@ -618,17 +618,17 @@ void DateBookDB::editEvent( const Event &old, Event &editedEv ) } else oldIndex = eventList.findIndex( old ); 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 removeRepeat( old ); } else { @@ -667,17 +667,17 @@ void DateBookDB::removeJFEvent( const Event&ev ) if ( it != eventList.end() ) eventList.remove( it ); } } // also handles journaling... void DateBookDB::loadFile( const QString &strFile ) { - + QFile f( strFile ); if ( !f.open( IO_ReadOnly ) ) return; enum Attribute { FDescription = 0, FLocation, FCategories, @@ -718,17 +718,17 @@ void DateBookDB::loadFile( const QString &strFile ) dict.insert( "start", new int(FRStart) ); dict.insert( "end", new int(FREnd) ); 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) int i = 0; |