Diffstat (limited to 'pwmanager/pwmanager/pwmdoc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | pwmanager/pwmanager/pwmdoc.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp index 8869f3a..86b6273 100644 --- a/pwmanager/pwmanager/pwmdoc.cpp +++ b/pwmanager/pwmanager/pwmdoc.cpp @@ -1264,11 +1264,14 @@ bool PwMDoc::compressDta(string *d, char algo) case PWM_COMPRESS_GZIP: { CompressGzip comp; return comp.compress(d); - /*US } case PWM_COMPRESS_BZIP2: { + } +#ifndef PWM_EMBEDDED + case PWM_COMPRESS_BZIP2: { CompressBzip2 comp; return comp.compress(d); -*/ - } case PWM_COMPRESS_NONE: { + } +#endif + case PWM_COMPRESS_NONE: { return true; } default: { BUG(); @@ -1284,11 +1287,14 @@ bool PwMDoc::decompressDta(string *d, char algo) case PWM_COMPRESS_GZIP: { CompressGzip comp; return comp.decompress(d); - /*US } case PWM_COMPRESS_BZIP2: { + } +#ifndef PWM_EMBEDDED + case PWM_COMPRESS_BZIP2: { CompressBzip2 comp; return comp.decompress(d); - */ - } case PWM_COMPRESS_NONE: { + } +#endif + case PWM_COMPRESS_NONE: { return true; } } @@ -3123,15 +3129,12 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s //first check if we have a matching category in the local file const string* remotecat = syncRemote->getCategory(catRemote); - //US syncRemote->insertAddressee( inRemote, false ); - //US syncLocal->insertAddressee( inRemote, false ); syncLocal->addEntry(remotecat->c_str(), inRemote, true, false); ++addedPasswordsLocal; } else { // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); syncRemote->delEntry(catRemote, indexRemote, true); - //USsyncRemote->removeAddressee( inRemote ); ++deletedPasswordsRemote; } } @@ -3163,7 +3166,6 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s if ( inLocal->meta.update < mLastSync && mode != 4 ) { // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); syncLocal->delEntry(catLocal, indexLocal, true); - //USsyncLocal->removeAddressee( inLocal ); ++deletedPasswordsLocal; } else { if ( ! manager->mWriteBackExistingOnly ) { @@ -3173,7 +3175,6 @@ PwMerror PwMDoc::syncronize(KSyncManager* manager, PwMDoc* syncLocal , PwMDoc* s //first check if we have a matching category in the remote file const string* localcat = syncLocal->getCategory(catLocal); - //USsyncLocal->insertAddressee( inLocal, false ); PwMDataItem newEntry; newEntry = *inLocal; inRemote = &newEntry; @@ -3220,8 +3221,6 @@ int PwMDoc::takePwMDataItem( PwMDataItem* local, PwMDataItem* remote, QDateTime QDateTime localMod = local->meta.update; QDateTime remoteMod = remote->meta.update; - //US QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); - if ( localMod == remoteMod ) return 0; |