From 9f5fdbf83ebcfbf4efa0f2dd0cf0bdbe1922445e Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 20 Nov 2011 12:15:15 +0100 Subject: here we are, rekonq ftp remote sync done! With this commit, I think we reached the "sync" status with remote ftp sites. This means we basically have a first sync feature and we can heavily test it to eventually add more options in the future (webdav? ownCloud? firefox Sync? etc...) --- src/sync/syncmanager.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/sync/syncmanager.cpp') diff --git a/src/sync/syncmanager.cpp b/src/sync/syncmanager.cpp index b6206e3a..b1da8c00 100644 --- a/src/sync/syncmanager.cpp +++ b/src/sync/syncmanager.cpp @@ -103,10 +103,13 @@ void SyncManager::firstTimeSync() // Bookmarks if (ReKonfig::syncBookmarks()) { - _remoteBookmarksUrl = QUrl::fromUserInput(ReKonfig::syncUrl()); + _remoteBookmarksUrl = QUrl(); + _remoteBookmarksUrl.setHost(ReKonfig::syncHost()); + _remoteBookmarksUrl.setScheme("ftp"); _remoteBookmarksUrl.setUserName(ReKonfig::syncUser()); _remoteBookmarksUrl.setPassword(ReKonfig::syncPass()); - _remoteBookmarksUrl.setPath(QL1S("/home/") + ReKonfig::syncUser() + QL1S("/bookmarks.xml")); + _remoteBookmarksUrl.setPort(ReKonfig::syncPort()); + _remoteBookmarksUrl.setPath(ReKonfig::syncPath() + QL1S("/bookmarks.xml")); kDebug() << "REMOTE BK URL: " << _remoteBookmarksUrl; const QString bookmarksFilePath = KStandardDirs::locateLocal("data", QL1S("konqueror/bookmarks.xml")); @@ -122,10 +125,13 @@ void SyncManager::firstTimeSync() // History if (ReKonfig::syncHistory()) { - _remoteHistoryUrl = QUrl::fromUserInput(ReKonfig::syncUrl()); + _remoteHistoryUrl = QUrl(); + _remoteHistoryUrl.setHost(ReKonfig::syncHost()); + _remoteHistoryUrl.setScheme("ftp"); _remoteHistoryUrl.setUserName(ReKonfig::syncUser()); _remoteHistoryUrl.setPassword(ReKonfig::syncPass()); - _remoteHistoryUrl.setPath(QL1S("/home/") + ReKonfig::syncUser() + QL1S("/history")); + _remoteHistoryUrl.setPort(ReKonfig::syncPort()); + _remoteHistoryUrl.setPath(ReKonfig::syncPath() + QL1S("/history")); kDebug() << "REMOTE HISTORY URL: " << _remoteHistoryUrl; const QString historyFilePath = KStandardDirs::locateLocal("appdata", "history"); @@ -141,10 +147,13 @@ void SyncManager::firstTimeSync() // Passwords if (ReKonfig::syncPasswords()) { - _remotePasswordsUrl = QUrl::fromUserInput(ReKonfig::syncUrl()); + _remotePasswordsUrl = QUrl(); + _remotePasswordsUrl.setHost(ReKonfig::syncHost()); + _remotePasswordsUrl.setScheme("ftp"); _remotePasswordsUrl.setUserName(ReKonfig::syncUser()); _remotePasswordsUrl.setPassword(ReKonfig::syncPass()); - _remotePasswordsUrl.setPath(QL1S("/home/") + ReKonfig::syncUser() + QL1S("/kdewallet.kwl")); + _remotePasswordsUrl.setPort(ReKonfig::syncPort()); + _remotePasswordsUrl.setPath(ReKonfig::syncPath() + QL1S("/kdewallet.kwl")); kDebug() << "REMOTE PSWD URL: " << _remotePasswordsUrl; const QString passwordsFilePath = KStandardDirs::locateLocal("data", QL1S("kwallet/kdewallet.kwl")); -- cgit v1.2.1