summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/dir/resourcedir.cpp
Side-by-side diff
Diffstat (limited to 'kabc/plugins/dir/resourcedir.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/dir/resourcedir.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index 52863d5..d978e61 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -59,2 +59,3 @@ $Id$
#include "resourcedir.h"
+#include "syncwidget.h"
@@ -64,3 +65,3 @@ extern "C"
#ifdef _WIN32_
-__declspec(dllexport)
+__declspec(dllexport)
#else
@@ -72,3 +73,3 @@ __declspec(dllexport)
{
- return new KRES::PluginFactory<ResourceDir,ResourceDirConfig>();
+ return new KRES::PluginFactory<ResourceDir,ResourceDirConfig, KRES::SyncWidget>();
}
@@ -78,4 +79,4 @@ __declspec(dllexport)
-ResourceDir::ResourceDir( const KConfig *config )
- : Resource( config )
+ResourceDir::ResourceDir( const KConfig *config, bool syncable )
+ : Resource( config, syncable )
{
@@ -103,3 +104,3 @@ ResourceDir::ResourceDir( const KConfig *config )
-/*US
+/*US
//US qDebug("ResourceDir::ResourceDir initialized with format %s ", mFormatName.latin1());
@@ -112,3 +113,3 @@ ResourceDir::ResourceDir( const KConfig *config )
*/
-
+
connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) );
@@ -127,4 +128,4 @@ ResourceDir::~ResourceDir()
void ResourceDir::writeConfig( KConfig *config )
-{
- config->setGroup( "Resource_" + identifier() );
+{
+ config->setGroup( "Resource_" + identifier() );
Resource::writeConfig( config );
@@ -243,6 +244,6 @@ bool ResourceDir::lock( const QString &path )
//US QString lockName = locateLocal( "data", "kabc/lock/" + p + ".lock" );
- KURL url(p);
+ KURL url(p);
QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" );
-
-
+
+
kdDebug(5700) << "-- lock name: " << lockName << endl;
@@ -254,6 +255,6 @@ bool ResourceDir::lock( const QString &path )
- url = lockUniqueName;
+ url = lockUniqueName;
//US mLockUniqueName = locateLocal( "data", "kabc/lock/" + lockUniqueName );
mLockUniqueName = locateLocal( "data", "kabc/lock/" + url.fileName() );
-
+
kdDebug(5700) << "-- lock unique name: " << mLockUniqueName << endl;
@@ -287,3 +288,3 @@ void ResourceDir::unlock( const QString &path )
//US QString lockName = locate( "data", "kabc/lock/" + p + ".lock" );
- KURL url(p);
+ KURL url(p);
QString lockName = locate( "data", "kabc/lock/" + url.fileName() + ".lock" );
@@ -299,3 +300,3 @@ void ResourceDir::setPath( const QString &path )
mDirWatch.removeDir( mPath );
-
+
mPath = path;
@@ -305,3 +306,3 @@ void ResourceDir::setPath( const QString &path )
-//US simulate KDirWatch event
+//US simulate KDirWatch event
//US pathChanged();
@@ -324,3 +325,3 @@ void ResourceDir::setFormat( const QString &format )
mFormat = factory->format( mFormatName );
-/*US
+/*US
qDebug("ResourceDir::setFormat initialized with format %s ", format.latin1());