author | ulf69 <ulf69> | 2004-07-14 14:52:15 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-07-14 14:52:15 (UTC) |
commit | cf7175c9a6b96cd11fb7f3cba459f5223aa4aacb (patch) (side-by-side diff) | |
tree | e14057a10fba52a7b2881f5bacb0d266e415bd83 /kabc/plugins | |
parent | 80b35ebb50cac5007c074a4900f518f48f704eac (diff) | |
download | kdepimpi-cf7175c9a6b96cd11fb7f3cba459f5223aa4aacb.zip kdepimpi-cf7175c9a6b96cd11fb7f3cba459f5223aa4aacb.tar.gz kdepimpi-cf7175c9a6b96cd11fb7f3cba459f5223aa4aacb.tar.bz2 |
added changes to support the kdirwatch implementation
-rw-r--r-- | kabc/plugins/dir/dir.pro | 2 | ||||
-rw-r--r-- | kabc/plugins/dir/dirE.pro | 2 | ||||
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 9 | ||||
-rw-r--r-- | kabc/plugins/file/file.pro | 2 | ||||
-rw-r--r-- | kabc/plugins/file/fileE.pro | 2 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 14 | ||||
-rw-r--r-- | kabc/plugins/opie/opieE.pro | 2 |
7 files changed, 10 insertions, 23 deletions
diff --git a/kabc/plugins/dir/dir.pro b/kabc/plugins/dir/dir.pro index 0023029..0555484 100644 --- a/kabc/plugins/dir/dir.pro +++ b/kabc/plugins/dir/dir.pro @@ -1,12 +1,12 @@ TEMPLATE = lib CONFIG += qt warn_on release #release debug TARGET = microkabc_dir -INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat +INCLUDEPATH += ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../qtcompat DESTDIR = ../../../bin #LIBS += -lmicrokde -lmicrokabc #LIBS += -L$(QPEDIR)/lib INTERFACES = \ diff --git a/kabc/plugins/dir/dirE.pro b/kabc/plugins/dir/dirE.pro index aceb28a..729f4ce 100644 --- a/kabc/plugins/dir/dirE.pro +++ b/kabc/plugins/dir/dirE.pro @@ -1,12 +1,12 @@ TEMPLATE = lib CONFIG += qt warn_on release #release debug TARGET = microkabc_dir -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 LIBS += -lmicrokde -lmicrokabc LIBS += -L$(QPEDIR)/lib diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp index 3cb5179..7825c6f 100644 --- a/kabc/plugins/dir/resourcedir.cpp +++ b/kabc/plugins/dir/resourcedir.cpp @@ -109,17 +109,15 @@ ResourceDir::ResourceDir( const KConfig *config ) else if (mFormatName == "binary") mFormat = new BinaryFormat(); else qDebug("ResourceFile::init format unknown !!! %s ", mFormatName.latin1()); */ -/*US we have no KDirWatch. SO simulate the signals from inside the apropriate methods connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( pathChanged() ) ); connect( &mDirWatch, SIGNAL( created(const QString&) ), SLOT( pathChanged() ) ); connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( pathChanged() ) ); -*/ setPath( path ); } ResourceDir::~ResourceDir() { @@ -295,25 +293,22 @@ void ResourceDir::unlock( const QString &path ) QFile::remove( mLockUniqueName ); addressBook()->emitAddressBookUnlocked(); } void ResourceDir::setPath( const QString &path ) { -/*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.stopScan(); mDirWatch.removeDir( mPath ); -*/ + mPath = path; -/*US ToDo: no synchronization so far. Has to be changed in the future mDirWatch.addDir( mPath, true ); mDirWatch.startScan(); -*/ //US simulate KDirWatch event - pathChanged(); +//US pathChanged(); } QString ResourceDir::path() const { return mPath; 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 @@ -1,12 +1,12 @@ TEMPLATE = lib 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 #LIBS += -L$(QPEDIR)/lib INTERFACES = \ 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 @@ -1,12 +1,12 @@ TEMPLATE = lib 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 LIBS += -lmicrokde -lmicrokabc LIBS += -L$(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 @@ -46,16 +46,12 @@ $Id$ #include "formatfactory.h" #include "resource.h" #include "resourcefileconfig.h" #include "stdaddressbook.h" -//US #include "../../formats/vcardformatplugin2.h" -//US #include "../../formats/binaryformat.h" - - #include "resourcefile.h" using namespace KABC; extern "C" #ifdef _WIN32_ @@ -123,17 +119,15 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) // qDebug("ResourceFile::init format BinaryFormat"); } else 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 ); } ResourceFile::~ResourceFile() { @@ -323,25 +317,23 @@ void ResourceFile::unlock( const QString &fileName ) QFile::remove( mLockUniqueName ); addressBook()->emitAddressBookUnlocked(); } 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 { return mFileName; } diff --git a/kabc/plugins/opie/opieE.pro b/kabc/plugins/opie/opieE.pro index 75a5dab..4048cc0 100644 --- a/kabc/plugins/opie/opieE.pro +++ b/kabc/plugins/opie/opieE.pro @@ -1,12 +1,12 @@ TEMPLATE = lib CONFIG += qt warn_on #release debug TARGET = microkabc_opie -INCLUDEPATH += ../.. ../../converter/opie ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../qtcompat $(QPEDIR)/include $(OPIEDIR)/include +INCLUDEPATH += ../.. ../../converter/opie ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../qtcompat $(QPEDIR)/include $(OPIEDIR)/include OBJECTS_DIR = obj/$(PLATFORM) MOC_DIR = moc/$(PLATFORM) DESTDIR = $(QPEDIR)/lib LIBS += -lmicrokde |