*/
QHttpHeader::~QHttpHeader()
{
- delete d_ptr;
}
/*!
#include <QtCore/qstringlist.h>
#include <QtCore/qmap.h>
#include <QtCore/qpair.h>
+#include <QtCore/qscopedpointer.h>
QT_BEGIN_HEADER
QHttpHeader(QHttpHeaderPrivate &dd, const QString &str = QString());
QHttpHeader(QHttpHeaderPrivate &dd, const QHttpHeader &header);
- QHttpHeaderPrivate* d_ptr;
+ QScopedPointer<QHttpHeaderPrivate> d_ptr;
private:
Q_DECLARE_PRIVATE(QHttpHeader)
Constructs a copy of the given \a address.
*/
QHostAddress::QHostAddress(const QHostAddress &address)
- : d(new QHostAddressPrivate(*address.d))
+ : d(new QHostAddressPrivate(*address.d.data()))
{
}
*/
QHostAddress &QHostAddress::operator=(const QHostAddress &address)
{
- d = address.d;
+ *d.data() = *address.d.data();
return *this;
}
#include <QtCore/qpair.h>
#include <QtCore/qstring.h>
+#include <QtCore/qscopedpointer.h>
#include <QtNetwork/qabstractsocket.h>
struct sockaddr;
static QPair<QHostAddress, int> parseSubnet(const QString &subnet);
protected:
- QHostAddressPrivate* d;
+ QScopedPointer<QHostAddressPrivate> d;
};
inline bool operator ==(QHostAddress::SpecialAddress address1, const QHostAddress &address2)
Constructs a copy of \a other.
*/
QHostInfo::QHostInfo(const QHostInfo &other)
- : d(new QHostInfoPrivate(*other.d))
+ : d(new QHostInfoPrivate(*other.d.data()))
{
}
*/
QHostInfo &QHostInfo::operator=(const QHostInfo &other)
{
- d = other.d;
+ *d.data() = *other.d.data();
return *this;
}
*/
QHostInfo::~QHostInfo()
{
- delete d;
}
/*!
#define QHOSTINFO_H
#include <QtCore/qlist.h>
+#include <QtCore/qscopedpointer.h>
#include <QtNetwork/qhostaddress.h>
QT_BEGIN_HEADER
static QString localDomainName();
private:
- QHostInfoPrivate* d;
+ QScopedPointer<QHostInfoPrivate> d;
};
QT_END_NAMESPACE
object \a other.
*/
QNetworkAddressEntry::QNetworkAddressEntry(const QNetworkAddressEntry &other)
- : d(new QNetworkAddressEntryPrivate(*other.d))
+ : d(new QNetworkAddressEntryPrivate(*other.d.data()))
{
}
*/
QNetworkAddressEntry &QNetworkAddressEntry::operator=(const QNetworkAddressEntry &other)
{
- d = other.d;
+ *d.data() = *other.d.data();
return *this;
}
*/
QNetworkAddressEntry::~QNetworkAddressEntry()
{
- delete d;
}
/*!
#define QNETWORKINTERFACE_H
#include <QtCore/qshareddata.h>
+#include <QtCore/qscopedpointer.h>
#include <QtNetwork/qhostaddress.h>
#ifndef QT_NO_NETWORKINTERFACE
void setBroadcast(const QHostAddress &newBroadcast);
private:
- QNetworkAddressEntryPrivate* d;
+ QScopedPointer<QNetworkAddressEntryPrivate> d;
};
class QNetworkInterfacePrivate;
#include "qendian.h"
#include "qnetworkinterface.h"
#include "qnetworkcommon_p.h"
-#include "qscopedpointer.h"
QT_BEGIN_NAMESPACE
QSslCipher::QSslCipher(const QSslCipher &other)
: d(new QSslCipherPrivate)
{
- d = other.d;
+ *d.data() = *other.d.data();
}
/*!
*/
QSslCipher::~QSslCipher()
{
- delete d;
}
/*!
*/
QSslCipher &QSslCipher::operator=(const QSslCipher &other)
{
- d = other.d;
+ *d.data() = *other.d.data();
return *this;
}
#define QSSLCIPHER_H
#include <QtCore/qstring.h>
+#include <QtCore/qscopedpointer.h>
#include <QtNetwork/qssl.h>
QT_BEGIN_HEADER
QSsl::SslProtocol protocol() const;
private:
- QSslCipherPrivate* d;
+ QScopedPointer<QSslCipherPrivate> d;
friend class QSslSocketBackendPrivate;
};
};
/*!
- Constructs a QSslError object. The two arguments specify the
- \a error that occurred, and which \a certificate the error relates to.
+ Constructs a QSslError object with no error and default certificate.
+
+*/
+
+// RVCT compiler in debug build does not like about default values in const-
+// So as an workaround we define all constructor overloads here explicitly
+QSslError::QSslError()
+ : d(new QSslErrorPrivate)
+{
+ d->error = QSslError::NoError;
+ d->certificate = QSslCertificate();
+}
+
+/*!
+ Constructs a QSslError object. The argument specifies the \a
+ error that occurred.
+
+*/
+QSslError::QSslError(SslError error)
+ : d(new QSslErrorPrivate)
+{
+ d->error = error;
+ d->certificate = QSslCertificate();
+}
+
+/*!
+ Constructs a QSslError object. The two arguments specify the \a
+ error that occurred, and which \a certificate the error relates to.
\sa QSslCertificate
*/
QSslError::QSslError(const QSslError &other)
: d(new QSslErrorPrivate)
{
- d = other.d;
+ *d.data() = *other.d.data();
}
/*!
*/
QSslError::~QSslError()
{
- delete d;
}
/*!
*/
QSslError &QSslError::operator=(const QSslError &other)
{
- d = other.d;
+ *d.data() = *other.d.data();
return *this;
}
#define QSSLERROR_H
#include <QtCore/qvariant.h>
+#include <QtCore/qscopedpointer.h>
#include <QtNetwork/qsslcertificate.h>
QT_BEGIN_HEADER
UnspecifiedError = -1
};
- QSslError(SslError error = QSslError::NoError, const QSslCertificate &certificate = QSslCertificate());
+ // RVCT compiler in debug build does not like about default values in const-
+ // So as an workaround we define all constructor overloads here explicitly
+ QSslError();
+ QSslError(SslError error);
+ QSslError(SslError error, const QSslCertificate &certificate);
QSslError(const QSslError &other);
SslError error() const;
QString errorString() const;
QSslCertificate certificate() const;
-
+
private:
- QSslErrorPrivate* d;
+ QScopedPointer<QSslErrorPrivate> d;
};
#ifndef QT_NO_DEBUG_STREAM