summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/pwmdoc.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index ddbf4f2..17cb74a 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -3309,7 +3309,27 @@ int PwMDoc::takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime
void PwMDoc::removeSyncInfo( QString syncProfile)
{
- qDebug("PwMDoc::not implemented: removeSyncInfo for profile %s ", syncProfile.latin1());
+ bool res, found;
+ unsigned int count, i;
+ if ( syncProfile.isEmpty() ) {
+ count = numSyncDataEntries();
+ for (i = count; count > 0; count-- ) {
+ res = delSyncDataEntry(i-1, false);
+ if (res == false) {
+ qDebug("PwMDoc::removeSyncInfo: could not remove syncprofile");
+ }
+ }
+ } else {
+ found = findSyncData(syncProfile, &count);
+ if (found == true)
+ {
+ res = delSyncDataEntry(count, false);
+ if (res == false) {
+ qDebug("PwMDoc::removeSyncInfo: could not remove %s", syncProfile.latin1());
+
+ }
+ }
+ }
}