From cd6eee46a7405bc2365ada5ca7cd2daab01e06c0 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Mon, 23 Apr 2012 01:18:01 +0200 Subject: 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 --- src/sync/syncmanager.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/sync/syncmanager.cpp') 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 @@ -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(); -- cgit v1.2.1