Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp index 17263ae..b8c32d5 100644 --- a/kabc/plugins/file/resourcefile.cpp +++ b/kabc/plugins/file/resourcefile.cpp @@ -51,3 +51,3 @@ $Id$ #include "stdaddressbook.h" - +#define NO_DIRWATCH #include "resourcefile.h" @@ -57,2 +57,4 @@ $Id$ + + using namespace KABC; @@ -117,3 +119,3 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) - +#ifndef NO_DIRWATCH connect( &mDirWatch, SIGNAL( dirty(const QString&) ), SLOT( fileChanged() ) ); @@ -121,3 +123,3 @@ void ResourceFile::init( const QString &fileName, const QString &formatName ) connect( &mDirWatch, SIGNAL( deleted(const QString&) ), SLOT( fileChanged() ) ); - +#endif setFileName( fileName ); @@ -229,4 +231,5 @@ bool ResourceFile::save( Ticket *ticket ) //US ToDo: write backupfile +#ifndef NO_DIRWATCH mDirWatch.stopScan(); - +#endif QFile info; @@ -246,5 +249,5 @@ bool ResourceFile::save( Ticket *ticket ) addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); - +#ifndef NO_DIRWATCH mDirWatch.startScan(); - +#endif delete ticket; @@ -328,5 +331,5 @@ void ResourceFile::setFileName( const QString &fileName ) { +#ifndef NO_DIRWATCH mDirWatch.stopScan(); mDirWatch.removeFile( mFileName ); - mFileName = fileName; @@ -336,2 +339,5 @@ void ResourceFile::setFileName( const QString &fileName ) mDirWatch.startScan(); +#else + mFileName = fileName; +#endif |