author | ulf69 <ulf69> | 2004-07-13 15:02:13 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-13 15:02:13 (UTC) |
commit | 2450dd81505b6212ec5bf59c168b53c52bd08f53 (patch) (side-by-side diff) | |
tree | 9425fb7d8f9ba270f75cb711fb19aecb5d92495e /kabc | |
parent | 65848bf858dae95799ec8ed883c23faa48ff8566 (diff) | |
download | kdepimpi-2450dd81505b6212ec5bf59c168b53c52bd08f53.zip kdepimpi-2450dd81505b6212ec5bf59c168b53c52bd08f53.tar.gz kdepimpi-2450dd81505b6212ec5bf59c168b53c52bd08f53.tar.bz2 |
cleanup of code
-rw-r--r-- | kabc/converter/opie/opieE.pro | 2 | ||||
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/kabc/converter/opie/opieE.pro b/kabc/converter/opie/opieE.pro index e026f2a..131c398 100644 --- a/kabc/converter/opie/opieE.pro +++ b/kabc/converter/opie/opieE.pro @@ -1,18 +1,18 @@ TEMPLATE = lib -INCLUDEPATH += . ../.. ../../../microkde ../../../microkde/kdecore $(OPIEDIR)/include $(OPEDIR)/include +INCLUDEPATH += . ../.. ../../../microkde ../../../microkde/kdecore $(OPIEDIR)/include #CONFIG += staticlib OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) #for static linkage, put it here #DESTDIR=../../lib/$(PLATFORM) #for dynamic linkage, put it here DESTDIR=$(QPEDIR)/lib LIBS += -lmicrokde LIBS += -lmicrokabc LIBS += -L$(QPEDIR)/lib LIBS += -L$(OPIEDIR)/lib LIBS += -lopie LIBS += -lqpe diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp index a7d271f..3a40ea2 100644 --- a/kabc/plugins/opie/resourceopie.cpp +++ b/kabc/plugins/opie/resourceopie.cpp @@ -20,48 +20,46 @@ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <qdir.h> #include <qfile.h> #include <qfileinfo.h> #include <qregexp.h> -#include <qtimer.h> #include <kapplication.h> #include <kconfig.h> #include <kdebug.h> #include <klocale.h> //US #include <ksavefile.h> #include <kstandarddirs.h> //US #include "formatfactory.h" //US #include <qpe/qpeapplication.h> #include <opie/ocontactaccess.h> #include <opie/ocontactaccessbackend_xml.h> -#include "resource.h" #include "resourceopieconfig.h" #include "stdaddressbook.h" #include "opieconverter.h" #include "resourceopie.h" using namespace KABC; extern "C" { void *init_microkabc_opie() { return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig>(); } } @@ -98,35 +96,32 @@ void ResourceOpie::init( const QString &fileName ) */ //US opie addressbook is always readonly //US setReadOnly( true ); setFileName( fileName ); } ResourceOpie::~ResourceOpie() { if (mConverter != 0) delete mConverter; } void ResourceOpie::writeConfig( KConfig *config ) { - //US opie addressbook is always readonly -//US setReadOnly( true ); - Resource::writeConfig( config ); config->writeEntry( "FileName", mFileName ); // qDebug("ResourceFile::writeConfig format %s, %s", mFileName.latin1(), mFormatName.latin1()); } Ticket *ResourceOpie::requestSaveTicket() { kdDebug(5700) << "ResourceOpie::requestSaveTicket()" << endl; if ( !addressBook() ) return 0; if ( !lock( mFileName ) ) { kdDebug(5700) << "ResourceOpie::requestSaveTicket(): Unable to lock file '" @@ -200,33 +195,33 @@ bool ResourceOpie::load() mConverter = new OpieConverter(); res = mConverter->init(); if ( !res ) { qDebug("Unable to initialize opie converter. Most likely a problem with the category file"); addressBook()->error( i18n( "Unable to initialize opie converter. Most likely a problem with the category file" ) ); delete access; return false; } } OContactAccess::List::Iterator it; OContactAccess::List allList = access->allRecords(); for ( it = allList.begin(); it != allList.end(); ++it ) { - OContact c = (*it); + const OContact c = (*it); KABC::Addressee addressee; res = mConverter->opieToAddressee( c, addressee ); if ( !addressee.isEmpty() && res ) { addressee.setResource( this ); addressBook()->insertAddressee( addressee ); } // qDebug("found %s", c.fullName().latin1()); } delete access; // it seems so, that deletion of access deletes backend as well |