summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/file/resourcefile.cpp
Side-by-side diff
Diffstat (limited to 'kabc/plugins/file/resourcefile.cpp') (more/less context) (show 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
@@ -193,9 +193,9 @@ void ResourceFile::doClose()
}
bool ResourceFile::load()
{
- kdDebug(5700) << "ResourceFile::load(): '" << mFileName << "'" << endl;
+
QFile file( mFileName );
if ( !file.open( IO_ReadOnly ) ) {
addressBook()->error( i18n( "Unable to open file '%1'." ).arg( mFileName ) );
@@ -209,9 +209,9 @@ bool ResourceFile::load()
bool ResourceFile::save( Ticket *ticket )
{
// qDebug("ResourceFile::save format %s, %s", mFileName.latin1(), mFormatName.latin1());
- kdDebug(5700) << "ResourceFile::save()" << endl;
+
// create backup file
QString extension = "_" + QString::number( QDate::currentDate().dayOfWeek() );
@@ -256,9 +256,9 @@ bool ResourceFile::save( Ticket *ticket )
}
bool ResourceFile::lock( const QString &fileName )
{
- kdDebug(5700) << "ResourceFile::lock()" << endl;
+
QString fn = fileName;
//US change the implementation how the lockfilename is getting created
@@ -267,9 +267,9 @@ bool ResourceFile::lock( const QString &fileName )
KURL url(fn);
QString lockName = locateLocal( "data", "kabc/lock/" + url.fileName() + ".lock" );
- kdDebug(5700) << "-- lock name: " << lockName << endl;
+
if (QFile::exists( lockName )) return false;
QString lockUniqueName;