summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
index ffa6a7d..b6ea461 100644
--- a/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
+++ b/libopie2/opiepim/backend/ocontactaccessbackend_vcard.cpp
@@ -35,6 +35,8 @@
/* OPIE */
#include <opie2/ocontactaccessbackend_vcard.h>
+#include <opie2/odebug.h>
+
#include <qpe/timeconversion.h>
//FIXME: Hack to allow direct access to FILE* fh. Rewrite this!
@@ -64,7 +66,7 @@ bool OPimContactAccessBackend_VCard::load ()
if ( !obj )
return false;
}else{
- qWarning("File \"%s\" not found !", m_file.latin1() );
+ owarn << "File \"" << m_file << "\" not found !" << oendl;
return false;
}
@@ -77,7 +79,7 @@ bool OPimContactAccessBackend_VCard::load ()
*/
if ( con.uid() == 0 ){
con.setUid( 1 );
- qWarning("assigned new uid %d",con.uid() );
+ owarn << "assigned new uid " << con.uid() << "" << oendl;
}
m_map.insert( con.uid(), con );
@@ -316,7 +318,7 @@ OPimContact OPimContactAccessBackend_VCard::parseVObject( VObject *obj )
if ( ( type & (VOICE|CELL|FAX|PAGER) ) == 0 ) // default
type |= VOICE;
- qWarning("value %s %d", value.data(), type );
+ owarn << "value " << value.data() << " " << type << "" << oendl;
if ( (type & (VOICE|HOME) ) == (VOICE|HOME) && (type & (CELL|HOME) ) != (CELL|HOME) )
c.setHomePhone( value );
if ( ( type & (FAX|HOME) ) == (FAX|HOME) )
@@ -510,7 +512,7 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c )
// Exporting Birthday regarding RFC 2425 (5.8.4)
if ( c.birthday().isValid() ){
- qWarning("Exporting birthday as: %s", convDateToVCardDate( c.birthday() ).latin1() );
+ owarn << "Exporting birthday as: " << convDateToVCardDate( c.birthday() ) << "" << oendl;
safeAddPropValue( vcard, VCBirthDateProp, convDateToVCardDate( c.birthday() ) );
}
@@ -529,7 +531,7 @@ VObject* OPimContactAccessBackend_VCard::createVObject( const OPimContact &c )
safeAddPropValue( vcard, "X-Qtopia-Spouse", c.spouse() );
safeAddPropValue( vcard, "X-Qtopia-Gender", c.gender() );
if ( c.anniversary().isValid() ){
- qWarning("Exporting anniversary as: %s", convDateToVCardDate( c.anniversary() ).latin1() );
+ owarn << "Exporting anniversary as: " << convDateToVCardDate( c.anniversary() ) << "" << oendl;
safeAddPropValue( vcard, "X-Qtopia-Anniversary", convDateToVCardDate( c.anniversary() ) );
}
safeAddPropValue( vcard, "X-Qtopia-Nickname", c.nickname() );
@@ -558,13 +560,13 @@ QDate OPimContactAccessBackend_VCard::convVCardDateToDate( const QString& datest
int dayPos = datestr.find('-', monthPos+1 );
int sep_ignore = 1;
if ( monthPos == -1 || dayPos == -1 ) {
- qDebug("fromString didn't find - in str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, dayPos );
+ odebug << "fromString didn't find - in str = " << datestr << "; mpos = " << monthPos << " ypos = " << dayPos << "" << oendl;
// Ok.. No "-" found, therefore we will try to read other format ( YYYYMMDD )
if ( datestr.length() == 8 ){
monthPos = 4;
dayPos = 6;
sep_ignore = 0;
- qDebug("Try with follwing positions str = %s; mpos = %d ypos = %d", datestr.latin1(), monthPos, dayPos );
+ odebug << "Try with follwing positions str = " << datestr << "; mpos = " << monthPos << " ypos = " << dayPos << "" << oendl;
} else {
return QDate();
}
@@ -572,7 +574,7 @@ QDate OPimContactAccessBackend_VCard::convVCardDateToDate( const QString& datest
int y = datestr.left( monthPos ).toInt();
int m = datestr.mid( monthPos + sep_ignore, dayPos - monthPos - sep_ignore ).toInt();
int d = datestr.mid( dayPos + sep_ignore ).toInt();
- qDebug("TimeConversion::fromString ymd = %s => %d %d %d; mpos = %d ypos = %d", datestr.latin1(), y, m, d, monthPos, dayPos);
+ odebug << "TimeConversion::fromString ymd = " << datestr << " => " << y << " " << m << " " << d << "; mpos = " << monthPos << " ypos = " << dayPos << "" << oendl;
QDate date ( y,m,d );
return date;
}