author | ulf69 <ulf69> | 2004-08-20 19:53:52 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-20 19:53:52 (UTC) |
commit | a3083042bb9c69193cc43105e6c9d045bd79e8b2 (patch) (unidiff) | |
tree | 6d89eb16d0661b03316117aca6f919339ef5df1d /kabc/plugins | |
parent | b42c4af4200c67802ee0cc57e10e1464903736b7 (diff) | |
download | kdepimpi-a3083042bb9c69193cc43105e6c9d045bd79e8b2.zip kdepimpi-a3083042bb9c69193cc43105e6c9d045bd79e8b2.tar.gz kdepimpi-a3083042bb9c69193cc43105e6c9d045bd79e8b2.tar.bz2 |
merged bugfix from KDE Head: Don't KDirWatch for own changes
-rw-r--r-- | kabc/plugins/dir/resourcedir.cpp | 3 | ||||
-rw-r--r-- | kabc/plugins/file/resourcefile.cpp | 9 | ||||
-rw-r--r-- | kabc/plugins/opie/resourceopie.cpp | 4 | ||||
-rw-r--r-- | kabc/plugins/qtopia/resourceqtopia.cpp | 3 | ||||
-rw-r--r-- | kabc/plugins/sharpdtm/resourcesharpdtm.cpp | 2 |
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 ) | |||
211 | bool ok = true; | 211 | bool ok = true; |
212 | 212 | ||
213 | mDirWatch.stopScan(); | ||
214 | |||
213 | for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { | 215 | for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { |
214 | if ( (*it).resource() != this || !(*it).changed() ) | 216 | if ( (*it).resource() != this || !(*it).changed() ) |
@@ -228,4 +230,5 @@ bool ResourceDir::save( Ticket *ticket ) | |||
228 | file.close(); | 230 | file.close(); |
229 | } | 231 | } |
232 | mDirWatch.startScan(); | ||
230 | 233 | ||
231 | delete ticket; | 234 | 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() | |||
205 | bool ResourceFile::save( Ticket *ticket ) | 205 | bool ResourceFile::save( Ticket *ticket ) |
206 | { | 206 | { |
207 | // qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); | 207 | // qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); |
208 | 208 | ||
209 | 209 | ||
@@ -226,4 +226,6 @@ bool ResourceFile::save( Ticket *ticket ) | |||
226 | 226 | ||
227 | //US ToDo: write backupfile | 227 | //US ToDo: write backupfile |
228 | mDirWatch.stopScan(); | ||
229 | |||
228 | QFile info; | 230 | QFile info; |
229 | info.setName( mFileName ); | 231 | info.setName( mFileName ); |
@@ -242,11 +244,10 @@ bool ResourceFile::save( Ticket *ticket ) | |||
242 | addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); | 244 | addressBook()->error( i18n( "Unable to save file '%1'." ).arg( mFileName ) ); |
243 | 245 | ||
246 | mDirWatch.startScan(); | ||
247 | |||
244 | delete ticket; | 248 | delete ticket; |
245 | unlock( mFileName ); | 249 | unlock( mFileName ); |
246 | 250 | ||
247 | return ok; | 251 | return ok; |
248 | |||
249 | qDebug("ResourceFile::save has to be changed"); | ||
250 | return true; | ||
251 | } | 252 | } |
252 | 253 | ||
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 ) | |||
212 | qDebug("ResourceOpie::save: %s", fileName().latin1()); | 212 | qDebug("ResourceOpie::save: %s", fileName().latin1()); |
213 | 213 | ||
214 | 214 | mDirWatch.stopScan(); | |
215 | 215 | ||
216 | KABC::AddressBook::Iterator it; | 216 | KABC::AddressBook::Iterator it; |
@@ -236,4 +236,6 @@ bool ResourceOpie::save( Ticket *ticket ) | |||
236 | mAccess->save(); | 236 | mAccess->save(); |
237 | 237 | ||
238 | mDirWatch.startScan(); | ||
239 | |||
238 | delete ticket; | 240 | delete ticket; |
239 | unlock( fileName() ); | 241 | 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 ) | |||
192 | qDebug("ResourceQtopia::save: %s", fileName().latin1()); | 192 | qDebug("ResourceQtopia::save: %s", fileName().latin1()); |
193 | 193 | ||
194 | mDirWatch.stopScan(); | ||
194 | 195 | ||
195 | KABC::AddressBook::Iterator it; | 196 | KABC::AddressBook::Iterator it; |
@@ -215,4 +216,6 @@ bool ResourceQtopia::save( Ticket *ticket ) | |||
215 | // mAccess->addressBookUpdated(); | 216 | // mAccess->addressBookUpdated(); |
216 | 217 | ||
218 | mDirWatch.startScan(); | ||
219 | |||
217 | delete ticket; | 220 | delete ticket; |
218 | unlock( fileName() ); | 221 | 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 ) | |||
198 | qDebug("ResourceSharpDTM::save: %s", fileName().latin1()); | 198 | qDebug("ResourceSharpDTM::save: %s", fileName().latin1()); |
199 | 199 | ||
200 | mDirWatch.stopScan(); | ||
200 | 201 | ||
201 | KABC::AddressBook::Iterator it; | 202 | KABC::AddressBook::Iterator it; |
@@ -231,4 +232,5 @@ bool ResourceSharpDTM::save( Ticket *ticket ) | |||
231 | //US mAccess->save(); | 232 | //US mAccess->save(); |
232 | 233 | ||
234 | mDirWatch.startScan(); | ||
233 | delete ticket; | 235 | delete ticket; |
234 | unlock( fileName() ); | 236 | unlock( fileName() ); |