Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 145fb03d2e)
r14.1.x
Michele Calgaro 10 months ago
parent 9cbea02c38
commit 7267a6cbc6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -33,19 +33,19 @@ public:
ClientTest()
{
sock = new TQSocket;
connect(sock, SIGNAL(connected()), SLOT(sock_connected()));
connect(sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
connect(sock, SIGNAL(error(int)), SLOT(sock_error(int)));
connect(sock, TQ_SIGNAL(connected()), TQ_SLOT(sock_connected()));
connect(sock, TQ_SIGNAL(connectionClosed()), TQ_SLOT(sock_connectionClosed()));
connect(sock, TQ_SIGNAL(readyRead()), TQ_SLOT(sock_readyRead()));
connect(sock, TQ_SIGNAL(error(int)), TQ_SLOT(sock_error(int)));
sasl = new QCA::SASL;
connect(sasl, SIGNAL(clientFirstStep(const TQString &, const TQByteArray *)), SLOT(sasl_clientFirstStep(const TQString &, const TQByteArray *)));
connect(sasl, SIGNAL(nextStep(const TQByteArray &)), SLOT(sasl_nextStep(const TQByteArray &)));
connect(sasl, SIGNAL(needParams(bool, bool, bool, bool)), SLOT(sasl_needParams(bool, bool, bool, bool)));
connect(sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
connect(sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
connect(sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int)));
connect(sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
connect(sasl, TQ_SIGNAL(clientFirstStep(const TQString &, const TQByteArray *)), TQ_SLOT(sasl_clientFirstStep(const TQString &, const TQByteArray *)));
connect(sasl, TQ_SIGNAL(nextStep(const TQByteArray &)), TQ_SLOT(sasl_nextStep(const TQByteArray &)));
connect(sasl, TQ_SIGNAL(needParams(bool, bool, bool, bool)), TQ_SLOT(sasl_needParams(bool, bool, bool, bool)));
connect(sasl, TQ_SIGNAL(authenticated()), TQ_SLOT(sasl_authenticated()));
connect(sasl, TQ_SIGNAL(readyRead()), TQ_SLOT(sasl_readyRead()));
connect(sasl, TQ_SIGNAL(readyReadOutgoing(int)), TQ_SLOT(sasl_readyReadOutgoing(int)));
connect(sasl, TQ_SIGNAL(error(int)), TQ_SLOT(sasl_error(int)));
}
~ClientTest()
@ -308,14 +308,14 @@ public:
{
if(!ok()) {
printf("Error binding to port %d!\n", port);
TQTimer::singleShot(0, this, SIGNAL(quit()));
TQTimer::singleShot(0, this, TQ_SIGNAL(quit()));
return;
}
char myhostname[256];
int r = gethostname(myhostname, sizeof(myhostname)-1);
if(r == -1) {
printf("Error getting hostname!\n");
TQTimer::singleShot(0, this, SIGNAL(quit()));
TQTimer::singleShot(0, this, TQ_SIGNAL(quit()));
return;
}
host = myhostname;
@ -335,18 +335,18 @@ public:
printf("Connection received! Starting SASL handshake...\n");
sock = new TQSocket;
connect(sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
connect(sock, SIGNAL(error(int)), SLOT(sock_error(int)));
connect(sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
connect(sock, TQ_SIGNAL(connectionClosed()), TQ_SLOT(sock_connectionClosed()));
connect(sock, TQ_SIGNAL(readyRead()), TQ_SLOT(sock_readyRead()));
connect(sock, TQ_SIGNAL(error(int)), TQ_SLOT(sock_error(int)));
connect(sock, TQ_SIGNAL(bytesWritten(int)), TQ_SLOT(sock_bytesWritten(int)));
sasl = new QCA::SASL;
connect(sasl, SIGNAL(authCheck(const TQString &, const TQString &)), SLOT(sasl_authCheck(const TQString &, const TQString &)));
connect(sasl, SIGNAL(nextStep(const TQByteArray &)), SLOT(sasl_nextStep(const TQByteArray &)));
connect(sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
connect(sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
connect(sasl, SIGNAL(readyReadOutgoing(int)), SLOT(sasl_readyReadOutgoing(int)));
connect(sasl, SIGNAL(error(int)), SLOT(sasl_error(int)));
connect(sasl, TQ_SIGNAL(authCheck(const TQString &, const TQString &)), TQ_SLOT(sasl_authCheck(const TQString &, const TQString &)));
connect(sasl, TQ_SIGNAL(nextStep(const TQByteArray &)), TQ_SLOT(sasl_nextStep(const TQByteArray &)));
connect(sasl, TQ_SIGNAL(authenticated()), TQ_SLOT(sasl_authenticated()));
connect(sasl, TQ_SIGNAL(readyRead()), TQ_SLOT(sasl_readyRead()));
connect(sasl, TQ_SIGNAL(readyReadOutgoing(int)), TQ_SLOT(sasl_readyReadOutgoing(int)));
connect(sasl, TQ_SIGNAL(error(int)), TQ_SLOT(sasl_error(int)));
sock->setSocket(s);
mode = 0;
@ -598,14 +598,14 @@ int main(int argc, char **argv)
if(server) {
ServerTest *s = new ServerTest(str, PROTO_PORT);
TQObject::connect(s, SIGNAL(quit()), &app, SLOT(quit()));
TQObject::connect(s, TQ_SIGNAL(quit()), &app, TQ_SLOT(quit()));
s->start();
app.exec();
delete s;
}
else {
ClientTest *c = new ClientTest;
TQObject::connect(c, SIGNAL(quit()), &app, SLOT(quit()));
TQObject::connect(c, TQ_SIGNAL(quit()), &app, TQ_SLOT(quit()));
c->start(host, PROTO_PORT, user, pass);
app.exec();
delete c;

@ -115,17 +115,17 @@ public:
SecureServerTest(int _port) : QServerSocket(_port), port(_port)
{
sock = new TQSocket;
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
connect(sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
connect(sock, SIGNAL(error(int)), SLOT(sock_error(int)));
connect(sock, SIGNAL(bytesWritten(int)), SLOT(sock_bytesWritten(int)));
connect(sock, TQ_SIGNAL(readyRead()), TQ_SLOT(sock_readyRead()));
connect(sock, TQ_SIGNAL(connectionClosed()), TQ_SLOT(sock_connectionClosed()));
connect(sock, TQ_SIGNAL(error(int)), TQ_SLOT(sock_error(int)));
connect(sock, TQ_SIGNAL(bytesWritten(int)), TQ_SLOT(sock_bytesWritten(int)));
ssl = new QCA::TLS;
connect(ssl, SIGNAL(handshaken()), SLOT(ssl_handshaken()));
connect(ssl, SIGNAL(readyRead()), SLOT(ssl_readyRead()));
connect(ssl, SIGNAL(readyReadOutgoing(int)), SLOT(ssl_readyReadOutgoing(int)));
connect(ssl, SIGNAL(closed()), SLOT(ssl_closed()));
connect(ssl, SIGNAL(error(int)), SLOT(ssl_error(int)));
connect(ssl, TQ_SIGNAL(handshaken()), TQ_SLOT(ssl_handshaken()));
connect(ssl, TQ_SIGNAL(readyRead()), TQ_SLOT(ssl_readyRead()));
connect(ssl, TQ_SIGNAL(readyReadOutgoing(int)), TQ_SLOT(ssl_readyReadOutgoing(int)));
connect(ssl, TQ_SIGNAL(closed()), TQ_SLOT(ssl_closed()));
connect(ssl, TQ_SIGNAL(error(int)), TQ_SLOT(ssl_error(int)));
cert.fromPEM(pemdata_cert);
privkey.fromPEM(pemdata_privkey);
@ -143,12 +143,12 @@ public:
{
if(cert.isNull() || privkey.isNull()) {
printf("Error loading cert and/or private key!\n");
TQTimer::singleShot(0, this, SIGNAL(quit()));
TQTimer::singleShot(0, this, TQ_SIGNAL(quit()));
return;
}
if(!ok()) {
printf("Error binding to port %d!\n", port);
TQTimer::singleShot(0, this, SIGNAL(quit()));
TQTimer::singleShot(0, this, TQ_SIGNAL(quit()));
return;
}
printf("Listening on port %d ...\n", port);
@ -285,7 +285,7 @@ int main(int argc, char **argv)
}
SecureServerTest *s = new SecureServerTest(port);
TQObject::connect(s, SIGNAL(quit()), &app, SLOT(quit()));
TQObject::connect(s, TQ_SIGNAL(quit()), &app, TQ_SLOT(quit()));
s->start();
app.exec();
delete s;

@ -122,17 +122,17 @@ public:
SecureTest()
{
sock = new TQSocket;
connect(sock, SIGNAL(connected()), SLOT(sock_connected()));
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
connect(sock, SIGNAL(connectionClosed()), SLOT(sock_connectionClosed()));
connect(sock, SIGNAL(error(int)), SLOT(sock_error(int)));
connect(sock, TQ_SIGNAL(connected()), TQ_SLOT(sock_connected()));
connect(sock, TQ_SIGNAL(readyRead()), TQ_SLOT(sock_readyRead()));
connect(sock, TQ_SIGNAL(connectionClosed()), TQ_SLOT(sock_connectionClosed()));
connect(sock, TQ_SIGNAL(error(int)), TQ_SLOT(sock_error(int)));
ssl = new TQCA::TLS;
connect(ssl, SIGNAL(handshaken()), SLOT(ssl_handshaken()));
connect(ssl, SIGNAL(readyRead()), SLOT(ssl_readyRead()));
connect(ssl, SIGNAL(readyReadOutgoing(int)), SLOT(ssl_readyReadOutgoing(int)));
connect(ssl, SIGNAL(closed()), SLOT(ssl_closed()));
connect(ssl, SIGNAL(error(int)), SLOT(ssl_error(int)));
connect(ssl, TQ_SIGNAL(handshaken()), TQ_SLOT(ssl_handshaken()));
connect(ssl, TQ_SIGNAL(readyRead()), TQ_SLOT(ssl_readyRead()));
connect(ssl, TQ_SIGNAL(readyReadOutgoing(int)), TQ_SLOT(ssl_readyReadOutgoing(int)));
connect(ssl, TQ_SIGNAL(closed()), TQ_SLOT(ssl_closed()));
connect(ssl, TQ_SIGNAL(error(int)), TQ_SLOT(ssl_error(int)));
rootCerts.setAutoDelete(true);
rootCerts = getRootCerts("/usr/local/share/psi/certs/rootcert.xml");
@ -267,7 +267,7 @@ int main(int argc, char **argv)
}
SecureTest *s = new SecureTest;
TQObject::connect(s, SIGNAL(quit()), &app, SLOT(quit()));
TQObject::connect(s, TQ_SIGNAL(quit()), &app, TQ_SLOT(quit()));
s->start(host);
app.exec();
delete s;

@ -907,7 +907,7 @@ bool TLS::startClient(const TQString &host)
if(!d->c->startClient(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
TQTimer::singleShot(0, this, TQT_SLOT(update()));
TQTimer::singleShot(0, this, TQ_SLOT(update()));
return true;
}
@ -917,7 +917,7 @@ bool TLS::startServer()
if(!d->c->startServer(d->store, *d->ourCert.d->c, *d->ourKey.d->c))
return false;
TQTimer::singleShot(0, this, TQT_SLOT(update()));
TQTimer::singleShot(0, this, TQ_SLOT(update()));
return true;
}
@ -927,7 +927,7 @@ void TLS::close()
return;
d->closing = true;
TQTimer::singleShot(0, this, TQT_SLOT(update()));
TQTimer::singleShot(0, this, TQ_SLOT(update()));
}
bool TLS::isHandshaken() const
@ -1270,7 +1270,7 @@ bool SASL::startClient(const TQString &service, const TQString &host, const TQSt
d->first = true;
d->server = false;
d->tried = false;
TQTimer::singleShot(0, this, TQT_SLOT(tryAgain()));
TQTimer::singleShot(0, this, TQ_SLOT(tryAgain()));
return true;
}

Loading…
Cancel
Save