diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-09-07 12:19:55 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-09-10 04:37:24 +0000 |
commit | 33b79ddc805b41ca4aad47be821508543721f534 (patch) | |
tree | 1db4677e040cc6cab3093143c7ebeff93269d1f6 | |
parent | b66357e3ebf3e3dbda04f880e87184e247882843 (diff) |
QDtls and QDtlsClientVerifier - add destructors
While these destructors are essentially trivial and contain no code,
the classes inherit QObject and thus have virtual tables. For such
classes -Wweak-vtable generates a warning: "'Class' has no out-of-line
virtual method definitions; its vtable will be emitted in every translation
unit." Noticed this after updating QtCreator to the latest version.
Change-Id: Iacb5d0cd49353bd35260aff736652542bb1ef197
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r-- | src/network/ssl/qdtls.cpp | 14 | ||||
-rw-r--r-- | src/network/ssl/qdtls.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/network/ssl/qdtls.cpp b/src/network/ssl/qdtls.cpp index da37951de2..bbb22aa527 100644 --- a/src/network/ssl/qdtls.cpp +++ b/src/network/ssl/qdtls.cpp @@ -454,6 +454,13 @@ QDtlsClientVerifier::QDtlsClientVerifier(QObject *parent) } /*! + Destroys the QDtlsClientVerifier object. +*/ +QDtlsClientVerifier::~QDtlsClientVerifier() +{ +} + +/*! Sets the secret and the cryptographic hash algorithm from \a params. This QDtlsClientVerifier will use these to generate cookies. If the new secret has size zero, this function returns \c false and does not change the @@ -577,6 +584,13 @@ QDtls::QDtls(QSslSocket::SslMode mode, QObject *parent) } /*! + Destroys the QDtls object. +*/ +QDtls::~QDtls() +{ +} + +/*! Sets the peer's address, \a port, and host name and returns \c true if successful. \a address must not be null, multicast, or broadcast. \a verificationName is the host name used for the certificate validation. diff --git a/src/network/ssl/qdtls.h b/src/network/ssl/qdtls.h index 9288fd3440..8505b00d5e 100644 --- a/src/network/ssl/qdtls.h +++ b/src/network/ssl/qdtls.h @@ -78,6 +78,7 @@ class Q_NETWORK_EXPORT QDtlsClientVerifier : public QObject public: explicit QDtlsClientVerifier(QObject *parent = nullptr); + ~QDtlsClientVerifier(); struct Q_NETWORK_EXPORT GeneratorParameters { @@ -125,6 +126,7 @@ public: }; explicit QDtls(QSslSocket::SslMode mode, QObject *parent = nullptr); + ~QDtls(); bool setPeer(const QHostAddress &address, quint16 port, const QString &verificationName = {}); |