From cf7175c9a6b96cd11fb7f3cba459f5223aa4aacb Mon Sep 17 00:00:00 2001 From: ulf69 Date: Wed, 14 Jul 2004 14:52:15 +0000 Subject: added changes to support the kdirwatch implementation --- (limited to 'kabc/plugins/file') diff --git a/kabc/plugins/file/file.pro b/kabc/plugins/file/file.pro index 7cf7c58..32555a2 100644 --- a/kabc/plugins/file/file.pro +++ b/kabc/plugins/file/file.pro @@ -3,7 +3,7 @@ CONFIG += qt warn_on release #release debug TARGET = microkabc_file -INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat +INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../qtcompat DESTDIR = ../../../bin #LIBS += -lmicrokde -lmicrokabc @@ -32,4 +32,4 @@ LIBS += ../../../bin/microkdepim.lib LIBS += ../../../bin/microkcal.lib LIBS += ../../../bin/microkde.lib LIBS += ../../../bin/microkabc.lib -} \ No newline at end of file +} diff --git a/kabc/plugins/file/fileE.pro b/kabc/plugins/file/fileE.pro index 2d17a8f..d19a26d 100644 --- a/kabc/plugins/file/fileE.pro +++ b/kabc/plugins/file/fileE.pro @@ -3,7 +3,7 @@ CONFIG += qt warn_on release #release debug TARGET = microkabc_file -INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat +INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../qtcompat OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 2d20706..9f9b00f 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -49,10 +49,6 @@ $Id$ #include "resourcefileconfig.h" #include "stdaddressbook.h" -//US #include "../../formats/vcardformatplugin2.h" -//US #include "../../formats/binaryformat.h" - - #include "resourcefile.h" using namespace KABC; @@ -126,11 +122,9 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) qDebug("ResourceFile::init format unknown !!! %s ", formatName.latin1()); */ -/*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( fileChanged() ) ); connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); -*/ setFileName( fileName ); } @@ -326,19 +320,17 @@ void ResourceFile::unlock( const QString &fileName ) void ResourceFile::setFileName( const QString &fileName ) { -/*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.stopScan(); mDirWatch.removeFile( mFileName ); -*/ + mFileName = fileName; -/*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.addFile( mFileName ); mDirWatch.startScan(); -*/ + //US simulate KDirWatch event - fileChanged(); +//US fileChanged(); } QString ResourceFile::fileName() const -- cgit v0.9.0.2