From d5358380edce9a2c39f3eea4df741a148338880c Mon Sep 17 00:00:00 2001 From: ulf69 Date: Mon, 02 Aug 2004 23:23:36 +0000 Subject: changes that resources support writing and syncing --- (limited to 'kabc/plugins/opie') diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp index 1222242..5559827 100644 --- a/kabc/plugins/opie/resourceopie.cpp +++ b/kabc/plugins/opie/resourceopie.cpp @@ -50,7 +50,7 @@ $Id$ #include "resourceopieconfig.h" #include "stdaddressbook.h" -#include "syncwidget.h" +#include "syncprefwidget.h" #include "opieconverter.h" @@ -61,7 +61,7 @@ extern "C" { void *init_microkabc_opie() { - return new KRES::PluginFactory(); + return new KRES::PluginFactory(); } } @@ -76,15 +76,12 @@ ResourceOpie::ResourceOpie( const KConfig *config, bool syncable ) } -// qDebug("ResourceOpie::ResourceOpie : %s", fileName.latin1() ); - init( fileName ); } ResourceOpie::ResourceOpie( const QString &fileName, bool syncable ) : Resource( 0, syncable ) { -// qDebug("ResourceOpie::ResourceOpie : 3 %s", fileName.latin1()); init( fileName ); } @@ -95,9 +92,7 @@ void ResourceOpie::init( const QString &fileName ) connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); - setFileName( fileName ); - } ResourceOpie::~ResourceOpie() @@ -107,7 +102,6 @@ ResourceOpie::~ResourceOpie() if(mAccess != 0) delete mAccess; - } void ResourceOpie::writeConfig( KConfig *config ) @@ -251,16 +245,10 @@ bool ResourceOpie::lock( const QString &lockfileName ) { qDebug("ResourceOpie::lock: %s", fileName().latin1()); - -// qDebug("ResourceOpie::lock() %s", fileName.latin1()); kdDebug(5700) << "ResourceOpie::lock()" << endl; QString fn = lockfileName; -//US change the implementation how the lockfilename is getting created -//US fn.replace( QRegExp("/"), "_" ); -//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); - KURL url(fn); QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); @@ -302,10 +290,6 @@ void ResourceOpie::unlock( const QString &fileName ) qDebug("ResourceOpie::unlock() %s", fileName.latin1()); QString fn = fileName; -//US change the implementation how the lockfilename is getting created -//US fn.replace( QRegExp( "/" ), "_" ); -//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); -//US QString lockName = fn + ".lock"; KURL url(fn); QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); -- cgit v0.9.0.2