-rw-r--r-- | library/datebookdb.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/datebookdb.cpp b/library/datebookdb.cpp index 2f33255..000ff71 100644 --- a/library/datebookdb.cpp +++ b/library/datebookdb.cpp @@ -1011,65 +1011,65 @@ bool DateBookDB::save() qWarning( "problem renaming file %s to %s errno %d", strFileNew.latin1(), dateBookFilename().latin1(), errno ); // remove the file, otherwise it will just stick around... QFile::remove( strFileNew ); } // may as well remove the journal file... QFile::remove( dateBookJournalFile() ); d->clean = true; return true; } void DateBookDB::reload() { QValueList<Event>::Iterator it = eventList.begin(); for ( ; it != eventList.end(); ++it ) { if ( (*it).hasAlarm() ) delEventAlarm( *it ); if ( (*it).hasRepeat() ) removeRepeat( *it ); } eventList.clear(); repeatEvents.clear(); // should be a NOP init(); } bool DateBookDB::removeRepeat( const Event &ev ) { time_t removeMe = ev.repeatPattern().createTime; QValueListIterator<Event> it; for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) { if ( removeMe == (*it).repeatPattern().createTime ) { - repeatEvents.remove( *it ); + (void)repeatEvents.remove( it ); // best break, or we are going into undefined territory! return TRUE; } } return FALSE; } bool DateBookDB::origRepeat( const Event &ev, Event &orig ) const { time_t removeMe = ev.repeatPattern().createTime; QValueListConstIterator<Event> it; for ( it = repeatEvents.begin(); it != repeatEvents.end(); ++it ) { if ( removeMe == (*it).repeatPattern().createTime ) { orig = (*it); return TRUE; } } return FALSE; } void DateBookDB::saveJournalEntry( const Event &ev, journal_action action ) { saveJournalEntry( ev, action, -1, false ); } bool DateBookDB::saveJournalEntry( const Event &evOld, journal_action action, int key, bool origHadRepeat ) { bool status = false; Event ev = evOld; // write our log based on the action QFile f( dateBookJournalFile() ); |