From 33b79ddc805b41ca4aad47be821508543721f534 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 7 Sep 2018 12:19:55 +0200 Subject: QDtls and QDtlsClientVerifier - add destructors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/network/ssl/qdtls.cpp | 14 ++++++++++++++ src/network/ssl/qdtls.h | 2 ++ 2 files changed, 16 insertions(+) (limited to 'src') 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 @@ -453,6 +453,13 @@ QDtlsClientVerifier::QDtlsClientVerifier(QObject *parent) d->setConfiguration(conf); } +/*! + 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 @@ -576,6 +583,13 @@ QDtls::QDtls(QSslSocket::SslMode mode, QObject *parent) setDtlsConfiguration(QSslConfiguration::defaultDtlsConfiguration()); } +/*! + 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. 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 = {}); -- cgit v1.2.3