replace native browser invocation with signal
This commit is contained in:
parent
6bc048d79d
commit
e0bb886098
2 changed files with 7 additions and 2 deletions
|
@ -464,7 +464,8 @@ void KQOAuthManager::getOauth2UserAuthorization(QUrl authorizationEndpoint, QStr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug() << openWebPageUrl.toString();
|
qDebug() << openWebPageUrl.toString();
|
||||||
navigator_invoke(openWebPageUrl.toString().toStdString().c_str(),0);
|
// navigator_invoke(openWebPageUrl.toString().toStdString().c_str(),0);
|
||||||
|
emit openBrowser(openWebPageUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
QUrl KQOAuthManager::getUserAuthorizationUrl(QUrl authorizationEndpoint) {
|
QUrl KQOAuthManager::getUserAuthorizationUrl(QUrl authorizationEndpoint) {
|
||||||
|
@ -499,7 +500,8 @@ void KQOAuthManager::getUserAuthorization(QUrl authorizationEndpoint) {
|
||||||
// Open the user's default browser to the resource authorization page provided
|
// Open the user's default browser to the resource authorization page provided
|
||||||
// by the service.
|
// by the service.
|
||||||
|
|
||||||
navigator_invoke(openWebPageUrl.toString().toStdString().c_str(),0);
|
// navigator_invoke(openWebPageUrl.toString().toStdString().c_str(),0);
|
||||||
|
emit openBrowser(openWebPageUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -670,6 +672,7 @@ void KQOAuthManager::onAuthorizedRequestReplyReceived( QNetworkReply *reply ) {
|
||||||
|
|
||||||
// Just don't do anything if we didn't get anything useful.
|
// Just don't do anything if we didn't get anything useful.
|
||||||
if(networkReply.isEmpty()) {
|
if(networkReply.isEmpty()) {
|
||||||
|
qDebug() << "EMPTY REPLY";
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,6 +187,8 @@ Q_SIGNALS:
|
||||||
// This ends the kQOAuth interactions.
|
// This ends the kQOAuth interactions.
|
||||||
void authorizedRequestDone();
|
void authorizedRequestDone();
|
||||||
|
|
||||||
|
void openBrowser(QUrl url);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void onRequestReplyReceived( QNetworkReply *reply );
|
void onRequestReplyReceived( QNetworkReply *reply );
|
||||||
void onAuthorizedRequestReplyReceived( QNetworkReply *reply );
|
void onAuthorizedRequestReplyReceived( QNetworkReply *reply );
|
||||||
|
|
Loading…
Reference in a new issue