summaryrefslogtreecommitdiffabout
path: root/kabc/plugins
authorulf69 <ulf69>2004-08-20 19:53:52 (UTC)
committer ulf69 <ulf69>2004-08-20 19:53:52 (UTC)
commita3083042bb9c69193cc43105e6c9d045bd79e8b2 (patch) (side-by-side diff)
tree6d89eb16d0661b03316117aca6f919339ef5df1d /kabc/plugins
parentb42c4af4200c67802ee0cc57e10e1464903736b7 (diff)
downloadkdepimpi-a3083042bb9c69193cc43105e6c9d045bd79e8b2.zip
kdepimpi-a3083042bb9c69193cc43105e6c9d045bd79e8b2.tar.gz
kdepimpi-a3083042bb9c69193cc43105e6c9d045bd79e8b2.tar.bz2
merged bugfix from KDE Head: Don't KDirWatch for own changes
Diffstat (limited to 'kabc/plugins') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/dir/resourcedir.cpp3
-rw-r--r--kabc/plugins/file/resourcefile.cpp9
-rw-r--r--kabc/plugins/opie/resourceopie.cpp4
-rw-r--r--kabc/plugins/qtopia/resourceqtopia.cpp3
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp2
5 files changed, 16 insertions, 5 deletions
diff --git a/kabc/plugins/dir/resourcedir.cpp b/kabc/plugins/dir/resourcedir.cpp
index eccd482..fac06a1 100644
--- a/kabc/plugins/dir/resourcedir.cpp
+++ b/kabc/plugins/dir/resourcedir.cpp
@@ -211,4 +211,6 @@ bool ResourceDir::save( Ticket *ticket )
bool ok = true;
+ mDirWatch.stopScan();
+
for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
if ( (*it).resource() != this || !(*it).changed() )
@@ -228,4 +230,5 @@ bool ResourceDir::save( Ticket *ticket )
file.close();
}
+ mDirWatch.startScan();
delete ticket;
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index da2e4d7..fa6bc49 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -205,5 +205,5 @@ bool ResourceFile::load()
bool ResourceFile::save( Ticket *ticket )
{
-// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1());
+// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1());
@@ -226,4 +226,6 @@ bool ResourceFile::save( Ticket *ticket )
//US ToDo: write backupfile
+ mDirWatch.stopScan();
+
QFile info;
info.setName( mFileName );
@@ -242,11 +244,10 @@ bool ResourceFile::save( Ticket *ticket )
addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) );
+ mDirWatch.startScan();
+
delete ticket;
unlock( mFileName );
return ok;
-
- qDebug("ResourceFile::save has to be changed");
- return true;
}
diff --git a/kabc/plugins/opie/resourceopie.cpp b/kabc/plugins/opie/resourceopie.cpp
index 4b811e9..22237dc 100644
--- a/kabc/plugins/opie/resourceopie.cpp
+++ b/kabc/plugins/opie/resourceopie.cpp
@@ -212,5 +212,5 @@ bool ResourceOpie::save( Ticket *ticket )
qDebug("ResourceOpie::save: %s", fileName().latin1());
-
+ mDirWatch.stopScan();
KABC::AddressBook::Iterator it;
@@ -236,4 +236,6 @@ bool ResourceOpie::save( Ticket *ticket )
mAccess->save();
+ mDirWatch.startScan();
+
delete ticket;
unlock( fileName() );
diff --git a/kabc/plugins/qtopia/resourceqtopia.cpp b/kabc/plugins/qtopia/resourceqtopia.cpp
index 93a4d33..48a9f22 100644
--- a/kabc/plugins/qtopia/resourceqtopia.cpp
+++ b/kabc/plugins/qtopia/resourceqtopia.cpp
@@ -192,4 +192,5 @@ bool ResourceQtopia::save( Ticket *ticket )
qDebug("ResourceQtopia::save: %s", fileName().latin1());
+ mDirWatch.stopScan();
KABC::AddressBook::Iterator it;
@@ -215,4 +216,6 @@ bool ResourceQtopia::save( Ticket *ticket )
// mAccess->addressBookUpdated();
+ mDirWatch.startScan();
+
delete ticket;
unlock( fileName() );
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index b63df0c..8a795e9 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -198,4 +198,5 @@ bool ResourceSharpDTM::save( Ticket *ticket )
qDebug("ResourceSharpDTM::save: %s", fileName().latin1());
+ mDirWatch.stopScan();
KABC::AddressBook::Iterator it;
@@ -231,4 +232,5 @@ bool ResourceSharpDTM::save( Ticket *ticket )
//US mAccess->save();
+ mDirWatch.startScan();
delete ticket;
unlock( fileName() );