summaryrefslogtreecommitdiff
path: root/libopie2/opiepim
authorzecke <zecke>2004-07-17 17:33:39 (UTC)
committer zecke <zecke>2004-07-17 17:33:39 (UTC)
commitb822cb8e0f2b1adc970eee9e40935adaf530e41b (patch) (side-by-side diff)
treef42fe5d6144df85b35a7e1c8d008f28ca2532b1f /libopie2/opiepim
parent0637a8d3c60bf4da6efb6c26edecfe613919c623 (diff)
downloadopie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.zip
opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.tar.gz
opie-b822cb8e0f2b1adc970eee9e40935adaf530e41b.tar.bz2
Allow the deletions of all events
This is the fix posted to the MailingList
Diffstat (limited to 'libopie2/opiepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
index 2ff36e3..107c178 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_xml.cpp
@@ -287,49 +287,49 @@ QArray<int> ODateBookAccessBackend_XML::queryByExample(const OPimEvent&, int, c
return QArray<int>();
}
void ODateBookAccessBackend_XML::clear() {
m_changed = true;
m_raw.clear();
m_rep.clear();
}
OPimEvent ODateBookAccessBackend_XML::find( int uid ) const{
if ( m_raw.contains( uid ) )
return m_raw[uid];
else
return m_rep[uid];
}
bool ODateBookAccessBackend_XML::add( const OPimEvent& ev ) {
m_changed = true;
if (ev.hasRecurrence() )
m_rep.insert( ev.uid(), ev );
else
m_raw.insert( ev.uid(), ev );
return true;
}
bool ODateBookAccessBackend_XML::remove( int uid ) {
m_changed = true;
- m_rep.remove( uid );
+ m_raw.remove( uid );
m_rep.remove( uid );
return true;
}
bool ODateBookAccessBackend_XML::replace( const OPimEvent& ev ) {
replace( ev.uid() ); // ??? Shouldn't this be "remove( ev.uid() ) ??? (eilers)
return add( ev );
}
QArray<int> ODateBookAccessBackend_XML::rawEvents()const {
return allRecords();
}
QArray<int> ODateBookAccessBackend_XML::rawRepeats()const {
QArray<int> ints( m_rep.count() );
uint i = 0;
QMap<int, OPimEvent>::ConstIterator it;
for ( it = m_rep.begin(); it != m_rep.end(); ++it ) {
ints[i] = it.key();
i++;
}
return ints;
}
QArray<int> ODateBookAccessBackend_XML::nonRepeats()const {