summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qauthenticator.cpp
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-11-03 15:46:24 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-11-03 15:52:25 (GMT)
commitfbe7375ad3dde9ce10202141ea7ffe78643088a6 (patch)
treebf3aa146d65402aca017df88a59b451fbb2b3863 /src/network/kernel/qauthenticator.cpp
parentfc60eb64d38289b448f73889139c94895b74db1a (diff)
downloadQt-fbe7375ad3dde9ce10202141ea7ffe78643088a6.zip
Qt-fbe7375ad3dde9ce10202141ea7ffe78643088a6.tar.gz
Qt-fbe7375ad3dde9ce10202141ea7ffe78643088a6.tar.bz2
QNAM: Reset authenticator state properly between requests
Reset authenticator and fix operator=(...) of QAuthenticator. Task-number: QTBUG-6792 Reviewed-by: ogoffart
Diffstat (limited to 'src/network/kernel/qauthenticator.cpp')
-rw-r--r--src/network/kernel/qauthenticator.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index 220f7da..73f6b94 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -164,9 +164,13 @@ QAuthenticator &QAuthenticator::operator=(const QAuthenticator &other)
{
if (d == other.d)
return *this;
- detach();
- d->user = other.d->user;
- d->password = other.d->password;
+
+ if (d && !d->ref.deref())
+ delete d;
+
+ d = other.d;
+ if (d)
+ d->ref.ref();
return *this;
}