SslSocketClient - fix example not to crash

Due to the bug related to the 'new syntax' signal/slot connections,
it's unfortunately possible to have a connection not deleted properly
by the moment children objects get deleted. Then, as a result,
in e.g. QSslSocket's destructor the socket will change its state,
triggering the (now deleted) UI elements' access.
Note - the original  bug was reported, the patch (only possible?) was
not accepted.

Fixes: QTBUG-83659
Change-Id: I2965532485bcd46f93f8449e4d0a30da92b572c5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Timur Pocheptsov 2020-04-20 12:51:15 +02:00
parent e10e5318bc
commit 6c45b1817f

View File

@ -63,6 +63,7 @@ SslClient::SslClient(QWidget *parent)
SslClient::~SslClient()
{
delete socket;
delete form;
}