[Qt-interest] QSslSocket: QAbstractSocket::error - "no such slot"problem
Tony Rietwyk
tony.rietwyk at rightsoft.com.au
Tue Apr 14 01:11:38 CEST 2009
Hi Stephen,
Have you tried registering the SocketError type, as suggested in the error signal documentation?
Tony.
-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Stephen Collyer
Sent: Tuesday, 14 April 2009 08:40
To: qtInterest
Subject: [Qt-interest] QSslSocket: QAbstractSocket::error - "no such slot"problem
I'm getting the dreaded "no such slot" message in a class HTTPReader that derives from QSslSocket.
I've declared slots like so:
private slots:
void read_client();
void emit_file_chunk();
void ssl_encryption_failed(const QList<QSslError> & errors);
void handle_error(QAbstractSocket::SocketError sock_error);
and connect them in the ctor like so:
connect(this, SIGNAL( readyRead() ), this, SLOT( read_client() ));
connect(this, SIGNAL( disconnected() ), this, SLOT( deleteLater() ));
connect(this, SIGNAL( error(QAbstractSocket::SocketError) ),
this, SLOT ( handle_error(QAbstractSocket::SocketError) ));
and have the following impl. for handle_error():
void HTTPReader::handle_error(QAbstractSocket::SocketError sock_error)
{
...
}
At run time I see:
Object::connect: No such slot MDP::HTTPReader::handle_error(QAbstractSocket::SocketError)
Can anyone see what I've screwed up ? All other slots are fine.
--
Stephen Collyer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090414/5e52bf0b/attachment.html
More information about the Qt-interest-old
mailing list