summaryrefslogtreecommitdiff
path: root/src/sync/operasynchandler.cpp
diff options
context:
space:
mode:
authorSiteshwar Vashisht <siteshwar@gmail.com>2012-05-24 23:54:48 +0530
committerAndrea Diamantini <adjam7@gmail.com>2012-05-28 00:10:31 +0200
commit4a33568b6d177921e50445a9ded44386febe60c0 (patch)
tree171c6185c19789c33912c1170fa974c00ea6f335 /src/sync/operasynchandler.cpp
parentFinal refactoring and clean up to support Opera bookmarks. (diff)
downloadrekonq-4a33568b6d177921e50445a9ded44386febe60c0.tar.xz
Made UI changes to disable history and password sync for certain services, added some notification messages in Opera sync handler.
Diffstat (limited to 'src/sync/operasynchandler.cpp')
-rw-r--r--src/sync/operasynchandler.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/sync/operasynchandler.cpp b/src/sync/operasynchandler.cpp
index 2e67ab34..9a1241ca 100644
--- a/src/sync/operasynchandler.cpp
+++ b/src/sync/operasynchandler.cpp
@@ -169,6 +169,7 @@ void OperaSyncHandler::startLogin()
if (_qoauth.error() != QOAuth::NoError)
{
kDebug() << "Error occured while fetching request tokens. Error code is : " << _qoauth.error();
+ emit syncStatus(Rekonq::Bookmarks, false, i18n("OAuth : Error fetching request token."));
_isSyncing = false;
return;
}
@@ -228,8 +229,8 @@ void OperaSyncHandler::loadFinished(bool ok)
password.setAttribute("value", ReKonfig::syncPass());
button.evaluateJavaScript("this.click();");
-
emit syncStatus(Rekonq::Bookmarks, true, i18n("Signing in..."));
+
_doLogin = false;
}
else if (html.contains("verifier"))
@@ -240,11 +241,14 @@ void OperaSyncHandler::loadFinished(bool ok)
kDebug() << "OAuth verifier code is : " << verifier;
authParams.insert("oauth_verifier", verifier);
+
+ emit syncStatus(Rekonq::Bookmarks, true, i18n("OAuth : Sending verification code."));
QOAuth::ParamMap resultParam = _qoauth.accessToken("https://auth.opera.com/service/oauth/access_token", QOAuth::POST, _requestToken, _requestTokenSecret, QOAuth::HMAC_SHA1, authParams);
if (_qoauth.error() != QOAuth::NoError)
{
kDebug() << "Error occured while fetching access tokens. Error code is : " << _qoauth.error();
+ emit syncStatus(Rekonq::Bookmarks, false, i18n("OAuth : Error fetching access token."));
_isSyncing = false;
return;
}
@@ -267,6 +271,11 @@ void OperaSyncHandler::loadFinished(bool ok)
kDebug() << "Login failed!";
_isSyncing = false;
}
+ else
+ {
+ kDebug() << "Unknown page : " << _webPage.mainFrame()->url();
+ _isSyncing = false;
+ }
}
}