summaryrefslogtreecommitdiff
authoreilers <eilers>2004-05-04 18:49:04 (UTC)
committer eilers <eilers>2004-05-04 18:49:04 (UTC)
commitf1a3fc696787ae946464469b3f252aa425dbe51b (patch) (side-by-side diff)
treef06602aae8935b3a0d186c921cbdde61c045bcf1
parent04a7f91591987c01d312fbcaf6554ec6d728554d (diff)
downloadopie-f1a3fc696787ae946464469b3f252aa425dbe51b.zip
opie-f1a3fc696787ae946464469b3f252aa425dbe51b.tar.gz
opie-f1a3fc696787ae946464469b3f252aa425dbe51b.tar.bz2
Minor modification in debug output
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
index 495a8dd..6c32b40 100644
--- a/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
+++ b/libopie2/opiepim/backend/odatebookaccessbackend_sql.cpp
@@ -217,44 +217,46 @@ void ODateBookAccessBackend_SQL::clear()
OSQLResult res = m_driver->query( &raw );
reload();
}
OPimEvent ODateBookAccessBackend_SQL::find( int uid ) const{
qDebug( "ODateBookAccessBackend_SQL::find( %d )", uid );
QString qu = "select *";
qu += "from datebook where uid = " + QString::number(uid);
+ qDebug( "Query: %s", qu.latin1() );
+
OSQLRawQuery raw( qu );
OSQLResult res = m_driver->query( &raw );
OSQLResultItem resItem = res.first();
// Create Map for date event and insert UID
QMap<int,QString> dateEventMap;
dateEventMap.insert( OPimEvent::FUid, QString::number( uid ) );
// Now insert the data out of the columns into the map.
QMapConstIterator<int, QString> it;
for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){
dateEventMap.insert( m_reverseFieldMap[*it], resItem.data( *it ) );
}
// Last step: Put map into date event, add custom map and return it
OPimEvent retDate( dateEventMap );
retDate.setExtraMap( requestCustom( uid ) );
- qDebug( "ODateBookAccessBackend_SQL::find() end", uid );
+ qDebug( "ODateBookAccessBackend_SQL::find( %d ) end", uid );
return retDate;
}
// FIXME: Speed up update of uid's..
bool ODateBookAccessBackend_SQL::add( const OPimEvent& ev )
{
QMap<int,QString> eventMap = ev.toMap();
QString qu = "insert into datebook VALUES( " + QString::number( ev.uid() );
QMap<int, QString>::Iterator it;
for ( it = ++m_fieldMap.begin(); it != m_fieldMap.end(); ++it ){
if ( !eventMap[it.key()].isEmpty() )