summaryrefslogtreecommitdiffabout
path: root/kabc
Unidiff
Diffstat (limited to 'kabc') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/addressbook.cpp2
-rw-r--r--kabc/plugins/file/resourcefile.cpp8
-rw-r--r--kabc/stdaddressbook.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 97bd3ef..0838157 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -248,13 +248,13 @@ AddressBook::~AddressBook()
248//US delete d->mErrorHandler; d->mErrorHandler = 0; 248//US delete d->mErrorHandler; d->mErrorHandler = 0;
249 delete d; d = 0; 249 delete d; d = 0;
250} 250}
251 251
252bool AddressBook::load() 252bool AddressBook::load()
253{ 253{
254 kdDebug(5700) << "AddressBook::load()" << endl; 254
255 255
256 clear(); 256 clear();
257 257
258 KRES::Manager<Resource>::ActiveIterator it; 258 KRES::Manager<Resource>::ActiveIterator it;
259 bool ok = true; 259 bool ok = true;
260 for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it ) 260 for ( it = d->mManager->activeBegin(); it != d->mManager->activeEnd(); ++it )
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
diff --git a/kabc/stdaddressbook.cpp b/kabc/stdaddressbook.cpp
index 075f12f..1e00cc6 100644
--- a/kabc/stdaddressbook.cpp
+++ b/kabc/stdaddressbook.cpp
@@ -149,13 +149,13 @@ void StdAddressBook::init( bool )
149 res = manager->createResource( "file" ); 149 res = manager->createResource( "file" );
150 if ( res ) 150 if ( res )
151 { 151 {
152 addResource( res ); 152 addResource( res );
153 } 153 }
154 else 154 else
155 kdDebug(5700) << "No resource available!!!" << endl; 155 qDebug(" No resource available!!!");
156 } 156 }
157 157
158 setStandardResource( res ); 158 setStandardResource( res );
159 manager->writeConfig(); 159 manager->writeConfig();
160 160
161 load(); 161 load();