From d4a4f824667403d5642f700b202f19012b72ae96 Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Wed, 3 Aug 2011 17:49:44 +0100 Subject: [PATCH 2/2] Fix msvc compile error The friend declarations don't work because the class name also exists in the global namespace. However explicitly specifying the namespace also resulted in a compile error. Instead, just made the inheritance public - the header file isn't exported in any case. --- src/bearer/qnetworkconfiguration.h | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/bearer/qnetworkconfiguration.h b/src/bearer/qnetworkconfiguration.h index c84839a..7daaba1 100644 --- a/src/bearer/qnetworkconfiguration.h +++ b/src/bearer/qnetworkconfiguration.h @@ -54,12 +54,13 @@ QT_BEGIN_HEADER QTM_BEGIN_NAMESPACE class QNetworkConfigurationPrivate; -class Q_BEARER_EXPORT QNetworkConfiguration : QT_PREPEND_NAMESPACE(QNetworkConfiguration) +class Q_BEARER_EXPORT QNetworkConfiguration : public QT_PREPEND_NAMESPACE(QNetworkConfiguration) { public: QNetworkConfiguration(); QNetworkConfiguration(const QNetworkConfiguration& other); QNetworkConfiguration &operator=(const QNetworkConfiguration& other); + QNetworkConfiguration(const QT_PREPEND_NAMESPACE(QNetworkConfiguration) &); //internal ~QNetworkConfiguration(); bool operator==(const QNetworkConfiguration& cp) const; @@ -101,12 +102,6 @@ public: bool isValid() const; private: - QNetworkConfiguration(const QT_PREPEND_NAMESPACE(QNetworkConfiguration) &); - friend class QNetworkConfigurationPrivate; - friend class QNetworkConfigurationManager; - friend class QNetworkConfigurationManagerPrivate; - friend class QNetworkSessionPrivate; - friend class QNetworkSession; //'d' is removed, but the base class has the same 'd' so class size remains the same. //QExplicitlySharedDataPointer d; }; -- 1.6.5.1.1367.gcd48