summaryrefslogtreecommitdiffabout
path: root/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
Side-by-side diff
Diffstat (limited to 'kabc/plugins/sharpdtm/resourcesharpdtm.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/plugins/sharpdtm/resourcesharpdtm.cpp30
1 files changed, 6 insertions, 24 deletions
diff --git a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
index 14f272d..70c3718 100644
--- a/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
+++ b/kabc/plugins/sharpdtm/resourcesharpdtm.cpp
@@ -249,7 +249,12 @@ bool ResourceSharpDTM::lock( const QString &lockfileName )
kdDebug(5700) << "-- lock name: " << lockName << endl;
- if (QFile::exists( lockName )) return false;
+ if (QFile::exists( lockName ))
+ {
+ qDebug("ResourceSharpDTM::lock: lockfile %s already exists. (Delete it before continuing if nobody else is accessing the resourcefile %s)", lockName.latin1(), fileName());
+ return false;
+ }
+
QString lockUniqueName;
lockUniqueName = fn + KApplication::randomString( 8 );
@@ -328,28 +333,5 @@ void ResourceSharpDTM::cleanUp()
unlock( fileName() );
}
-/**
- * This method returns the number of elements that are currently in the resource.
- */
-int ResourceSharpDTM::count() const
-{
- if (mAccess != 0)
- return mAccess->count();
- else
- return 0;
-}
-
-
-/**
- * This method removes all elements from the resource!! (Not from the addressbook)
- */
-bool ResourceSharpDTM::clear()
-{
- if (mAccess != 0)
- return mAccess->deleteCard(0, SlZDataBase::AllCard );
- else
- return false;
-}
-