summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorulf69 <ulf69>2004-10-29 17:31:58 (UTC)
committer ulf69 <ulf69>2004-10-29 17:31:58 (UTC)
commitb55890913f4c81bd2fc3719cf7c97e8ab1f47077 (patch) (unidiff)
tree95da19ca855001977e046ddd761d8b9f6cfd66c9 /pwmanager
parenta507e84cbf0afb76570ca1d82bee24bc68faa513 (diff)
downloadkdepimpi-b55890913f4c81bd2fc3719cf7c97e8ab1f47077.zip
kdepimpi-b55890913f4c81bd2fc3719cf7c97e8ab1f47077.tar.gz
kdepimpi-b55890913f4c81bd2fc3719cf7c97e8ab1f47077.tar.bz2
implemented removeSyncProfile
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp22
-rw-r--r--pwmanager/pwmanager/pwmdoc.h4
2 files changed, 25 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
@@ -3306,13 +3306,33 @@ int PwMDoc::takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime
3306 } 3306 }
3307 return 0; 3307 return 0;
3308} 3308}
3309 3309
3310void PwMDoc::removeSyncInfo( QString syncProfile) 3310void PwMDoc::removeSyncInfo( QString syncProfile)
3311{ 3311{
3312 qDebug("PwMDoc::not implemented: removeSyncInfo for profile %s ", syncProfile.latin1()); 3312 bool res, found;
3313 unsigned int count, i;
3314 if ( syncProfile.isEmpty() ) {
3315 count = numSyncDataEntries();
3316 for (i = count; count > 0; count-- ) {
3317 res = delSyncDataEntry(i-1, false);
3318 if (res == false) {
3319 qDebug("PwMDoc::removeSyncInfo: could not remove syncprofile");
3320 }
3321 }
3322 } else {
3323 found = findSyncData(syncProfile, &count);
3324 if (found == true)
3325 {
3326 res = delSyncDataEntry(count, false);
3327 if (res == false) {
3328 qDebug("PwMDoc::removeSyncInfo: could not remove %s", syncProfile.latin1());
3329
3330 }
3331 }
3332 }
3313} 3333}
3314 3334
3315 3335
3316//this are the overwritten callbackmethods from the syncinterface 3336//this are the overwritten callbackmethods from the syncinterface
3317bool PwMDoc::sync(KSyncManager* manager, QString filename, int mode) 3337bool PwMDoc::sync(KSyncManager* manager, QString filename, int mode)
3318{ 3338{
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index ef81dfc..138dd3d 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -811,12 +811,16 @@ protected:
811 PwMSyncItem* getSyncDataEntry(unsigned int index) 811 PwMSyncItem* getSyncDataEntry(unsigned int index)
812 { return &(dti.syncDta[index]); } 812 { return &(dti.syncDta[index]); }
813 813
814 /** delete entry */ 814 /** delete entry */
815 bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false); 815 bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false);
816 816
817 /** returns number of categories */
818 unsigned int numSyncDataEntries()
819 { return dti.syncDta.size(); }
820
817 PwMDataItem* findEntryByID(const QString &uid, unsigned int *category, unsigned int *index); 821 PwMDataItem* findEntryByID(const QString &uid, unsigned int *category, unsigned int *index);
818 822
819 QStringList getIDEntryList(); 823 QStringList getIDEntryList();
820 824
821}; 825};
822 826