summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sync/operasynchandler.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/src/sync/operasynchandler.cpp b/src/sync/operasynchandler.cpp
index ed25e34b..f9bf34bf 100644
--- a/src/sync/operasynchandler.cpp
+++ b/src/sync/operasynchandler.cpp
@@ -313,74 +313,74 @@ void OperaSyncHandler::fetchBookmarksResultSlot(KJob* job)
{
handleResponse(responseList, root);
emit syncStatus(Rekonq::Bookmarks, true, i18n("Done!"));
- _isSyncing = false;
+// _isSyncing = false;
+ _mode = SEND_CHANGES;
}
- else
- {
- handleResponse(responseList, root);
- QDomElement item = responseList.at(0).toElement();
- KBookmark current = root.first();
+ handleResponse(responseList, root);
- while(!current.isNull())
+ QDomElement item = responseList.at(0).toElement();
+ KBookmark current = root.first();
+
+ while(!current.isNull())
+ {
+ if (current.isGroup())
{
- if (current.isGroup())
- {
- QString groupName = current.fullText();
- QDomElement child = findOperaFolder(item, groupName);
+ QString groupName = current.fullText();
+ QDomElement child = findOperaFolder(item, groupName);
- if (child.isNull())
- {
- //Add Opera group here
- kDebug() << "Add group " << groupName;
- KJob *job = addBookmarkFolderOnServer(current.fullText());
- _jobToGroupMap.insert(job, current.toGroup());
- }
- else
- {
- kDebug() << "Handling group " << groupName;
- QDomElement grandChild = getChildElement(child, "children");
-
- QString id = getChildString(child, "id");
-
- kDebug() << grandChild.tagName() << id;
-
- if (grandChild.isNull())
- {
- kDebug() << "Grand child is null";
- handleLocalGroup(current.toGroup(), grandChild, id);
- }
- else{
- //kDebug() << "Grand child " << getTitleFromResourceProperties(grandChild);
- handleLocalGroup(current.toGroup(), grandChild, id);
- }
- }
+ if (child.isNull())
+ {
+ //Add Opera group here
+ kDebug() << "Add group " << groupName;
+ KJob *job = addBookmarkFolderOnServer(current.fullText());
+ _jobToGroupMap.insert(job, current.toGroup());
}
-
else
{
- KUrl url = current.url();
+ kDebug() << "Handling group " << groupName;
+ QDomElement grandChild = getChildElement(child, "children");
+
+ QString id = getChildString(child, "id");
- QDomElement child = findOperaBookmark(item, url);
+ kDebug() << grandChild.tagName() << id;
- if (child.isNull())
+ if (grandChild.isNull())
{
- //Add bookmark on server
- kDebug() << "Add bookmark :" << url;
- addBookmarkOnServer(current.fullText(), current.url().url());
+ kDebug() << "Grand child is null";
+ handleLocalGroup(current.toGroup(), grandChild, id);
}
- else
- {
- kDebug() << "Bookmark exists :" << url;
+ else{
+ //kDebug() << "Grand child " << getTitleFromResourceProperties(grandChild);
+ handleLocalGroup(current.toGroup(), grandChild, id);
}
}
+ }
- current = root.next(current);
+ else
+ {
+ KUrl url = current.url();
+
+ QDomElement child = findOperaBookmark(item, url);
+
+ if (child.isNull())
+ {
+ //Add bookmark on server
+ kDebug() << "Add bookmark :" << url;
+ addBookmarkOnServer(current.fullText(), current.url().url());
+ }
+ else
+ {
+ kDebug() << "Bookmark exists :" << url;
+ }
}
- decreaseRequestCount();
+ current = root.next(current);
}
+ decreaseRequestCount();
+
+
_xmlData = "";
}