ssl: store socket in setEmptyDefaultConfiguration
The setEmptyDefaultConfiguration test creates a socket and connects its sslErrors signal to tst_QSslSocket's ignoreErrorSlot slot. This slot expects the socket to have been stored in tst_QsslSocket's "socket" member, which was not being done. This patch fixes this problem. It does beg the question of whether having a "socket" member in the tst_QSslSocket class is a good idea as it is error prone. Change-Id: Ic59d1789c5f1ed240c3f0c37981f6ecc35572f0d Reviewed-by: Richard J. Moore <rich@kde.org>bb10
parent
a670b916b0
commit
14d1097f45
|
|
@ -2752,8 +2752,10 @@ void tst_QSslSocket::setEmptyDefaultConfiguration() // this test should be last,
|
|||
QSslConfiguration emptyConf;
|
||||
QSslConfiguration::setDefaultConfiguration(emptyConf);
|
||||
|
||||
QSslSocketPtr socket = newSocket();
|
||||
connect(socket.data(), SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
|
||||
QSslSocketPtr client = newSocket();
|
||||
socket = client.data();
|
||||
|
||||
connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
|
||||
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
|
||||
QFETCH_GLOBAL(bool, setProxy);
|
||||
if (setProxy && socket->waitForEncrypted(4000))
|
||||
|
|
|
|||
Loading…
Reference in New Issue