summaryrefslogtreecommitdiffabout
path: root/kabc
authorzautrix <zautrix>2005-10-27 10:34:56 (UTC)
committer zautrix <zautrix>2005-10-27 10:34:56 (UTC)
commit29c7448b3c54e8d579732d10f144e12f7167c3c3 (patch) (side-by-side diff)
treeae613037eaa897d2f7bc084d0b9e6954c630d985 /kabc
parenteb83d8b5542de9ca0c421ad6aca2913b502bbe78 (diff)
downloadkdepimpi-29c7448b3c54e8d579732d10f144e12f7167c3c3.zip
kdepimpi-29c7448b3c54e8d579732d10f144e12f7167c3c3.tar.gz
kdepimpi-29c7448b3c54e8d579732d10f144e12f7167c3c3.tar.bz2
commit
Diffstat (limited to 'kabc') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/olaccess/olaccess.pro2
-rw-r--r--kabc/plugins/olaccess/olaccessconverter.cpp54
-rw-r--r--kabc/plugins/olaccess/olaccessconverter.h20
-rw-r--r--kabc/plugins/olaccess/resourceolaccess.cpp69
-rw-r--r--kabc/plugins/olaccess/resourceolaccess.h21
-rw-r--r--kabc/plugins/olaccess/resourceolaccessconfig.cpp24
-rw-r--r--kabc/plugins/olaccess/resourceolaccessconfig.h4
7 files changed, 94 insertions, 100 deletions
diff --git a/kabc/plugins/olaccess/olaccess.pro b/kabc/plugins/olaccess/olaccess.pro
index ca0a6a8..4416d0c 100644
--- a/kabc/plugins/olaccess/olaccess.pro
+++ b/kabc/plugins/olaccess/olaccess.pro
@@ -6,3 +6,3 @@ include( ../../../variables.pri )
-INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
+INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
diff --git a/kabc/plugins/olaccess/olaccessconverter.cpp b/kabc/plugins/olaccess/olaccessconverter.cpp
index 4adcae4..e95f3cb 100644
--- a/kabc/plugins/olaccess/olaccessconverter.cpp
+++ b/kabc/plugins/olaccess/olaccessconverter.cpp
@@ -31,5 +31,4 @@ $Id$
-#include "sharpdtmconverter.h"
+#include "olaccessconverter.h"
-#include <sl/slcategories.h>
#include <libkdepim/ksyncprofile.h>
@@ -39,5 +38,4 @@ $Id$
using namespace KABC;
-using namespace SlCategory;
-SharpDTMConverter::SharpDTMConverter() : catDB(0)
+OlaccessConverter::OlaccessConverter()
{
@@ -45,3 +43,3 @@ SharpDTMConverter::SharpDTMConverter() : catDB(0)
-SharpDTMConverter::~SharpDTMConverter()
+OlaccessConverter::~OlaccessConverter()
{
@@ -50,4 +48,5 @@ SharpDTMConverter::~SharpDTMConverter()
-bool SharpDTMConverter::init()
+bool OlaccessConverter::init()
{
+#if 0
catDB = new SlCategory::SlCategories();
@@ -58,2 +57,3 @@ bool SharpDTMConverter::init()
// catDB->load( categoryFileName() );
+#endif
return true;
@@ -61,4 +61,5 @@ bool SharpDTMConverter::init()
-void SharpDTMConverter::deinit()
+void OlaccessConverter::deinit()
{
+#if 0
if (catDB)
@@ -68,5 +69,6 @@ void SharpDTMConverter::deinit()
}
+#endif
}
-
-bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBase* database, Addressee &addr )
+#if 0
+bool OlaccessConverter::sharpToAddressee( const CardId &contact, const SlZDataBase* database, Addressee &addr )
{
@@ -81,3 +83,3 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
// name
- //qDebug("SharpDTMConverter::sharpToAddressee check if the fileAs transformation works!!");
+ //qDebug("OlaccessConverter::sharpToAddressee check if the fileAs transformation works!!");
addr.setFormattedName(db->readField(ZdbAdrs::FileAs));
@@ -96,3 +98,3 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
emailstr.replace( QRegExp(":"), " " );
- //qDebug("SharpDTMConverter::sharpToAddressee whats the character to seperate the emailadresses? %s ", emailstr.latin1());
+ //qDebug("OlaccessConverter::sharpToAddressee whats the character to seperate the emailadresses? %s ", emailstr.latin1());
QStringList emails = QStringList::split(" ", emailstr.simplifyWhiteSpace());
@@ -223,4 +225,4 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
QString gen = db->readField(ZdbAdrs::Gender);
- //qDebug("SharpDTMConverter::sharpToAddressee pleas check that gender works!! : Gender: %s", gen.latin1());
- //qDebug("SharpDTMConverter::sharpToAddressee: may be int db->readUshortField(\"ZdbAdrs::Gender\") is here better suited");
+ //qDebug("OlaccessConverter::sharpToAddressee pleas check that gender works!! : Gender: %s", gen.latin1());
+ //qDebug("OlaccessConverter::sharpToAddressee: may be int db->readUshortField(\"ZdbAdrs::Gender\") is here better suited");
if (gen == "1")
@@ -266,3 +268,3 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
- //qDebug("SharpDTMConverter::sharpToAddressee please check that the categories will be converted" );
+ //qDebug("OlaccessConverter::sharpToAddressee please check that the categories will be converted" );
QArray<int> catArray = db->readCategories();
@@ -281,3 +283,3 @@ bool SharpDTMConverter::sharpToAddressee( const CardId &contact, const SlZDataBa
-bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* database , const CardId &contact )
+bool OlaccessConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* database , const CardId &contact )
{
@@ -291,3 +293,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
- //qDebug("SharpDTMConverter::addresseeToSharp check if the fileAs transformation works!!\n%s",addr.formattedName().latin1() );
+ //qDebug("OlaccessConverter::addresseeToSharp check if the fileAs transformation works!!\n%s",addr.formattedName().latin1() );
QString formattedName = addr.formattedName();
@@ -307,4 +309,4 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
// email
- //qDebug("SharpDTMConverter::addresseeToSharp check which seperator we need here for the emails!!");
- //qDebug("SharpDTMConverter::addresseeToSharp its probably the same from sharpToAddressee");
+ //qDebug("OlaccessConverter::addresseeToSharp check which seperator we need here for the emails!!");
+ //qDebug("OlaccessConverter::addresseeToSharp its probably the same from sharpToAddressee");
QString emails = addr.emails().join(" ");
@@ -375,5 +377,5 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
QString gt = addr.custom( "KADDRESSBOOK", "X-Gender" );
- //qDebug("SharpDTMConverter::addresseeToSharp please check that gender works!! : Gender: %s", gt.latin1());
- //qDebug("SharpDTMConverter::addresseeToSharp: may be writeField(\"ZdbAdrs::Gender\", ushort) is here better suited?");
- //qDebug("SharpDTMConverter::addresseeToSharp: check also the reverse functionality in sharpToAddressee");
+ //qDebug("OlaccessConverter::addresseeToSharp please check that gender works!! : Gender: %s", gt.latin1());
+ //qDebug("OlaccessConverter::addresseeToSharp: may be writeField(\"ZdbAdrs::Gender\", ushort) is here better suited?");
+ //qDebug("OlaccessConverter::addresseeToSharp: check also the reverse functionality in sharpToAddressee");
if (gt == "male")
@@ -407,3 +409,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
- //qDebug("SharpDTMConverter::addresseeToSharp please check if category transformation works");
+ //qDebug("OlaccessConverter::addresseeToSharp please check if category transformation works");
@@ -413,3 +415,3 @@ bool SharpDTMConverter::addresseeToSharp( const Addressee &addr, SlZDataBase* da
-bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* database , const CardId &contact )
+bool OlaccessConverter::setCategories( const Addressee &addr, SlZDataBase* database , const CardId &contact )
{
@@ -433,3 +435,3 @@ bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* datab
if ( !(res = database->updateCategories(contact, ids) ))
- qDebug("SharpDTMConverter::Error updating categories");
+ qDebug("OlaccessConverter::Error updating categories");
@@ -437,4 +439,4 @@ bool SharpDTMConverter::setCategories( const Addressee &addr, SlZDataBase* datab
}
-
-QDate SharpDTMConverter::convertDate( QString s)
+#endif
+QDate OlaccessConverter::convertDate( QString s)
{
diff --git a/kabc/plugins/olaccess/olaccessconverter.h b/kabc/plugins/olaccess/olaccessconverter.h
index db1bf2d..48a255d 100644
--- a/kabc/plugins/olaccess/olaccessconverter.h
+++ b/kabc/plugins/olaccess/olaccessconverter.h
@@ -31,3 +31,2 @@ $Id$
-#include <sl/slzdb.h>
@@ -35,7 +34,2 @@ $Id$
-namespace SlCategory {
- class SlCategories;
-}
-
-class SlZDataBase;
@@ -43,3 +37,3 @@ namespace KABC {
-class SharpDTMConverter
+class OlaccessConverter
{
@@ -50,3 +44,3 @@ public:
*/
- SharpDTMConverter();
+ OlaccessConverter();
@@ -55,3 +49,3 @@ public:
*/
- virtual ~SharpDTMConverter();
+ virtual ~OlaccessConverter();
@@ -67,3 +61,3 @@ public:
*/
- bool sharpToAddressee( const CardId &contact, const SlZDataBase* database, Addressee &addr );
+ //bool sharpToAddressee( const CardId &contact, const SlZDataBase* database, Addressee &addr );
@@ -76,7 +70,7 @@ public:
*/
- bool addresseeToSharp( const Addressee &addr, SlZDataBase* database , const CardId &contact );
- bool setCategories( const Addressee &addr, SlZDataBase* database , const CardId &contact );
+ //bool addresseeToSharp( const Addressee &addr, SlZDataBase* database , const CardId &contact );
+ //bool setCategories( const Addressee &addr, SlZDataBase* database , const CardId &contact );
private:
- SlCategory::SlCategories* catDB;
+ //SlCategory::SlCategories* catDB;
QDate convertDate( QString );
diff --git a/kabc/plugins/olaccess/resourceolaccess.cpp b/kabc/plugins/olaccess/resourceolaccess.cpp
index e8f8bdd..7113e0e 100644
--- a/kabc/plugins/olaccess/resourceolaccess.cpp
+++ b/kabc/plugins/olaccess/resourceolaccess.cpp
@@ -29,3 +29,2 @@ $Id$
#include <sys/stat.h>
-#include <unistd.h>
@@ -45,3 +44,2 @@ $Id$
-#include <sl/slzdb.h>
@@ -49,4 +47,4 @@ $Id$
-#include "resourcesharpdtmconfig.h"
-#include "resourcesharpdtm.h"
+#include "resourceolaccessconfig.h"
+#include "resourceolaccess.h"
@@ -54,3 +52,3 @@ $Id$
-#include "sharpdtmconverter.h"
+#include "olaccessconverter.h"
//#define ALLOW_LOCKING
@@ -59,5 +57,5 @@ extern "C"
{
- void *init_microkabc_sharpdtm()
+ void *init_microkabc_olaccess()
{
- return new KRES::PluginFactory<ResourceSharpDTM,ResourceSharpDTMConfig>();
+ return new KRES::PluginFactory<Resourceolaccess,ResourceolaccessConfig>();
}
@@ -65,3 +63,3 @@ extern "C"
-ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
+Resourceolaccess::Resourceolaccess( const KConfig *config )
: Resource( config ), mConverter (0)
@@ -69,4 +67,4 @@ ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
// we can not choose the filename. Therefore use the default to display
- mAccess = 0;
- QString fileName = SlZDataBase::addressbookFileName();
+ //mAccess = 0;
+ QString fileName;// = SlZDataBase::addressbookFileName();
init( fileName );
@@ -74,6 +72,6 @@ ResourceSharpDTM::ResourceSharpDTM( const KConfig *config )
-ResourceSharpDTM::ResourceSharpDTM( const QString &fileName )
+Resourceolaccess::Resourceolaccess( const QString &fileName )
: Resource( 0 )
{
- mAccess = 0;
+ //mAccess = 0;
init( fileName );
@@ -81,6 +79,6 @@ ResourceSharpDTM::ResourceSharpDTM( const QString &fileName )
-void ResourceSharpDTM::init( const QString &fileName )
+void Resourceolaccess::init( const QString &fileName )
{
if (mConverter == 0) {
- mConverter = new SharpDTMConverter();
+ mConverter = new OlaccessConverter();
bool res = mConverter->init();
@@ -96,3 +94,3 @@ void ResourceSharpDTM::init( const QString &fileName )
-ResourceSharpDTM::~ResourceSharpDTM()
+Resourceolaccess::~Resourceolaccess()
{
@@ -101,7 +99,7 @@ ResourceSharpDTM::~ResourceSharpDTM()
- if(mAccess != 0)
- delete mAccess;
+ //if(mAccess != 0)
+ //delete mAccess;
}
-void ResourceSharpDTM::writeConfig( KConfig *config )
+void Resourceolaccess::writeConfig( KConfig *config )
{
@@ -110,6 +108,6 @@ void ResourceSharpDTM::writeConfig( KConfig *config )
-Ticket *ResourceSharpDTM::requestSaveTicket()
+Ticket *Resourceolaccess::requestSaveTicket()
{
- qDebug("ResourceSharpDTM::requestSaveTicket: %s", fileName().latin1());
+ qDebug("Resourceolaccess::requestSaveTicket: %s", fileName().latin1());
@@ -120,3 +118,3 @@ Ticket *ResourceSharpDTM::requestSaveTicket()
-bool ResourceSharpDTM::doOpen()
+bool Resourceolaccess::doOpen()
{
@@ -127,3 +125,3 @@ bool ResourceSharpDTM::doOpen()
-void ResourceSharpDTM::doClose()
+void Resourceolaccess::doClose()
{
@@ -132,3 +130,3 @@ void ResourceSharpDTM::doClose()
-bool ResourceSharpDTM::load()
+bool Resourceolaccess::load()
{
@@ -136,3 +134,4 @@ bool ResourceSharpDTM::load()
return false;
- QString fileN = SlZDataBase::addressbookFileName();
+ QString fileN ;//= SlZDataBase::addressbookFileName();
+#if 0
if ( ! mAccess ) {
@@ -145,3 +144,3 @@ bool ResourceSharpDTM::load()
- qDebug("ResourceSharpDTM:: %x load: %s",this, fileName().latin1());
+ qDebug("Resourceolaccess:: %x load: %s",this, fileName().latin1());
bool res = false;
@@ -162,3 +161,3 @@ bool ResourceSharpDTM::load()
mAccess = 0;
-
+#endif
return true;
@@ -166,4 +165,5 @@ bool ResourceSharpDTM::load()
-bool ResourceSharpDTM::save( Ticket *ticket )
+bool Resourceolaccess::save( Ticket *ticket )
{
+#if 0
if (!mConverter)
@@ -178,3 +178,3 @@ bool ResourceSharpDTM::save( Ticket *ticket )
return false;
- qDebug("ResourceSharpDTM::save: %s", fileName().latin1());
+ qDebug("Resourceolaccess::save: %s", fileName().latin1());
KABC::AddressBook::Iterator it;
@@ -269,2 +269,3 @@ bool ResourceSharpDTM::save( Ticket *ticket )
mAccess = 0;
+#endif
return true;
@@ -272,3 +273,3 @@ bool ResourceSharpDTM::save( Ticket *ticket )
-bool ResourceSharpDTM::lock( const QString &lockfileName )
+bool Resourceolaccess::lock( const QString &lockfileName )
{
@@ -277,3 +278,3 @@ bool ResourceSharpDTM::lock( const QString &lockfileName )
-void ResourceSharpDTM::unlock( const QString &fileName )
+void Resourceolaccess::unlock( const QString &fileName )
{
@@ -282,3 +283,3 @@ void ResourceSharpDTM::unlock( const QString &fileName )
-void ResourceSharpDTM::setFileName( const QString &newFileName )
+void Resourceolaccess::setFileName( const QString &newFileName )
{
@@ -287,3 +288,3 @@ void ResourceSharpDTM::setFileName( const QString &newFileName )
-void ResourceSharpDTM::fileChanged()
+void Resourceolaccess::fileChanged()
{
@@ -292,3 +293,3 @@ void ResourceSharpDTM::fileChanged()
-void ResourceSharpDTM::removeAddressee( const Addressee &addr )
+void Resourceolaccess::removeAddressee( const Addressee &addr )
{
@@ -296,3 +297,3 @@ void ResourceSharpDTM::removeAddressee( const Addressee &addr )
-void ResourceSharpDTM::cleanUp()
+void Resourceolaccess::cleanUp()
{
diff --git a/kabc/plugins/olaccess/resourceolaccess.h b/kabc/plugins/olaccess/resourceolaccess.h
index 64d06f9..0066331 100644
--- a/kabc/plugins/olaccess/resourceolaccess.h
+++ b/kabc/plugins/olaccess/resourceolaccess.h
@@ -28,4 +28,6 @@ $Id$
-#ifndef KABC_RESOURCESHARPDTM_H
-#define KABC_RESOURCESHARPDTM_H
+
+
+#ifndef KABC_RESOURCEolaccess_H
+#define KABC_RESOURCEolaccess_H
@@ -39,4 +41,2 @@ $Id$
-class SlZDataBase;
-
namespace KABC {
@@ -44,3 +44,3 @@ namespace KABC {
class ResourceConfigWidget;
-class SharpDTMConverter;
+class OlaccessConverter;
@@ -49,3 +49,3 @@ class SharpDTMConverter;
*/
-class ResourceSharpDTM : public Resource
+class Resourceolaccess : public Resource
{
@@ -60,3 +60,3 @@ public:
*/
- ResourceSharpDTM( const KConfig *cfg );
+ Resourceolaccess( const KConfig *cfg );
@@ -65,3 +65,3 @@ public:
*/
- ResourceSharpDTM( const QString &fileName );
+ Resourceolaccess( const QString &fileName );
@@ -70,3 +70,3 @@ public:
*/
- ~ResourceSharpDTM();
+ ~Resourceolaccess();
@@ -135,4 +135,3 @@ protected:
private:
- SlZDataBase* mAccess;
- SharpDTMConverter* mConverter;
+ OlaccessConverter* mConverter;
diff --git a/kabc/plugins/olaccess/resourceolaccessconfig.cpp b/kabc/plugins/olaccess/resourceolaccessconfig.cpp
index 240f1d7..1fcf1b8 100644
--- a/kabc/plugins/olaccess/resourceolaccessconfig.cpp
+++ b/kabc/plugins/olaccess/resourceolaccessconfig.cpp
@@ -35,3 +35,2 @@ $Id$
-#include <unistd.h>
@@ -39,7 +38,6 @@ $Id$
#include <qfile.h>
-#include "resourcesharpdtm.h"
+#include "resourceolaccess.h"
-#include "resourcesharpdtmconfig.h"
+#include "resourceolaccessconfig.h"
-#include <sl/slzdb.h>
@@ -47,3 +45,3 @@ using namespace KABC;
-ResourceSharpDTMConfig::ResourceSharpDTMConfig( QWidget* parent, const char* name )
+ResourceolaccessConfig::ResourceolaccessConfig( QWidget* parent, const char* name )
: ConfigWidget( parent, name )
@@ -64,9 +62,9 @@ ResourceSharpDTMConfig::ResourceSharpDTMConfig( QWidget* parent, const char* na
-void ResourceSharpDTMConfig::loadSettings( KRES::Resource *res )
+void ResourceolaccessConfig::loadSettings( KRES::Resource *res )
{
//US ResourceFile *resource = dynamic_cast<ResourceFile*>( res );
- ResourceSharpDTM *resource = (ResourceSharpDTM*)( res );
+ Resourceolaccess *resource = (Resourceolaccess*)( res );
if ( !resource ) {
- kdDebug(5700) << "ResourceSharpDTMConfig::loadSettings(): cast failed" << endl;
+ kdDebug(5700) << "ResourceolaccessConfig::loadSettings(): cast failed" << endl;
return;
@@ -76,3 +74,3 @@ void ResourceSharpDTMConfig::loadSettings( KRES::Resource *res )
if ( mFileNameEdit->url().isEmpty() )
- mFileNameEdit->setURL( SlZDataBase::addressbookFileName() );
+ ;//mFileNameEdit->setURL( SlZDataBase::addressbookFileName() );
@@ -86,9 +84,9 @@ void ResourceSharpDTMConfig::loadSettings( KRES::Resource *res )
-void ResourceSharpDTMConfig::saveSettings( KRES::Resource *res )
+void ResourceolaccessConfig::saveSettings( KRES::Resource *res )
{
//US ResourceFile *resource = dynamic_cast<ResourceFile*>( res );
- ResourceSharpDTM *resource = (ResourceSharpDTM*)( res );
+ Resourceolaccess *resource = (Resourceolaccess*)( res );
if ( !resource ) {
- kdDebug(5700) << "ResourceSharpDTMConfig::saveSettings(): cast failed" << endl;
+ kdDebug(5700) << "ResourceolaccessConfig::saveSettings(): cast failed" << endl;
return;
@@ -99,3 +97,3 @@ void ResourceSharpDTMConfig::saveSettings( KRES::Resource *res )
-void ResourceSharpDTMConfig::checkFilePermissions( const QString& fileName )
+void ResourceolaccessConfig::checkFilePermissions( const QString& fileName )
{
diff --git a/kabc/plugins/olaccess/resourceolaccessconfig.h b/kabc/plugins/olaccess/resourceolaccessconfig.h
index 29765c8..38d47ba 100644
--- a/kabc/plugins/olaccess/resourceolaccessconfig.h
+++ b/kabc/plugins/olaccess/resourceolaccessconfig.h
@@ -37,3 +37,3 @@ namespace KABC {
-class ResourceSharpDTMConfig : public KRES::ConfigWidget
+class ResourceolaccessConfig : public KRES::ConfigWidget
{
@@ -42,3 +42,3 @@ class ResourceSharpDTMConfig : public KRES::ConfigWidget
public:
- ResourceSharpDTMConfig( QWidget* parent = 0, const char* name = 0 );
+ ResourceolaccessConfig( QWidget* parent = 0, const char* name = 0 );