コード例 #1
0
ファイル: qwebenginepage.cpp プロジェクト: RobinWuDev/Qt
void QWebEnginePagePrivate::authenticationRequired(const QUrl &requestUrl, const QString &realm, bool isProxy, const QString &challengingHost, QString *outUser, QString *outPassword)
{
    Q_Q(QWebEnginePage);
    QAuthenticator networkAuth;
    networkAuth.setRealm(realm);

    if (isProxy)
        Q_EMIT q->proxyAuthenticationRequired(requestUrl, &networkAuth, challengingHost);
    else
        Q_EMIT q->authenticationRequired(requestUrl, &networkAuth);
    *outUser = networkAuth.user();
    *outPassword = networkAuth.password();
}