summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.Embedded8
-rw-r--r--kabc/converter/opie/opieconverter.h4
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.cpp19
-rw-r--r--kabc/converter/qtopia/qtopiaconverter.h4
-rw-r--r--kaddressbook/xxportmanager.cpp10
5 files changed, 26 insertions, 19 deletions
diff --git a/Makefile.Embedded b/Makefile.Embedded
index 3160017..143e965 100644
--- a/Makefile.Embedded
+++ b/Makefile.Embedded
@@ -2,13 +2,13 @@ DISTPATH = $(shell pwd)
DISTDIR = $(shell basename $(DISTPATH))
SUBDIRS = libical/src/libical libical/src/libicalss qtcompat microkde \
libkcal libkdepim kabc kabc/converter/opie kabc/converter/qtopia kabc/formats/binary \
kabc/plugins/file kabc/plugins/dir \
kabc/plugins/ldap kabc/plugins/opie kabc/plugins/qtopia \
- korganizer kalarmd kaddressbook/xxport/opie kaddressbook
+ korganizer kalarmd kaddressbook/xxport/opie kaddressbook/xxport/qtopia kaddressbook
all: tmake
for i in $(SUBDIRS); do pushd $$i; \
make -f Makefile$(PLATFORM) || exit 1; popd; \
done
objects:
@@ -47,12 +47,13 @@ tmake: objects qtcompat/Makefile$(PLATFORM) microkde/Makefile$(PLATFORM) \
kabc/plugins/file/Makefile$(PLATFORM) \
kabc/plugins/dir/Makefile$(PLATFORM) \
kabc/plugins/ldap/Makefile$(PLATFORM) \
kabc/plugins/opie/Makefile$(PLATFORM) \
kabc/plugins/qtopia/Makefile$(PLATFORM) \
kaddressbook/xxport/opie/Makefile$(PLATFORM) \
+ kaddressbook/xxport/qtopia/Makefile$(PLATFORM) \
kaddressbook/Makefile$(PLATFORM)
qtcompat/Makefile$(PLATFORM): qtcompat/qtcompat.pro
cd qtcompat; tmake "CONFIG+=$(RELEASE_DEBUG)" qtcompat.pro -o Makefile$(PLATFORM)
@@ -105,10 +106,13 @@ kabc/plugins/opie/Makefile$(PLATFORM): kabc/plugins/opie/opieE.pro
kabc/plugins/qtopia/Makefile$(PLATFORM): kabc/plugins/qtopia/qtopiaE.pro
cd kabc/plugins/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM)
kaddressbook/xxport/opie/Makefile$(PLATFORM): kaddressbook/xxport/opie/opieE.pro
cd kaddressbook/xxport/opie; tmake "CONFIG+=$(RELEASE_DEBUG)" opieE.pro -o Makefile$(PLATFORM)
-
+
+kaddressbook/xxport/qtopia/Makefile$(PLATFORM): kaddressbook/xxport/qtopia/qtopiaE.pro
+ cd kaddressbook/xxport/qtopia; tmake "CONFIG+=$(RELEASE_DEBUG)" qtopiaE.pro -o Makefile$(PLATFORM)
+
kaddressbook/Makefile$(PLATFORM): kaddressbook/kaddressbookE.pro
cd kaddressbook; tmake "CONFIG+=$(RELEASE_DEBUG)" kaddressbookE.pro -o Makefile$(PLATFORM)
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,21 +46,18 @@ QtopiaConverter::~QtopiaConverter()
deinit();
}
bool QtopiaConverter::init()
{
catDB = new Categories();
- if (catDB)
- {
- catDB->load( categoryFileName() );
- return true;
- }
- else
- {
+
+ if (!catDB)
return false;
- }
+
+ catDB->load( categoryFileName() );
+ return true;
}
void QtopiaConverter::deinit()
{
if (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() );
@@ -227,22 +224,22 @@ bool QtopiaConverter::qtopiaToAddressee( const PimContact &contact, Addressee &a
addr.setNote( contact.notes() );
//US QString groups() const { return find( Qtopia::Groups ); }
//US QStringList groupList() const;
-
+
QArray<int> catArray = contact.categories();
QString cat;
for ( unsigned int i=0; i < catArray.size(); i++ ) {
cat = catDB->label("contact", catArray[i]);
if ( !cat.isEmpty() )
addr.insertCategory( cat );
}
-
+
return true;
}
bool QtopiaConverter::addresseeToQtopia( const Addressee &addr, PimContact &contact )
{
// name
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.
diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp
index 248fcab..4798ffe 100644
--- a/kaddressbook/xxportmanager.cpp
+++ b/kaddressbook/xxportmanager.cpp
@@ -193,19 +193,26 @@ void XXPortManager::loadPlugins()
#else //KAB_EMBEDDED
QList<XXPortFactory> factorylist;
factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_csv_xxport()));
factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_kde2_xxport()));
factorylist.append(static_cast<XXPortFactory*>(init_kaddrbk_vcard_xxport()));
- //now add the opie import library dynamically
+ //add the opie import library dynamically
KLibFactory *factory = KLibLoader::self()->factory( "microkaddrbk_opie_xxport" );
if ( factory ) {
XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
factorylist.append(xxportFactory);
}
+ //add the qtopia import library dynamically
+ factory = KLibLoader::self()->factory( "microkaddrbk_qtopia_xxport" );
+ if ( factory ) {
+ XXPortFactory *xxportFactory = static_cast<XXPortFactory*>( factory );
+ factorylist.append(xxportFactory);
+ }
+
QListIterator<XXPortFactory> it(factorylist);
for ( ; it.current(); ++it )
{
XXPortFactory *xxportFactory = it.current();
#endif //KAB_EMBEDDED
@@ -216,13 +223,12 @@ void XXPortManager::loadPlugins()
connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ),
this, SLOT( slotExport( const QString&, const QString& ) ) );
connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ),
this, SLOT( slotImport( const QString&, const QString& ) ) );
}
}
-
}
PreviewDialog::PreviewDialog( const KABC::Addressee &addr, QWidget *parent,
const char *name )
: KDialogBase( Plain, i18n( "Contact Preview" ), Ok | Cancel, Ok, parent,