From 5be4ab495ca232d64305b2634e3bca074f542539 Mon Sep 17 00:00:00 2001 From: eilers Date: Mon, 22 Dec 2003 11:41:39 +0000 Subject: Fixing stupid bug, found by sourcode review.. --- 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 @@ -14,6 +14,9 @@ * ===================================================================== * 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 @@ -206,6 +209,7 @@ OEvent ODateBookAccessBackend_SQL::find( int uid ) const{ return retDate; } +// FIXME: Speed up update of uid's.. bool ODateBookAccessBackend_SQL::add( const OEvent& ev ) { QMap eventMap = ev.toMap(); @@ -244,10 +248,14 @@ bool ODateBookAccessBackend_SQL::add( const OEvent& ev ) 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 = " @@ -261,6 +269,9 @@ bool ODateBookAccessBackend_SQL::remove( int uid ) return false; } + // Update list of uid's + update(); + return true; } diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp index e893b38..756f405 100644 --- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp +++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp @@ -14,6 +14,9 @@ * ===================================================================== * 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 @@ -206,6 +209,7 @@ OEvent ODateBookAccessBackend_SQL::find( int uid ) const{ return retDate; } +// FIXME: Speed up update of uid's.. bool ODateBookAccessBackend_SQL::add( const OEvent& ev ) { QMap eventMap = ev.toMap(); @@ -244,10 +248,14 @@ bool ODateBookAccessBackend_SQL::add( const OEvent& ev ) 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 = " @@ -261,6 +269,9 @@ bool ODateBookAccessBackend_SQL::remove( int uid ) return false; } + // Update list of uid's + update(); + return true; } -- cgit v0.9.0.2