diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-10 09:15:35 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-11-10 09:15:35 (GMT) |
commit | 6d33c770d9537f0ff331e60bd36fadf6911d34c4 (patch) | |
tree | 3fdc291984d1afcdebfc833abc03a6049d5d034a /src | |
parent | d70bae38a55f5cb61a6af0969b38b53697c492fd (diff) | |
parent | 7bfdec392df263b15fb5661ab7d4f66f1cd8fbae (diff) | |
download | Qt-6d33c770d9537f0ff331e60bd36fadf6911d34c4.zip Qt-6d33c770d9537f0ff331e60bd36fadf6911d34c4.tar.gz Qt-6d33c770d9537f0ff331e60bd36fadf6911d34c4.tar.bz2 |
Merge commit 'upstream/4.6' into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qscopedpointer.h | 52 | ||||
-rw-r--r-- | src/network/access/qhttpnetworkconnection.cpp | 4 |
2 files changed, 14 insertions, 42 deletions
diff --git a/src/corelib/tools/qscopedpointer.h b/src/corelib/tools/qscopedpointer.h index 7cbdb6c..b433723 100644 --- a/src/corelib/tools/qscopedpointer.h +++ b/src/corelib/tools/qscopedpointer.h @@ -113,16 +113,6 @@ public: return d; } - inline bool operator==(const QScopedPointer<T, Cleanup> &other) const - { - return d == other.d; - } - - inline bool operator!=(const QScopedPointer<T, Cleanup> &other) const - { - return d != other.d; - } - inline bool operator!() const { return !d; @@ -181,6 +171,18 @@ private: }; template <class T, class Cleanup> +inline bool operator==(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) +{ + return lhs.data() == rhs.data(); +} + +template <class T, class Cleanup> +inline bool operator!=(const QScopedPointer<T, Cleanup> &lhs, const QScopedPointer<T, Cleanup> &rhs) +{ + return lhs.data() != rhs.data(); +} + +template <class T, class Cleanup> Q_INLINE_TEMPLATE void qSwap(QScopedPointer<T, Cleanup> &p1, QScopedPointer<T, Cleanup> &p2) { p1.swap(p2); } @@ -203,16 +205,6 @@ public: return this->d[i]; } - inline bool operator==(const QScopedArrayPointer<T, Cleanup> &other) const - { - return this->d == other.d; - } - - inline bool operator!=(const QScopedArrayPointer<T, Cleanup> &other) const - { - return this->d != other.d; - } - private: Q_DISABLE_COPY(QScopedArrayPointer) }; @@ -233,16 +225,6 @@ public: return this->d; } - inline bool operator==(const QCustomScopedPointer<T, Cleanup> &other) const - { - return this->d == other.d; - } - - inline bool operator!=(const QCustomScopedPointer<T, Cleanup> &other) const - { - return this->d != other.d; - } - private: Q_DISABLE_COPY(QCustomScopedPointer) }; @@ -287,16 +269,6 @@ public: QScopedPointerSharedDeleter<T>::cleanup(oldD); } - inline bool operator==(const QScopedSharedPointer<T> &other) const - { - return this->d == other.d; - } - - inline bool operator!=(const QScopedSharedPointer<T> &other) const - { - return this->d != other.d; - } - private: Q_DISABLE_COPY(QScopedSharedPointer) }; diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 1124337..8dd7a00 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -372,7 +372,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket, QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(channels[i].authenticator); if (priv && priv->method != QAuthenticatorPrivate::None) { QByteArray response = priv->calculateResponse(request.d->methodName(), request.d->uri(false)); - request.setHeaderField("authorization", response); + request.setHeaderField("Authorization", response); } } } @@ -381,7 +381,7 @@ void QHttpNetworkConnectionPrivate::createAuthorization(QAbstractSocket *socket, QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(channels[i].proxyAuthenticator); if (priv && priv->method != QAuthenticatorPrivate::None) { QByteArray response = priv->calculateResponse(request.d->methodName(), request.d->uri(false)); - request.setHeaderField("proxy-authorization", response); + request.setHeaderField("Proxy-Authorization", response); } } } |