summaryrefslogtreecommitdiff
path: root/libopie/pim/odatebookaccessbackend_sql.cpp
Side-by-side diff
Diffstat (limited to 'libopie/pim/odatebookaccessbackend_sql.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/odatebookaccessbackend_sql.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/libopie/pim/odatebookaccessbackend_sql.cpp b/libopie/pim/odatebookaccessbackend_sql.cpp
index e893b38..756f405 100644
--- a/libopie/pim/odatebookaccessbackend_sql.cpp
+++ b/libopie/pim/odatebookaccessbackend_sql.cpp
@@ -13,8 +13,11 @@
* Version: $Id$
* =====================================================================
* History:
* $Log$
+ * Revision 1.3 2003/12/22 11:41:39 eilers
+ * Fixing stupid bug, found by sourcode review..
+ *
* Revision 1.2 2003/12/22 10:19:26 eilers
* Finishing implementation of sql-backend for datebook. But I have to
* port the PIM datebook application to use it, before I could debug the
* whole stuff.
@@ -205,8 +208,9 @@ OEvent ODateBookAccessBackend_SQL::find( int uid ) const{
return retDate;
}
+// FIXME: Speed up update of uid's..
bool ODateBookAccessBackend_SQL::add( const OEvent& ev )
{
QMap<int,QString> eventMap = ev.toMap();
@@ -243,12 +247,16 @@ bool ODateBookAccessBackend_SQL::add( const OEvent& ev )
OSQLResult res = m_driver->query( &raw );
if ( res.state() != OSQLResult::Success ){
return false;
}
+
+ // Update list of uid's
+ update();
return true;
}
+// FIXME: Speed up update of uid's..
bool ODateBookAccessBackend_SQL::remove( int uid )
{
QString qu = "DELETE from datebook where uid = "
+ QString::number( uid ) + ";";
@@ -260,8 +268,11 @@ bool ODateBookAccessBackend_SQL::remove( int uid )
if ( res.state() != OSQLResult::Success ){
return false;
}
+ // Update list of uid's
+ update();
+
return true;
}
bool ODateBookAccessBackend_SQL::replace( const OEvent& ev )