Tried that but getting following error while running:
./debug\mainwindow.o:mainwindow.cpp:(.text$_ZN17client_connectionC1Ev[client_connection::client_connection()]+0x20): undefined reference to `vtable for client_connection'
collect2: ld returned 1 exit status
./debug\mainwindow.o:mainwindow.cpp:(.text$_ZN17client_connectionC1Ev[client_connection::client_connection()]+0x20): undefined reference to `vtable for client_connection'
collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
I'm now wondering if the connection even gets encrypted. The following returns always false saying that connection would not get encrypted...
bool client_connection::init_connection()
{
ptr_socket = new QSslSocket();
if (!ptr_socket) {
// connect(ptr_socket, SIGNAL(encrypted()), this, SLOT(connection_encrypted()));
}
ptr_socket->connectToHostEncrypted("localhost", 555);
if(ptr_socket->waitForEncrypted(2000))
{
return true;
}
return false;
}
bool client_connection::init_connection()
{
ptr_socket = new QSslSocket();
if (!ptr_socket) {
// connect(ptr_socket, SIGNAL(encrypted()), this, SLOT(connection_encrypted()));
}
ptr_socket->connectToHostEncrypted("localhost", 555);
if(ptr_socket->waitForEncrypted(2000))
{
return true;
}
return false;
}
To copy to clipboard, switch view to plain text mode
Bookmarks