Fix for assertion failure

Change-Id: I97b9ecc37e938a3050793fc746288243a1cb40b7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
This commit is contained in:
Shane Kearns 2011-12-15 17:31:52 +00:00 committed by Qt by Nokia
parent 058fb94aff
commit 96cda705dc
2 changed files with 6 additions and 1 deletions

View File

@ -159,6 +159,11 @@ void QNetworkAccessAuthenticationManager::cacheProxyCredentials(const QNetworkPr
QString realm = authenticator->realm();
QNetworkProxy proxy = p;
proxy.setUser(authenticator->user());
// don't cache null passwords, empty password may be valid though
if (authenticator->password().isNull())
return;
// Set two credentials: one with the username and one without
do {
// Set two credentials actually: one with and one without the realm

View File

@ -73,7 +73,7 @@ public:
QString user;
QString password;
bool isNull() {
return domain.isNull();
return domain.isNull() && user.isNull() && password.isNull();
}
};
Q_DECLARE_TYPEINFO(QNetworkAuthenticationCredential, Q_MOVABLE_TYPE);