summaryrefslogtreecommitdiffabout
path: root/pwmanager
Unidiff
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/pwm.cpp6
-rw-r--r--pwmanager/pwmanager/pwm.h3
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp5
-rw-r--r--pwmanager/pwmanager/pwmdoc.h1
4 files changed, 13 insertions, 2 deletions
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index 2b8f2fa..6ae6e28 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -1451,22 +1451,28 @@ bool PwM::sync(KSyncManager* manager, QString filename, int mode)
1451 PWM_ASSERT(curDoc()); 1451 PWM_ASSERT(curDoc());
1452 1452
1453 bool ret = curDoc()->sync(manager, filename, mode); 1453 bool ret = curDoc()->sync(manager, filename, mode);
1454 1454
1455 qDebug("PwM::sync save now: ret=%i", ret); 1455 qDebug("PwM::sync save now: ret=%i", ret);
1456 1456
1457 if (ret == true) { 1457 if (ret == true) {
1458 //US BUG: what can we call here to update the view of the current doc? 1458 //US BUG: what can we call here to update the view of the current doc?
1459 //mViewManager->refreshView(); 1459 //mViewManager->refreshView();
1460 1460
1461 //US curDoc()->sync sets the dirtyFlag in case the sync was successfull. 1461 //US curDoc()->sync sets the dirtyFlag in case the sync was successfull.
1462 save(); 1462 save();
1463 } 1463 }
1464 1464
1465 return ret; 1465 return ret;
1466} 1466}
1467
1468void PwM::removeSyncInfo( QString syncProfile)
1469{
1470 qDebug("PWM::not implemented: removeSyncInfo for profile %s ", syncProfile.latin1());
1471}
1472
1467#endif 1473#endif
1468 1474
1469 1475
1470#ifndef PWM_EMBEDDED 1476#ifndef PWM_EMBEDDED
1471#include "pwm.moc" 1477#include "pwm.moc"
1472#endif 1478#endif
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 5822d59..fb34bca 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -264,33 +264,34 @@ protected:
264 KPopupMenu *helpPopup; 264 KPopupMenu *helpPopup;
265 /** "export" popup-menu */ 265 /** "export" popup-menu */
266 KPopupMenu *exportPopup; 266 KPopupMenu *exportPopup;
267 /** "import" popup-menu */ 267 /** "import" popup-menu */
268 KPopupMenu *importPopup; 268 KPopupMenu *importPopup;
269 /** force quit this window? */ 269 /** force quit this window? */
270 bool forceQuit; 270 bool forceQuit;
271 /** force minimize this window to the tray */ 271 /** force minimize this window to the tray */
272 bool forceMinimizeToTray; 272 bool forceMinimizeToTray;
273 273
274 274
275 275
276 276
277 private: 277 private:
278#ifdef PWM_EMBEDDED 278#ifdef PWM_EMBEDDED
279 //this are the overwritten callbackmethods from the syncinterface 279 //this are the overwritten callbackmethods from the syncinterface
280 virtual bool sync(KSyncManager* manager, QString filename, int mode); 280 virtual bool sync(KSyncManager* manager, QString filename, int mode);
281 virtual void removeSyncInfo( QString syncProfile);
281 282
282 // LR ******************************* 283 // LR *******************************
283 // sync stuff! 284 // sync stuff!
284 QPopupMenu *syncPopup; 285 QPopupMenu *syncPopup;
285 KSyncManager* syncManager; 286 KSyncManager* syncManager;
286#endif 287#endif
287 288
288 289
289 290
290 291
291 292
292 293
293 294
294 295
295}; 296};
296 297
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index cf8690f..fd17ce5 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -3291,33 +3291,36 @@ int PwMDoc::takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime
3291 } 3291 }
3292 break; 3292 break;
3293 case SYNC_PREF_FORCE_LOCAL: 3293 case SYNC_PREF_FORCE_LOCAL:
3294 return 1; 3294 return 1;
3295 break; 3295 break;
3296 case SYNC_PREF_FORCE_REMOTE: 3296 case SYNC_PREF_FORCE_REMOTE:
3297 return 2; 3297 return 2;
3298 break; 3298 break;
3299 3299
3300 default: 3300 default:
3301 // SYNC_PREF_TAKE_BOTH not implemented 3301 // SYNC_PREF_TAKE_BOTH not implemented
3302 break; 3302 break;
3303 } 3303 }
3304 return 0; 3304 return 0;
3305} 3305}
3306 3306
3307 3307void PwMDoc::removeSyncInfo( QString syncProfile)
3308{
3309 qDebug("PwMDoc::not implemented: removeSyncInfo for profile %s ", syncProfile.latin1());
3310}
3308 3311
3309 3312
3310//this are the overwritten callbackmethods from the syncinterface 3313//this are the overwritten callbackmethods from the syncinterface
3311bool PwMDoc::sync(KSyncManager* manager, QString filename, int mode) 3314bool PwMDoc::sync(KSyncManager* manager, QString filename, int mode)
3312{ 3315{
3313 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3316 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3314 3317
3315 //1) unlock local file first if necessary (ask for password) 3318 //1) unlock local file first if necessary (ask for password)
3316 if (this->isDeepLocked()) { 3319 if (this->isDeepLocked()) {
3317 PwMerror ret = this->deepLock(false); 3320 PwMerror ret = this->deepLock(false);
3318 if (ret != e_success) 3321 if (ret != e_success)
3319 return false; 3322 return false;
3320 } 3323 }
3321 3324
3322 //2) construct and open a new doc on the stack(automatic cleanup of remote file). 3325 //2) construct and open a new doc on the stack(automatic cleanup of remote file).
3323 PwMDoc syncTarget(this, "synctarget"); 3326 PwMDoc syncTarget(this, "synctarget");
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 55e3231..e419c24 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -749,32 +749,33 @@ protected:
749 749
750 750
751 public: 751 public:
752#ifdef PWM_EMBEDDED 752#ifdef PWM_EMBEDDED
753 //US ENH: this is the magic function that syncronizes the local doc with the remote doc. 753 //US ENH: this is the magic function that syncronizes the local doc with the remote doc.
754 PwMerror syncronize(KSyncManager* manager, PwMDoc* syncLocal, PwMDoc* syncRemote, int mode ); 754 PwMerror syncronize(KSyncManager* manager, PwMDoc* syncLocal, PwMDoc* syncRemote, int mode );
755 755
756 //takePwMDataItem returns the following values 756 //takePwMDataItem returns the following values
757 // 0 equal 757 // 0 equal
758 // 1 take local 758 // 1 take local
759 // 2 take remote 759 // 2 take remote
760 // 3 cancel 760 // 3 cancel
761 int takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime lastSync, int mode , bool full ); 761 int takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime lastSync, int mode , bool full );
762 762
763 //the following methods are the overwritten callbackmethods from the syncinterface 763 //the following methods are the overwritten callbackmethods from the syncinterface
764 virtual bool sync(KSyncManager* manager, QString filename, int mode); 764 virtual bool sync(KSyncManager* manager, QString filename, int mode);
765 virtual void removeSyncInfo( QString syncProfile);
765 766
766#endif 767#endif
767 private: 768 private:
768 //US ENH: helpermethods to access the sync data for a certain syncname. 769 //US ENH: helpermethods to access the sync data for a certain syncname.
769 // It returns the syncdatas index 770 // It returns the syncdatas index
770 bool findSyncData(const QString &syncname, unsigned int *index); 771 bool findSyncData(const QString &syncname, unsigned int *index);
771 772
772 /** add new syncdataentry */ 773 /** add new syncdataentry */
773 PwMerror addSyncDataEntry(PwMSyncItem *d, bool dontFlagDirty = false); 774 PwMerror addSyncDataEntry(PwMSyncItem *d, bool dontFlagDirty = false);
774 775
775 /** returns a pointer to the syncdata */ 776 /** returns a pointer to the syncdata */
776 PwMSyncItem* getSyncDataEntry(unsigned int index) 777 PwMSyncItem* getSyncDataEntry(unsigned int index)
777 { return &(dti.syncDta[index]); } 778 { return &(dti.syncDta[index]); }
778 779
779 /** delete entry */ 780 /** delete entry */
780 bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false); 781 bool delSyncDataEntry(unsigned int index, bool dontFlagDirty = false);