summaryrefslogtreecommitdiffabout
path: root/kabc
authorulf69 <ulf69>2004-07-14 14:55:56 (UTC)
committer ulf69 <ulf69>2004-07-14 14:55:56 (UTC)
commitf2779e5e7742103ce848ab11e6b9fe3661587f0b (patch) (side-by-side diff)
treef858743398b61aa21eca09abc6d85a34a7d3f436 /kabc
parentcf7175c9a6b96cd11fb7f3cba459f5223aa4aacb (diff)
downloadkdepimpi-f2779e5e7742103ce848ab11e6b9fe3661587f0b.zip
kdepimpi-f2779e5e7742103ce848ab11e6b9fe3661587f0b.tar.gz
kdepimpi-f2779e5e7742103ce848ab11e6b9fe3661587f0b.tar.bz2
added changes to support qtopia import/export and improved resource support
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/converter/opie/opieconverter.h4
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.cpp13
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.h4
3 files changed, 9 insertions, 12 deletions
diff --git a/kabc/converter/opie/opieconverter.h b/kabc/converter/opie/opieconverter.h
index c7e691f..d251a24 100644
--- a/kabc/converter/opie/opieconverter.h
+++ b/kabc/converter/opie/opieconverter.h
@@ -48,14 +48,14 @@ public:
/**
* Destructor.
*/
virtual ~OpieConverter();
- virtual bool init();
- virtual void deinit();
+ bool init();
+ void deinit();
/**
* Converts a vcard string to an addressee.
*
* @param contact The opie contact.
* @param addr The addressee.
diff --git a/kabc/converter/qtopia/qtopiaconverter.cpp b/kabc/converter/qtopia/qtopiaconverter.cpp
index e3dd3e6..f451b8b 100644
--- a/kabc/converter/qtopia/qtopiaconverter.cpp
+++ b/kabc/converter/qtopia/qtopiaconverter.cpp
@@ -46,22 +46,19 @@ QtopiaConverter::~QtopiaConverter()
deinit();
}
bool QtopiaConverter::init()
{
catDB = new Categories();
- if (catDB)
- {
+
+ if (!catDB)
+ return false;
+
catDB->load( categoryFileName() );
return true;
}
- else
- {
- return false;
- }
-}
void QtopiaConverter::deinit()
{
if (catDB)
{
delete catDB;
@@ -206,13 +203,13 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
else if (contact.gender() == PimContact::Female)
addr.insertCustom( "KADDRESSBOOK", "X-Gender", "female");
if (contact.anniversary().isValid()) {
QString dt = KGlobal::locale()->formatDate(contact.anniversary(), true, KLocale::ISODate);
//US
- qDebug("OpieConverter::opieToAddressee found:%s", dt.latin1());
+ qDebug("OpieConverter::qtopiaToAddressee found:%s", dt.latin1());
addr.insertCustom( "KADDRESSBOOK", "X-Anniversary", dt);
}
addr.insertCustom( "KADDRESSBOOK", "X-Children", contact.children() );
if (contact.birthday().isValid())
addr.setBirthday( contact.birthday() );
diff --git a/kabc/converter/qtopia/qtopiaconverter.h b/kabc/converter/qtopia/qtopiaconverter.h
index 7397113..8f4c698 100644
--- a/kabc/converter/qtopia/qtopiaconverter.h
+++ b/kabc/converter/qtopia/qtopiaconverter.h
@@ -47,14 +47,14 @@ public:
/**
* Destructor.
*/
virtual ~QtopiaConverter();
- virtual bool init();
- virtual void deinit();
+ bool init();
+ void deinit();
/**
* Converts a vcard string to an addressee.
*
* @param contact The qtopia contact.
* @param addr The addressee.