summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/file/resourcefile.cpp
authorzautrix <zautrix>2004-07-07 03:28:52 (UTC)
committer zautrix <zautrix>2004-07-07 03:28:52 (UTC)
commit816db8f76a1fd8b5cc586dfd5ebf8d6298221801 (patch) (unidiff)
treee418207a02e60c0807e75731a19c44a58d0fb896 /kabc/plugins/file/resourcefile.cpp
parent3db5c4e190d1031f2471516f8a52114f06d1a3eb (diff)
downloadkdepimpi-816db8f76a1fd8b5cc586dfd5ebf8d6298221801.zip
kdepimpi-816db8f76a1fd8b5cc586dfd5ebf8d6298221801.tar.gz
kdepimpi-816db8f76a1fd8b5cc586dfd5ebf8d6298221801.tar.bz2
Changed some strings. Removed some kdebug
Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/file/resourcefile.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kabc/plugins/file/resourcefile.cpp b/kabc/plugins/file/resourcefile.cpp
index 80af841..3920f69 100644
--- a/kabc/plugins/file/resourcefile.cpp
+++ b/kabc/plugins/file/resourcefile.cpp
@@ -191,13 +191,13 @@ bool ResourceFile::doOpen()
191void ResourceFile::doClose() 191void ResourceFile::doClose()
192{ 192{
193} 193}
194 194
195bool ResourceFile::load() 195bool ResourceFile::load()
196{ 196{
197 kdDebug(5700) << "ResourceFile::load(): '" << mFileName << "'" << endl; 197
198 198
199 QFile file( mFileName ); 199 QFile file( mFileName );
200 if ( !file.open( IO_ReadOnly ) ) { 200 if ( !file.open( IO_ReadOnly ) ) {
201 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) ); 201 addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) );
202 return false; 202 return false;
203 } 203 }
@@ -207,13 +207,13 @@ bool ResourceFile::load()
207 return mFormat->loadAll( addressBook(), this, &file ); 207 return mFormat->loadAll( addressBook(), this, &file );
208} 208}
209 209
210bool ResourceFile::save( Ticket *ticket ) 210bool ResourceFile::save( Ticket *ticket )
211{ 211{
212// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1()); 212// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1());
213 kdDebug(5700) << "ResourceFile::save()" << endl; 213
214 214
215 // create backup file 215 // create backup file
216 QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() ); 216 QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() );
217 217
218/*US we use a simpler method to create a backupfile 218/*US we use a simpler method to create a backupfile
219 219
@@ -254,24 +254,24 @@ bool ResourceFile::save( Ticket *ticket )
254 qDebug("ResourceFile::save has to be changed"); 254 qDebug("ResourceFile::save has to be changed");
255 return true; 255 return true;
256} 256}
257 257
258bool ResourceFile::lock( const QString &fileName ) 258bool ResourceFile::lock( const QString &fileName )
259{ 259{
260 kdDebug(5700) << "ResourceFile::lock()" << endl; 260
261 261
262 QString fn = fileName; 262 QString fn = fileName;
263 263
264//US change the implementation how the lockfilename is getting created 264//US change the implementation how the lockfilename is getting created
265//US fn.replace( QRegExp("/"), "_" ); 265//US fn.replace( QRegExp("/"), "_" );
266//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" ); 266//US QString lockName = locateLocal( "data", "kabc/lock/" + fn + ".lock" );
267 267
268 KURL url(fn); 268 KURL url(fn);
269 QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" ); 269 QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" );
270 270
271 kdDebug(5700) << "-- lock name: " << lockName << endl; 271
272 272
273 if (QFile::exists( lockName )) return false; 273 if (QFile::exists( lockName )) return false;
274 274
275 QString lockUniqueName; 275 QString lockUniqueName;
276 lockUniqueName = fn + KApplication::randomString( 8 ); 276 lockUniqueName = fn + KApplication::randomString( 8 );
277 277