diff options
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(); |