summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/opie
authorulf69 <ulf69>2004-08-02 23:23:36 (UTC)
committer ulf69 <ulf69>2004-08-02 23:23:36 (UTC)
commitd5358380edce9a2c39f3eea4df741a148338880c (patch) (side-by-side diff)
tree8f514a5e200ecfa3c5f4256d85606ade7c6b3093 /kabc/plugins/opie
parent464ed9d13592965a63b614a1f2902000eb26f1ae (diff)
downloadkdepimpi-d5358380edce9a2c39f3eea4df741a148338880c.zip
kdepimpi-d5358380edce9a2c39f3eea4df741a148338880c.tar.gz
kdepimpi-d5358380edce9a2c39f3eea4df741a148338880c.tar.bz2
changes that resources support writing and syncing
Diffstat (limited to 'kabc/plugins/opie') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/opie/resourceopie.cpp20
1 files changed, 2 insertions, 18 deletions
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<ResourceOpie,ResourceOpieConfig, KRES::SyncWidget>();
+ return new KRES::PluginFactory<ResourceOpie,ResourceOpieConfig, SyncPrefWidget>();
}
}
@@ -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" );