diff options
author | Siteshwar Vashisht <siteshwar@gmail.com> | 2012-04-23 01:18:01 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-04-23 01:46:11 +0200 |
commit | cd6eee46a7405bc2365ada5ca7cd2daab01e06c0 (patch) | |
tree | f9c35fedba651e15fa2550804bcd9261c5aa1a91 /src/sync/syncmanager.cpp | |
parent | Fix opensearch add shortcut handling (diff) | |
download | rekonq-cd6eee46a7405bc2365ada5ca7cd2daab01e06c0.tar.xz |
Google Sync Bookmarks in rekonq!
- Added UI bits to configure Google Bookamrks Sync
- Implemented sync, 2-way merging local and remote bk
- Remember to not update local history while remotely
adding bookmarks
- Encode parameters of add bookmarks request while posting data.
- (adjam) fix compile warnings
This is the squashed commit of Situ's work on Google Bookmarks Sync
SQUASHED BY: adjam ;)
REVIEW: 104673
DIGEST: Google Bookmarks Sync
REVIEWED BY: adjam
Diffstat (limited to 'src/sync/syncmanager.cpp')
-rw-r--r-- | src/sync/syncmanager.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/sync/syncmanager.cpp b/src/sync/syncmanager.cpp index de14703c..29e76414 100644 --- a/src/sync/syncmanager.cpp +++ b/src/sync/syncmanager.cpp @@ -38,6 +38,7 @@ #include "syncassistant.h" #include "ftpsynchandler.h" +#include "googlesynchandler.h" // KDE Includes #include <klocalizedstring.h> @@ -68,10 +69,23 @@ void SyncManager::loadSettings() if (ReKonfig::syncEnabled()) { // reset syncer - if (_syncImplementation.isNull()) + if (!_syncImplementation.isNull()) { - // actually we have just FTP handler... + delete _syncImplementation.data(); + _syncImplementation.clear(); + } + + switch(ReKonfig::syncType()) + { + case 0: _syncImplementation = new FTPSyncHandler(this); + break; + case 1: + _syncImplementation = new GoogleSyncHandler(this); + break; + default: + kDebug() << "/dev/null"; + return; } _syncImplementation.data()->initialLoadAndCheck(); |