diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2011-12-09 15:29:56 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-12-12 16:40:29 +0100 |
commit | c2bbd9066ae8b6902d51b8d9782702252eec5d95 (patch) | |
tree | 03b2d030bf08433f1fc346d7ef8b81adeee861c1 /src/sync/syncmanager.cpp | |
parent | Rebase fix (diff) | |
download | rekonq-c2bbd9066ae8b6902d51b8d9782702252eec5d95.tar.xz |
Sync improvements, last bunch!
Improved code division (it will be super easy now adding a new handler)
Added a new config UI (QWizard based)
Diffstat (limited to 'src/sync/syncmanager.cpp')
-rw-r--r-- | src/sync/syncmanager.cpp | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/src/sync/syncmanager.cpp b/src/sync/syncmanager.cpp index 41a60179..efd0ffd3 100644 --- a/src/sync/syncmanager.cpp +++ b/src/sync/syncmanager.cpp @@ -35,7 +35,8 @@ #include "application.h" #include "bookmarkmanager.h" #include "historymanager.h" -#include "syncwidget.h" + +#include "syncassistant.h" #include "ftpsynchandler.h" // KDE Includes @@ -63,7 +64,16 @@ void SyncManager::loadSettings() { if (ReKonfig::syncEnabled()) { - resetSyncer(); + // reset syncer + if (_syncImplementation.isNull()) + { + // actually we have just FTP handler... + _syncImplementation = new FTPSyncHandler(this); + } + + _syncImplementation.data()->initialLoadAndCheck(); + + // --- Connect syncmanager to bookmarks & history manager // bookmarks ReKonfig::syncBookmarks() @@ -92,32 +102,13 @@ void SyncManager::loadSettings() void SyncManager::showSettings() { - QPointer<KDialog> dialog = new KDialog(); - dialog->setCaption(i18nc("@title:window", "Sync Settings")); - dialog->setButtons(KDialog::Ok | KDialog::Cancel); - - SyncWidget widget; - dialog->setMainWidget(&widget); - connect(dialog, SIGNAL(okClicked()), &widget, SLOT(save())); - connect(dialog, SIGNAL(okClicked()), this, SLOT(loadSettings())); + QPointer<SyncAssistant> dialog = new SyncAssistant(); dialog->exec(); dialog->deleteLater(); } -void SyncManager::resetSyncer() -{ - if (_syncImplementation.isNull()) - { - // actually we have just FTP handler... - _syncImplementation = new FTPSyncHandler(this); - } - - _syncImplementation.data()->firstTimeSync(); -} - - // --------------------------------------------------------------------------------------- |