mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-26 11:34:32 +00:00
Move to the new connect syntax
QProcess::errorOccurred is since 5.6 so increase min version
This commit is contained in:
parent
9e9366bbef
commit
7df8f7e215
@ -44,7 +44,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" )
|
||||
# Do not automatically link Qt executables to qtmain target on Windows.
|
||||
# QCA exucatables use console mode only. Not need to link against qtmain.lib.
|
||||
set(Qt5_NO_LINK_QTMAIN ON)
|
||||
find_package(Qt5 5.5 REQUIRED Core)
|
||||
find_package(Qt5 5.6 REQUIRED Core)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
|
||||
include(QcaMacro)
|
||||
|
@ -42,8 +42,7 @@ public:
|
||||
// When the PasswordAsker or TokenAsker needs to interact
|
||||
// with the user, it raises a signal. We connect that to a
|
||||
// local slot to get the required information.
|
||||
connect( &m_handler, SIGNAL( eventReady(int, const QCA::Event &) ),
|
||||
SLOT( my_eventReady(int, const QCA::Event &) ) );
|
||||
connect( &m_handler, &QCA::EventHandler::eventReady, this, &ClientPassphraseHandler::my_eventReady );
|
||||
|
||||
// Now that we are set up, we can start the EventHandler. Nothing
|
||||
// will happen if you don't call this method.
|
||||
@ -130,7 +129,7 @@ int main(int argc, char **argv)
|
||||
|
||||
// handler and asker cannot occur in the same thread
|
||||
AskerThread askerThread;
|
||||
QObject::connect(&askerThread, SIGNAL(finished()), &exampleApp, SLOT(quit()));
|
||||
QObject::connect(&askerThread, &AskerThread::finished, &exampleApp, &QCoreApplication::quit);
|
||||
askerThread.start();
|
||||
|
||||
exampleApp.exec();
|
||||
|
@ -39,8 +39,7 @@ public:
|
||||
|
||||
PassphraseHandler(QObject *parent = nullptr) : QObject(parent)
|
||||
{
|
||||
connect(&handler, SIGNAL(eventReady(int, const QCA::Event &)),
|
||||
SLOT(eh_eventReady(int, const QCA::Event &)));
|
||||
connect(&handler, &QCA::EventHandler::eventReady, this, &PassphraseHandler::eh_eventReady);
|
||||
handler.start();
|
||||
}
|
||||
|
||||
@ -70,7 +69,7 @@ public:
|
||||
|
||||
App()
|
||||
{
|
||||
connect(&keyLoader, SIGNAL(finished()), SLOT(kl_finished()));
|
||||
connect(&keyLoader, &QCA::KeyLoader::finished, this, &App::kl_finished);
|
||||
}
|
||||
|
||||
public Q_SLOTS:
|
||||
@ -111,7 +110,7 @@ int main(int argc, char **argv)
|
||||
PassphraseHandler passphraseHandler;
|
||||
App app;
|
||||
app.str = argv[1];
|
||||
QObject::connect(&app, SIGNAL(quit()), &qapp, SLOT(quit()));
|
||||
QObject::connect(&app, &App::quit, &qapp, QCoreApplication::quit);
|
||||
QTimer::singleShot(0, &app, SLOT(start()));
|
||||
qapp.exec();
|
||||
return 0;
|
||||
|
@ -126,18 +126,18 @@ public:
|
||||
waitCycles(0)
|
||||
{
|
||||
sock = new QTcpSocket(this);
|
||||
connect(sock, SIGNAL(connected()), SLOT(sock_connected()));
|
||||
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
|
||||
connect(sock, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(sock_error(QAbstractSocket::SocketError)));
|
||||
connect(sock, &QTcpSocket::connected, this, &ClientTest::sock_connected);
|
||||
connect(sock, &QTcpSocket::readyRead, this, &ClientTest::sock_readyRead);
|
||||
connect(sock, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &ClientTest::sock_error);
|
||||
|
||||
sasl = new QCA::SASL(this);
|
||||
connect(sasl, SIGNAL(clientStarted(bool, const QByteArray &)), SLOT(sasl_clientFirstStep(bool, const QByteArray &)));
|
||||
connect(sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
|
||||
connect(sasl, SIGNAL(needParams(const QCA::SASL::Params &)), SLOT(sasl_needParams(const QCA::SASL::Params &)));
|
||||
connect(sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
|
||||
connect(sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
|
||||
connect(sasl, SIGNAL(readyReadOutgoing()), SLOT(sasl_readyReadOutgoing()));
|
||||
connect(sasl, SIGNAL(error()), SLOT(sasl_error()));
|
||||
connect(sasl, &QCA::SASL::clientStarted, this, &ClientTest::sasl_clientFirstStep);
|
||||
connect(sasl, &QCA::SASL::nextStep, this, &ClientTest::sasl_nextStep);
|
||||
connect(sasl, &QCA::SASL::needParams, this, &ClientTest::sasl_needParams);
|
||||
connect(sasl, &QCA::SASL::authenticated, this, &ClientTest::sasl_authenticated);
|
||||
connect(sasl, &QCA::SASL::readyRead, this, &ClientTest::sasl_readyRead);
|
||||
connect(sasl, &QCA::SASL::readyReadOutgoing, this, &ClientTest::sasl_readyReadOutgoing);
|
||||
connect(sasl, &QCA::SASL::error, this, &ClientTest::sasl_error);
|
||||
}
|
||||
|
||||
public Q_SLOTS:
|
||||
@ -559,7 +559,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
ClientTest client(host, port, proto, authzid, realm, user, pass, no_authzid, no_realm);
|
||||
QObject::connect(&client, SIGNAL(quit()), &qapp, SLOT(quit()));
|
||||
QObject::connect(&client, &ClientTest::quit, &qapp, &QCoreApplication::quit);
|
||||
QTimer::singleShot(0, &client, SLOT(start()));
|
||||
qapp.exec();
|
||||
|
||||
|
@ -153,19 +153,19 @@ public:
|
||||
id = serverTest->reserveId();
|
||||
|
||||
sock->setParent(this);
|
||||
connect(sock, SIGNAL(disconnected()), SLOT(sock_disconnected()));
|
||||
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
|
||||
connect(sock, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(sock_error(QAbstractSocket::SocketError)));
|
||||
connect(sock, SIGNAL(bytesWritten(qint64)), SLOT(sock_bytesWritten(qint64)));
|
||||
connect(sock, &QTcpSocket::disconnected, this, &ServerTestHandler::sock_disconnected);
|
||||
connect(sock, &QTcpSocket::readyRead, this, &ServerTestHandler::sock_readyRead);
|
||||
connect(sock, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &ServerTestHandler::sock_error);
|
||||
connect(sock, &QTcpSocket::bytesWritten, this, &ServerTestHandler::sock_bytesWritten);
|
||||
|
||||
sasl = new QCA::SASL(this);
|
||||
connect(sasl, SIGNAL(authCheck(const QString &, const QString &)), SLOT(sasl_authCheck(const QString &, const QString &)));
|
||||
connect(sasl, SIGNAL(nextStep(const QByteArray &)), SLOT(sasl_nextStep(const QByteArray &)));
|
||||
connect(sasl, SIGNAL(authenticated()), SLOT(sasl_authenticated()));
|
||||
connect(sasl, SIGNAL(readyRead()), SLOT(sasl_readyRead()));
|
||||
connect(sasl, SIGNAL(readyReadOutgoing()), SLOT(sasl_readyReadOutgoing()));
|
||||
connect(sasl, SIGNAL(error()), SLOT(sasl_error()));
|
||||
connect(sasl, SIGNAL(serverStarted()), SLOT(sasl_serverStarted()));
|
||||
connect(sasl, &QCA::SASL::authCheck, this, &ServerTestHandler::sasl_authCheck);
|
||||
connect(sasl, &QCA::SASL::nextStep, this, &ServerTestHandler::sasl_nextStep);
|
||||
connect(sasl, &QCA::SASL::authenticated, this, &ServerTestHandler::sasl_authenticated);
|
||||
connect(sasl, &QCA::SASL::readyRead, this, &ServerTestHandler::sasl_readyRead);
|
||||
connect(sasl, &QCA::SASL::readyReadOutgoing, this, &ServerTestHandler::sasl_readyReadOutgoing);
|
||||
connect(sasl, &QCA::SASL::error, this, &ServerTestHandler::sasl_error);
|
||||
connect(sasl, &QCA::SASL::serverStarted, this, &ServerTestHandler::sasl_serverStarted);
|
||||
|
||||
mode = 0; // mech list mode
|
||||
toWrite = 0;
|
||||
@ -393,7 +393,7 @@ ServerTest::ServerTest(const QString &_host, int _port, const QString &_proto, c
|
||||
port(_port)
|
||||
{
|
||||
tcpServer = new QTcpServer(this);
|
||||
connect(tcpServer, SIGNAL(newConnection()), SLOT(server_newConnection()));
|
||||
connect(tcpServer, &QTcpServer::newConnection, this, &ServerTest::server_newConnection);
|
||||
}
|
||||
|
||||
int ServerTest::reserveId()
|
||||
@ -504,7 +504,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
ServerTest server(host, port, proto, realm, str);
|
||||
QObject::connect(&server, SIGNAL(quit()), &qapp, SLOT(quit()));
|
||||
QObject::connect(&server, &ServerTest::quit, &qapp, &QCoreApplication::quit);
|
||||
QTimer::singleShot(0, &server, SLOT(start()));
|
||||
qapp.exec();
|
||||
|
||||
|
@ -79,14 +79,14 @@ public:
|
||||
SecureServer(quint16 _port) : port(_port)
|
||||
{
|
||||
server = new QTcpServer;
|
||||
connect( server, SIGNAL(newConnection()), SLOT(server_handleConnection()) );
|
||||
connect( server, &QTcpServer::newConnection, this, &SecureServer::server_handleConnection );
|
||||
|
||||
ssl = new QCA::TLS;
|
||||
connect(ssl, SIGNAL(handshaken()), SLOT(ssl_handshaken()));
|
||||
connect(ssl, SIGNAL(readyRead()), SLOT(ssl_readyRead()));
|
||||
connect(ssl, SIGNAL(readyReadOutgoing()), SLOT(ssl_readyReadOutgoing()));
|
||||
connect(ssl, SIGNAL(closed()), SLOT(ssl_closed()));
|
||||
connect(ssl, SIGNAL(error()), SLOT(ssl_error()));
|
||||
connect(ssl, &QCA::TLS::handshaken, this, &SecureServer::ssl_handshaken);
|
||||
connect(ssl, &QCA::TLS::readyRead, this, &SecureServer::ssl_readyRead);
|
||||
connect(ssl, &QCA::TLS::readyReadOutgoing, this, &SecureServer::ssl_readyReadOutgoing);
|
||||
connect(ssl, &QCA::TLS::closed, this, &SecureServer::ssl_closed);
|
||||
connect(ssl, &QCA::TLS::error, this, &SecureServer::ssl_error);
|
||||
|
||||
cert = QCA::Certificate::fromPEM(pemdata_cert);
|
||||
privkey = QCA::PrivateKey::fromPEM(pemdata_privkey);
|
||||
@ -104,17 +104,17 @@ public:
|
||||
{
|
||||
if(cert.isNull()) {
|
||||
qDebug() << "Error loading cert!";
|
||||
QTimer::singleShot(0, this, SIGNAL(quit()));
|
||||
QTimer::singleShot(0, this, &SecureServer::quit);
|
||||
return;
|
||||
}
|
||||
if(privkey.isNull()) {
|
||||
qDebug() << "Error loading private key!";
|
||||
QTimer::singleShot(0, this, SIGNAL(quit()));
|
||||
QTimer::singleShot(0, this, &SecureServer::quit);
|
||||
return;
|
||||
}
|
||||
if(false == server->listen(QHostAddress::Any, port)) {
|
||||
qDebug() << "Error binding to port " << port;
|
||||
QTimer::singleShot(0, this, SIGNAL(quit()));
|
||||
QTimer::singleShot(0, this, &SecureServer::quit);
|
||||
return;
|
||||
}
|
||||
qDebug() << "Listening on port" << port;
|
||||
@ -145,17 +145,16 @@ private Q_SLOTS:
|
||||
if(mode != Idle) {
|
||||
QTcpSocket* tmp = server->nextPendingConnection();
|
||||
tmp->close();
|
||||
connect(tmp, SIGNAL(disconnected()), tmp, SLOT(deleteLater()));
|
||||
connect(tmp, &QTcpSocket::disconnected, tmp, &QTcpSocket::deleteLater);
|
||||
qDebug() << "throwing away extra connection";
|
||||
return;
|
||||
}
|
||||
mode = Handshaking;
|
||||
sock = server->nextPendingConnection();
|
||||
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
|
||||
connect(sock, SIGNAL(disconnected()), SLOT(sock_disconnected()));
|
||||
connect(sock, SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
SLOT(sock_error(QAbstractSocket::SocketError)));
|
||||
connect(sock, SIGNAL(bytesWritten(qint64)), SLOT(sock_bytesWritten(qint64)));
|
||||
connect(sock, &QTcpSocket::readyRead, this, &SecureServer::sock_readyRead);
|
||||
connect(sock, &QTcpSocket::disconnected, this, &SecureServer::sock_disconnected);
|
||||
connect(sock, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &SecureServer::sock_error);
|
||||
connect(sock, &QTcpSocket::bytesWritten, this, &SecureServer::sock_bytesWritten);
|
||||
|
||||
qDebug() << "Connection received! Starting TLS handshake.";
|
||||
ssl->setCertificate(cert, privkey);
|
||||
@ -264,7 +263,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
SecureServer *server = new SecureServer(port);
|
||||
QObject::connect(server, SIGNAL(quit()), &app, SLOT(quit()));
|
||||
QObject::connect(server, &SecureServer::quit, &app, &QCoreApplication::quit);
|
||||
server->start();
|
||||
app.exec();
|
||||
delete server;
|
||||
|
@ -111,19 +111,17 @@ public:
|
||||
ssl_done = false;
|
||||
|
||||
sock = new QTcpSocket;
|
||||
connect(sock, SIGNAL(connected()), SLOT(sock_connected()));
|
||||
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
|
||||
connect(sock, SIGNAL(error(QAbstractSocket::SocketError)),
|
||||
SLOT(sock_error(QAbstractSocket::SocketError)));
|
||||
connect(sock, &QTcpSocket::connected, this, &SecureTest::sock_connected);
|
||||
connect(sock, &QTcpSocket::readyRead, this, &SecureTest::sock_readyRead);
|
||||
connect(sock, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &SecureTest::sock_error);
|
||||
|
||||
ssl = new QCA::TLS;
|
||||
connect(ssl, SIGNAL(certificateRequested()), SLOT(ssl_certificateRequested()));
|
||||
connect(ssl, SIGNAL(handshaken()), SLOT(ssl_handshaken()));
|
||||
connect(ssl, SIGNAL(readyRead()), SLOT(ssl_readyRead()));
|
||||
connect(ssl, SIGNAL(readyReadOutgoing()),
|
||||
SLOT(ssl_readyReadOutgoing()));
|
||||
connect(ssl, SIGNAL(closed()), SLOT(ssl_closed()));
|
||||
connect(ssl, SIGNAL(error()), SLOT(ssl_error()));
|
||||
connect(ssl, &QCA::TLS::certificateRequested, this, &SecureTest::ssl_certificateRequested);
|
||||
connect(ssl, &QCA::TLS::handshaken, this, &SecureTest::ssl_handshaken);
|
||||
connect(ssl, &QCA::TLS::readyRead, this, &SecureTest::ssl_readyRead);
|
||||
connect(ssl, &QCA::TLS::readyReadOutgoing, this, &SecureTest::ssl_readyReadOutgoing);
|
||||
connect(ssl, &QCA::TLS::closed, this, &SecureTest::ssl_closed);
|
||||
connect(ssl, &QCA::TLS::error, this, &SecureTest::ssl_error);
|
||||
}
|
||||
|
||||
~SecureTest()
|
||||
@ -327,7 +325,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
SecureTest *s = new SecureTest;
|
||||
QObject::connect(s, SIGNAL(quit()), &app, SLOT(quit()));
|
||||
QObject::connect(s, &SecureTest::quit, &app, &QCoreApplication::quit);
|
||||
s->start(host);
|
||||
app.exec();
|
||||
delete s;
|
||||
|
@ -42,17 +42,17 @@ public:
|
||||
Private(TLSSocket *_q) : QObject(_q), q(_q), sync(_q)
|
||||
{
|
||||
sock = new QTcpSocket(this);
|
||||
connect(sock, SIGNAL(connected()), SLOT(sock_connected()));
|
||||
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
|
||||
connect(sock, SIGNAL(bytesWritten(qint64)), SLOT(sock_bytesWritten(qint64)));
|
||||
connect(sock, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(sock_error(QAbstractSocket::SocketError)));
|
||||
connect(sock, &QTcpSocket::connected, this, &TLSSocket::Private::sock_connected);
|
||||
connect(sock, &QTcpSocket::readyRead, this, &TLSSocket::Private::sock_readyRead);
|
||||
connect(sock, &QTcpSocket::bytesWritten, this, &TLSSocket::Private::sock_bytesWritten);
|
||||
connect(sock, QOverload<QAbstractSocket::SocketError>::of(&QTcpSocket::error), this, &TLSSocket::Private::sock_error);
|
||||
|
||||
tls = new QCA::TLS(this);
|
||||
connect(tls, SIGNAL(handshaken()), SLOT(tls_handshaken()));
|
||||
connect(tls, SIGNAL(readyRead()), SLOT(tls_readyRead()));
|
||||
connect(tls, SIGNAL(readyReadOutgoing()), SLOT(tls_readyReadOutgoing()));
|
||||
connect(tls, SIGNAL(closed()), SLOT(tls_closed()));
|
||||
connect(tls, SIGNAL(error()), SLOT(tls_error()));
|
||||
connect(tls, &QCA::TLS::handshaken, this, &TLSSocket::Private::tls_handshaken);
|
||||
connect(tls, &QCA::TLS::readyRead, this, &TLSSocket::Private::tls_readyRead);
|
||||
connect(tls, &QCA::TLS::readyReadOutgoing, this, &TLSSocket::Private::tls_readyReadOutgoing);
|
||||
connect(tls, &QCA::TLS::closed, this, &TLSSocket::Private::tls_closed);
|
||||
connect(tls, &QCA::TLS::error, this, &TLSSocket::Private::tls_error);
|
||||
tls->setTrustedCertificates(QCA::systemStore());
|
||||
encrypted = false;
|
||||
error = false;
|
||||
|
@ -90,7 +90,7 @@ if(entry.ensureAvailable())
|
||||
|
||||
\code
|
||||
KeyStoreEntryWatcher *watcher = new KeyStoreEntryWatcher(entry);
|
||||
connect(watcher, SIGNAL(available()), SLOT(entry_available()));
|
||||
connect(watcher, &KeyStoreEntryWatcher::available, this, &YourClass::entry_available);
|
||||
...
|
||||
void entry_available()
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ public:
|
||||
Counter() : timer(this)
|
||||
{
|
||||
x = 0;
|
||||
connect(&timer, SIGNAL(timeout()), SLOT(t_timeout()));
|
||||
connect(&timer, &QTimer::timeout, this, &Counter::t_timeout);
|
||||
}
|
||||
|
||||
public slots:
|
||||
|
@ -224,16 +224,16 @@ GpgAction::GpgAction(QObject *parent)
|
||||
{
|
||||
dtextTimer.setSingleShot(true);
|
||||
|
||||
connect(&proc, SIGNAL(error(gpgQCAPlugin::GPGProc::Error)), SLOT(proc_error(gpgQCAPlugin::GPGProc::Error)));
|
||||
connect(&proc, SIGNAL(finished(int)), SLOT(proc_finished(int)));
|
||||
connect(&proc, SIGNAL(readyReadStdout()), SLOT(proc_readyReadStdout()));
|
||||
connect(&proc, SIGNAL(readyReadStderr()), SLOT(proc_readyReadStderr()));
|
||||
connect(&proc, SIGNAL(readyReadStatusLines()), SLOT(proc_readyReadStatusLines()));
|
||||
connect(&proc, SIGNAL(bytesWrittenStdin(int)), SLOT(proc_bytesWrittenStdin(int)));
|
||||
connect(&proc, SIGNAL(bytesWrittenAux(int)), SLOT(proc_bytesWrittenAux(int)));
|
||||
connect(&proc, SIGNAL(bytesWrittenCommand(int)), SLOT(proc_bytesWrittenCommand(int)));
|
||||
connect(&proc, SIGNAL(debug(const QString &)), SLOT(proc_debug(const QString &)));
|
||||
connect(&dtextTimer, SIGNAL(timeout()), SLOT(t_dtext()));
|
||||
connect(&proc, &GPGProc::error, this, &GpgAction::proc_error);
|
||||
connect(&proc, &GPGProc::finished, this, &GpgAction::proc_finished);
|
||||
connect(&proc, &GPGProc::readyReadStdout, this, &GpgAction::proc_readyReadStdout);
|
||||
connect(&proc, &GPGProc::readyReadStderr, this, &GpgAction::proc_readyReadStderr);
|
||||
connect(&proc, &GPGProc::readyReadStatusLines, this, &GpgAction::proc_readyReadStatusLines);
|
||||
connect(&proc, &GPGProc::bytesWrittenStdin, this, &GpgAction::proc_bytesWrittenStdin);
|
||||
connect(&proc, &GPGProc::bytesWrittenAux, this, &GpgAction::proc_bytesWrittenAux);
|
||||
connect(&proc, &GPGProc::bytesWrittenCommand, this, &GpgAction::proc_bytesWrittenCommand);
|
||||
connect(&proc, &GPGProc::debug, this, &GpgAction::proc_debug);
|
||||
connect(&dtextTimer, &QCA::SafeTimer::timeout, this, &GpgAction::t_dtext);
|
||||
|
||||
reset();
|
||||
}
|
||||
|
@ -78,12 +78,12 @@ void GpgOp::Private::make_act(GpgOp::Type _op)
|
||||
|
||||
act = new GpgAction(this);
|
||||
|
||||
connect(act, SIGNAL(readyRead()), SLOT(act_readyRead()));
|
||||
connect(act, SIGNAL(bytesWritten(int)), SLOT(act_bytesWritten(int)));
|
||||
connect(act, SIGNAL(needPassphrase(const QString &)), SLOT(act_needPassphrase(const QString &)));
|
||||
connect(act, SIGNAL(needCard()), SLOT(act_needCard()));
|
||||
connect(act, SIGNAL(finished()), SLOT(act_finished()));
|
||||
connect(act, SIGNAL(readyReadDiagnosticText()), SLOT(act_readyReadDiagnosticText()));
|
||||
connect(act, &GpgAction::readyRead, this, &GpgOp::Private::act_readyRead);
|
||||
connect(act, &GpgAction::bytesWritten, this, &GpgOp::Private::act_bytesWritten);
|
||||
connect(act, &GpgAction::needPassphrase, this, &GpgOp::Private::act_needPassphrase);
|
||||
connect(act, &GpgAction::needCard, this, &GpgOp::Private::act_needCard);
|
||||
connect(act, &GpgAction::finished, this, &GpgOp::Private::act_finished);
|
||||
connect(act, &GpgAction::readyReadDiagnosticText, this, &GpgOp::Private::act_readyReadDiagnosticText);
|
||||
|
||||
act->input.bin = bin;
|
||||
act->input.op = op;
|
||||
|
@ -54,14 +54,14 @@ GPGProc::Private::Private(GPGProc *_q)
|
||||
startTrigger.setSingleShot(true);
|
||||
doneTrigger.setSingleShot(true);
|
||||
|
||||
connect(&pipeAux.writeEnd(), SIGNAL(bytesWritten(int)), SLOT(aux_written(int)));
|
||||
connect(&pipeAux.writeEnd(), SIGNAL(error(QCA::QPipeEnd::Error)), SLOT(aux_error(QCA::QPipeEnd::Error)));
|
||||
connect(&pipeCommand.writeEnd(), SIGNAL(bytesWritten(int)), SLOT(command_written(int)));
|
||||
connect(&pipeCommand.writeEnd(), SIGNAL(error(QCA::QPipeEnd::Error)), SLOT(command_error(QCA::QPipeEnd::Error)));
|
||||
connect(&pipeStatus.readEnd(), SIGNAL(readyRead()), SLOT(status_read()));
|
||||
connect(&pipeStatus.readEnd(), SIGNAL(error(QCA::QPipeEnd::Error)), SLOT(status_error(QCA::QPipeEnd::Error)));
|
||||
connect(&startTrigger, SIGNAL(timeout()), SLOT(doStart()));
|
||||
connect(&doneTrigger, SIGNAL(timeout()), SLOT(doTryDone()));
|
||||
connect(&pipeAux.writeEnd(), &QCA::QPipeEnd::bytesWritten, this, &GPGProc::Private::aux_written);
|
||||
connect(&pipeAux.writeEnd(), &QCA::QPipeEnd::error, this, &GPGProc::Private::aux_error);
|
||||
connect(&pipeCommand.writeEnd(), &QCA::QPipeEnd::bytesWritten, this, &GPGProc::Private::command_written);
|
||||
connect(&pipeCommand.writeEnd(), &QCA::QPipeEnd::error, this, &GPGProc::Private::command_error);
|
||||
connect(&pipeStatus.readEnd(), &QCA::QPipeEnd::readyRead, this, &GPGProc::Private::status_read);
|
||||
connect(&pipeStatus.readEnd(), &QCA::QPipeEnd::error, this, &GPGProc::Private::status_error);
|
||||
connect(&startTrigger, &QCA::SafeTimer::timeout, this, &GPGProc::Private::doStart);
|
||||
connect(&doneTrigger, &QCA::SafeTimer::timeout, this, &GPGProc::Private::doTryDone);
|
||||
|
||||
reset(ResetSessionAndData);
|
||||
}
|
||||
@ -544,19 +544,19 @@ void GPGProc::start(const QString &bin, const QStringList &args, Mode mode)
|
||||
|
||||
#ifdef QPROC_SIGNAL_RELAY
|
||||
d->proc_relay = new QProcessSignalRelay(d->proc, d);
|
||||
connect(d->proc_relay, SIGNAL(started()), d, SLOT(proc_started()));
|
||||
connect(d->proc_relay, SIGNAL(readyReadStandardOutput()), d, SLOT(proc_readyReadStandardOutput()));
|
||||
connect(d->proc_relay, SIGNAL(readyReadStandardError()), d, SLOT(proc_readyReadStandardError()));
|
||||
connect(d->proc_relay, SIGNAL(bytesWritten(qint64)), d, SLOT(proc_bytesWritten(qint64)));
|
||||
connect(d->proc_relay, SIGNAL(finished(int)), d, SLOT(proc_finished(int)));
|
||||
connect(d->proc_relay, SIGNAL(error(QProcess::ProcessError)), d, SLOT(proc_error(QProcess::ProcessError)));
|
||||
connect(d->proc_relay, &QProcessSignalRelay::started, d, &GPGProc::Private::proc_started);
|
||||
connect(d->proc_relay, &QProcessSignalRelay::readyReadStandardOutput, d, &GPGProc::Private::proc_readyReadStandardOutput);
|
||||
connect(d->proc_relay, &QProcessSignalRelay::readyReadStandardError, d, &GPGProc::Private::proc_readyReadStandardError);
|
||||
connect(d->proc_relay, &QProcessSignalRelay::bytesWritten, d, &GPGProc::Private::proc_bytesWritten);
|
||||
connect(d->proc_relay, &QProcessSignalRelay::finished, d, &GPGProc::Private::proc_finished);
|
||||
connect(d->proc_relay, &QProcessSignalRelay::error, d, &GPGProc::Private::proc_error);
|
||||
#else
|
||||
connect(d->proc, SIGNAL(started()), d, SLOT(proc_started()));
|
||||
connect(d->proc, SIGNAL(readyReadStandardOutput()), d, SLOT(proc_readyReadStandardOutput()));
|
||||
connect(d->proc, SIGNAL(readyReadStandardError()), d, SLOT(proc_readyReadStandardError()));
|
||||
connect(d->proc, SIGNAL(bytesWritten(qint64)), d, SLOT(proc_bytesWritten(qint64)));
|
||||
connect(d->proc, SIGNAL(finished(int)), d, SLOT(proc_finished(int)));
|
||||
connect(d->proc, SIGNAL(error(QProcess::ProcessError)), d, SLOT(proc_error(QProcess::ProcessError)));
|
||||
connect(d->proc, &SProcess::started, d, &GPGProc::Private::proc_started);
|
||||
connect(d->proc, &SProcess::readyReadStandardOutput, d, &GPGProc::Private::proc_readyReadStandardOutput);
|
||||
connect(d->proc, &SProcess::readyReadStandardError, d, &GPGProc::Private::proc_readyReadStandardError);
|
||||
connect(d->proc, &SProcess::bytesWritten, d, &GPGProc::Private::proc_bytesWritten);
|
||||
connect(d->proc, QOverload<int,QProcess::ExitStatus>::of(&SProcess::finished), d, &GPGProc::Private::proc_finished);
|
||||
connect(d->proc, &SProcess::errorOccurred, d, &GPGProc::Private::proc_error);
|
||||
#endif
|
||||
|
||||
d->bin = bin;
|
||||
|
@ -36,12 +36,12 @@ public:
|
||||
:QObject(parent)
|
||||
{
|
||||
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
|
||||
connect(proc, SIGNAL(started()), SLOT(proc_started()), Qt::QueuedConnection);
|
||||
connect(proc, SIGNAL(readyReadStandardOutput()), SLOT(proc_readyReadStandardOutput()), Qt::QueuedConnection);
|
||||
connect(proc, SIGNAL(readyReadStandardError()), SLOT(proc_readyReadStandardError()), Qt::QueuedConnection);
|
||||
connect(proc, SIGNAL(bytesWritten(qint64)), SLOT(proc_bytesWritten(qint64)), Qt::QueuedConnection);
|
||||
connect(proc, SIGNAL(finished(int)), SLOT(proc_finished(int)), Qt::QueuedConnection);
|
||||
connect(proc, SIGNAL(error(QProcess::ProcessError)), SLOT(proc_error(QProcess::ProcessError)), Qt::QueuedConnection);
|
||||
connect(proc, &QProcess::started, this, &QProcessSignalRelay::proc_started, Qt::QueuedConnection);
|
||||
connect(proc, &QProcess::readyReadStandardOutput, this, &QProcessSignalRelay::proc_readyReadStandardOutput, Qt::QueuedConnection);
|
||||
connect(proc, &QProcess::readyReadStandardError, this, &QProcessSignalRelay::proc_readyReadStandardError, Qt::QueuedConnection);
|
||||
connect(proc, &QProcess::bytesWritten, this, &QProcessSignalRelay::proc_bytesWritten, Qt::QueuedConnection);
|
||||
connect(proc, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), this, &QProcessSignalRelay::proc_finished, Qt::QueuedConnection);
|
||||
connect(proc, &QProcess::errorOccurred, this, &QProcessSignalRelay::proc_error, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
|
@ -41,8 +41,8 @@ MyKeyStoreList::MyKeyStoreList(Provider *p)
|
||||
QMutexLocker locker(ksl_mutex());
|
||||
keyStoreList = this;
|
||||
|
||||
connect(&gpg, SIGNAL(finished()), SLOT(gpg_finished()));
|
||||
connect(&ringWatch, SIGNAL(changed(const QString &)), SLOT(ring_changed(const QString &)));
|
||||
connect(&gpg, &GpgOp::finished, this, &MyKeyStoreList::gpg_finished);
|
||||
connect(&ringWatch, &RingWatch::changed, this, &MyKeyStoreList::ring_changed);
|
||||
}
|
||||
|
||||
MyKeyStoreList::~MyKeyStoreList()
|
||||
|
@ -37,15 +37,15 @@ MyMessageContext::MyMessageContext(MyOpenPGPContext *_sms, Provider *p)
|
||||
, wasSigned(false)
|
||||
, op_err(GpgOp::ErrorUnknown), gpg(find_bin()) ,_finished(false)
|
||||
{
|
||||
connect(&gpg, SIGNAL(readyRead()), SLOT(gpg_readyRead()));
|
||||
connect(&gpg, SIGNAL(bytesWritten(int)), SLOT(gpg_bytesWritten(int)));
|
||||
connect(&gpg, SIGNAL(finished()), SLOT(gpg_finished()));
|
||||
connect(&gpg, SIGNAL(needPassphrase(const QString &)), SLOT(gpg_needPassphrase(const QString &)));
|
||||
connect(&gpg, SIGNAL(needCard()), SLOT(gpg_needCard()));
|
||||
connect(&gpg, SIGNAL(readyReadDiagnosticText()), SLOT(gpg_readyReadDiagnosticText()));
|
||||
connect(&gpg, &GpgOp::readyRead, this, &MyMessageContext::gpg_readyRead);
|
||||
connect(&gpg, &GpgOp::bytesWritten, this, &MyMessageContext::gpg_bytesWritten);
|
||||
connect(&gpg, &GpgOp::finished, this, &MyMessageContext::gpg_finished);
|
||||
connect(&gpg, &GpgOp::needPassphrase, this, &MyMessageContext::gpg_needPassphrase);
|
||||
connect(&gpg, &GpgOp::needCard, this, &MyMessageContext::gpg_needCard);
|
||||
connect(&gpg, &GpgOp::readyReadDiagnosticText, this, &MyMessageContext::gpg_readyReadDiagnosticText);
|
||||
|
||||
connect(&asker, SIGNAL(responseReady()), SLOT(asker_responseReady()));
|
||||
connect(&tokenAsker, SIGNAL(responseReady()), SLOT(tokenAsker_responseReady()));
|
||||
connect(&asker, &QCA::PasswordAsker::responseReady, this, &MyMessageContext::asker_responseReady);
|
||||
connect(&tokenAsker, &QCA::TokenAsker::responseReady, this, &MyMessageContext::tokenAsker_responseReady);
|
||||
}
|
||||
|
||||
Provider::Context *MyMessageContext::clone() const
|
||||
|
@ -71,11 +71,11 @@ void RingWatch::add(const QString &filePath)
|
||||
|
||||
DirItem di;
|
||||
di.dirWatch = new DirWatch(path, this);
|
||||
connect(di.dirWatch, SIGNAL(changed()), SLOT(dirChanged()));
|
||||
connect(di.dirWatch, &DirWatch::changed, this, &RingWatch::dirChanged);
|
||||
|
||||
di.changeTimer = new SafeTimer(this);
|
||||
di.changeTimer->setSingleShot(true);
|
||||
connect(di.changeTimer, SIGNAL(timeout()), SLOT(handleChanged()));
|
||||
connect(di.changeTimer, &SafeTimer::timeout, this, &RingWatch::handleChanged);
|
||||
|
||||
dirWatch = di.dirWatch;
|
||||
dirs += di;
|
||||
|
@ -1834,7 +1834,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(gm, SIGNAL(finished()), SLOT(gm_finished()));
|
||||
connect(gm, &DLGroupMaker::finished, this, &MyDLGroup::gm_finished);
|
||||
gm->start();
|
||||
}
|
||||
}
|
||||
@ -2179,7 +2179,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(keymaker, SIGNAL(finished()), SLOT(km_finished()));
|
||||
connect(keymaker, &RSAKeyMaker::finished, this, &RSAKey::km_finished);
|
||||
keymaker->start();
|
||||
}
|
||||
}
|
||||
@ -2474,7 +2474,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(keymaker, SIGNAL(finished()), SLOT(km_finished()));
|
||||
connect(keymaker, &DSAKeyMaker::finished, this, &DSAKey::km_finished);
|
||||
keymaker->start();
|
||||
}
|
||||
}
|
||||
@ -2718,7 +2718,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
connect(keymaker, SIGNAL(finished()), SLOT(km_finished()));
|
||||
connect(keymaker, &DHKeyMaker::finished, this, &DHKey::km_finished);
|
||||
keymaker->start();
|
||||
}
|
||||
}
|
||||
@ -6668,7 +6668,7 @@ public:
|
||||
thread->other_certs = other_certs;
|
||||
thread->bi = bi;
|
||||
thread->flags = flags;
|
||||
connect(thread, SIGNAL(finished()), SLOT(thread_finished()));
|
||||
connect(thread, &MyMessageContextThread::finished, this, &MyMessageContext::thread_finished);
|
||||
thread->start();
|
||||
}
|
||||
else if(op == Encrypt)
|
||||
|
@ -2879,7 +2879,7 @@ public:
|
||||
active = true;
|
||||
thread = new KeyLoaderThread(this);
|
||||
// used queued for signal-safety
|
||||
connect(thread, SIGNAL(finished()), SLOT(thread_finished()), Qt::QueuedConnection);
|
||||
connect(thread, &KeyLoaderThread::finished, this, &KeyLoader::Private::thread_finished, Qt::QueuedConnection);
|
||||
thread->in = in;
|
||||
thread->start();
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ public:
|
||||
qRegisterMetaType<CRL>();
|
||||
qRegisterMetaType<PGPKey>();
|
||||
|
||||
connect(this, SIGNAL(updated_p()), SLOT(updated_locked()), Qt::QueuedConnection);
|
||||
connect(this, &KeyStoreTracker::updated_p, this, &KeyStoreTracker::updated_locked, Qt::QueuedConnection);
|
||||
|
||||
startedAll = false;
|
||||
busy = true; // we start out busy
|
||||
@ -187,11 +187,7 @@ public:
|
||||
}
|
||||
|
||||
// thread-safe
|
||||
void addTarget(QObject *ksm)
|
||||
{
|
||||
QMutexLocker locker(&updateMutex);
|
||||
ksm->connect(this, SIGNAL(updated()), SLOT(tracker_updated()), Qt::DirectConnection);
|
||||
}
|
||||
void addTarget(KeyStoreManagerPrivate *ksm);
|
||||
|
||||
// thread-safe
|
||||
void removeTarget(QObject *ksm)
|
||||
@ -418,11 +414,11 @@ private:
|
||||
|
||||
sources += c;
|
||||
busySources += c;
|
||||
connect(c, SIGNAL(busyStart()), SLOT(ksl_busyStart()));
|
||||
connect(c, SIGNAL(busyEnd()), SLOT(ksl_busyEnd()));
|
||||
connect(c, SIGNAL(updated()), SLOT(ksl_updated()));
|
||||
connect(c, SIGNAL(diagnosticText(const QString &)), SLOT(ksl_diagnosticText(const QString &)));
|
||||
connect(c, SIGNAL(storeUpdated(int)), SLOT(ksl_storeUpdated(int)));
|
||||
connect(c, &KeyStoreListContext::busyStart, this, &KeyStoreTracker::ksl_busyStart);
|
||||
connect(c, &KeyStoreListContext::busyEnd, this, &KeyStoreTracker::ksl_busyEnd);
|
||||
connect(c, &KeyStoreListContext::updated, this, &KeyStoreTracker::ksl_updated);
|
||||
connect(c, &KeyStoreListContext::diagnosticText, this, &KeyStoreTracker::ksl_diagnosticText);
|
||||
connect(c, &KeyStoreListContext::storeUpdated, this, &KeyStoreTracker::ksl_storeUpdated);
|
||||
c->start();
|
||||
c->setUpdatesEnabled(true);
|
||||
|
||||
@ -827,7 +823,7 @@ public:
|
||||
{
|
||||
ks = 0;
|
||||
avail = false;
|
||||
connect(&ksm, SIGNAL(keyStoreAvailable(const QString &)), SLOT(ksm_available(const QString &)));
|
||||
connect(&ksm, &KeyStoreManager::keyStoreAvailable, this, &KeyStoreEntryWatcher::Private::ksm_available);
|
||||
}
|
||||
|
||||
~Private()
|
||||
@ -849,7 +845,7 @@ private Q_SLOTS:
|
||||
if(_storeId == storeId)
|
||||
{
|
||||
ks = new KeyStore(storeId, &ksm);
|
||||
connect(ks, SIGNAL(updated()), SLOT(ks_updated()));
|
||||
connect(ks, &KeyStore::updated, this, &Private::ks_updated);
|
||||
ks->startAsynchronousMode();
|
||||
}
|
||||
}
|
||||
@ -1076,7 +1072,7 @@ public:
|
||||
{
|
||||
KeyStoreOperation *op = new KeyStoreOperation(this);
|
||||
// use queued for signal-safety
|
||||
connect(op, SIGNAL(finished()), SLOT(op_finished()), Qt::QueuedConnection);
|
||||
connect(op, &KeyStoreOperation::finished, this, &KeyStorePrivate::op_finished, Qt::QueuedConnection);
|
||||
op->type = KeyStoreOperation::EntryList;
|
||||
op->trackerId = trackerId;
|
||||
ops += op;
|
||||
@ -1087,7 +1083,7 @@ public:
|
||||
{
|
||||
KeyStoreOperation *op = new KeyStoreOperation(this);
|
||||
// use queued for signal-safety
|
||||
connect(op, SIGNAL(finished()), SLOT(op_finished()), Qt::QueuedConnection);
|
||||
connect(op, &KeyStoreOperation::finished, this, &KeyStorePrivate::op_finished, Qt::QueuedConnection);
|
||||
op->type = KeyStoreOperation::WriteEntry;
|
||||
op->trackerId = trackerId;
|
||||
op->wentry = wentry;
|
||||
@ -1099,7 +1095,7 @@ public:
|
||||
{
|
||||
KeyStoreOperation *op = new KeyStoreOperation(this);
|
||||
// use queued for signal-safety
|
||||
connect(op, SIGNAL(finished()), SLOT(op_finished()), Qt::QueuedConnection);
|
||||
connect(op, &KeyStoreOperation::finished, this, &KeyStorePrivate::op_finished, Qt::QueuedConnection);
|
||||
op->type = KeyStoreOperation::RemoveEntry;
|
||||
op->trackerId = trackerId;
|
||||
op->entryId = entryId;
|
||||
@ -1596,6 +1592,13 @@ public Q_SLOTS:
|
||||
}
|
||||
};
|
||||
|
||||
// from KeyStoreTracker
|
||||
void KeyStoreTracker::addTarget(KeyStoreManagerPrivate *ksm)
|
||||
{
|
||||
QMutexLocker locker(&updateMutex);
|
||||
connect(this, &KeyStoreTracker::updated, ksm, &KeyStoreManagerPrivate::tracker_updated, Qt::DirectConnection);
|
||||
}
|
||||
|
||||
// from KeyStorePrivate
|
||||
void KeyStorePrivate::reg()
|
||||
{
|
||||
|
@ -1250,7 +1250,7 @@ PrivateKey KeyGenerator::createRSA(int bits, int exp, const QString &provider)
|
||||
{
|
||||
d->k->moveToThread(thread());
|
||||
d->k->setParent(d);
|
||||
connect(d->k, SIGNAL(finished()), d, SLOT(done()));
|
||||
connect(d->k, &RSAContext::finished, d, &Private::done);
|
||||
static_cast<RSAContext *>(d->k)->createPrivate(bits, exp, false);
|
||||
}
|
||||
else
|
||||
@ -1276,7 +1276,7 @@ PrivateKey KeyGenerator::createDSA(const DLGroup &domain, const QString &provide
|
||||
{
|
||||
d->k->moveToThread(thread());
|
||||
d->k->setParent(d);
|
||||
connect(d->k, SIGNAL(finished()), d, SLOT(done()));
|
||||
connect(d->k, &DSAContext::finished, d, &Private::done);
|
||||
static_cast<DSAContext *>(d->k)->createPrivate(domain, false);
|
||||
}
|
||||
else
|
||||
@ -1302,7 +1302,7 @@ PrivateKey KeyGenerator::createDH(const DLGroup &domain, const QString &provider
|
||||
{
|
||||
d->k->moveToThread(thread());
|
||||
d->k->setParent(d);
|
||||
connect(d->k, SIGNAL(finished()), d, SLOT(done()));
|
||||
connect(d->k, &DHContext::finished, d, &Private::done);
|
||||
static_cast<DHContext *>(d->k)->createPrivate(domain, false);
|
||||
}
|
||||
else
|
||||
@ -1338,7 +1338,7 @@ DLGroup KeyGenerator::createDLGroup(QCA::DLGroupSet set, const QString &provider
|
||||
d->wasBlocking = d->blocking;
|
||||
if(!d->blocking)
|
||||
{
|
||||
connect(d->dc, SIGNAL(finished()), d, SLOT(done_group()));
|
||||
connect(d->dc, &DLGroupContext ::finished, d, &Private::done_group);
|
||||
d->dc->fetchGroup(set, false);
|
||||
}
|
||||
else
|
||||
|
@ -38,7 +38,7 @@ SafeSocketNotifier::SafeSocketNotifier(int socket, QSocketNotifier::Type type, Q
|
||||
QObject(parent)
|
||||
{
|
||||
sn = new QSocketNotifier(socket, type, this);
|
||||
connect(sn, SIGNAL(activated(int)), SIGNAL(activated(int)));
|
||||
connect(sn, &QSocketNotifier::activated, this, &SafeSocketNotifier::activated);
|
||||
}
|
||||
|
||||
SafeSocketNotifier::~SafeSocketNotifier()
|
||||
|
@ -68,7 +68,7 @@ SafeTimer::Private::Private(QObject *parent)
|
||||
, isActive(false)
|
||||
, elapsedTimer(QElapsedTimer())
|
||||
{
|
||||
connect(this, SIGNAL(needFix()), SLOT(fixTimer()), Qt::QueuedConnection);
|
||||
connect(this, &Private::needFix, this, &Private::fixTimer, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void SafeTimer::Private::fixTimer()
|
||||
|
@ -264,7 +264,7 @@ public:
|
||||
connect_handshaken = false;
|
||||
server = false;
|
||||
|
||||
connect(&actionTrigger, SIGNAL(timeout()), SLOT(doNextAction()));
|
||||
connect(&actionTrigger, &SafeTimer::timeout, this, &Private::doNextAction);
|
||||
actionTrigger.setSingleShot(true);
|
||||
|
||||
reset(ResetAll);
|
||||
@ -274,8 +274,8 @@ public:
|
||||
// parent the context to us, so that moveToThread works
|
||||
c->setParent(this);
|
||||
|
||||
connect(c, SIGNAL(resultsReady()), SLOT(tls_resultsReady()));
|
||||
connect(c, SIGNAL(dtlsTimeout()), SLOT(tls_dtlsTimeout()));
|
||||
connect(c, &TLSContext::resultsReady, this, &Private::tls_resultsReady);
|
||||
connect(c, &TLSContext::dtlsTimeout, this, &Private::tls_dtlsTimeout);
|
||||
}
|
||||
|
||||
~Private()
|
||||
@ -1363,7 +1363,7 @@ public:
|
||||
set_password = false;
|
||||
set_realm = false;
|
||||
|
||||
connect(&actionTrigger, SIGNAL(timeout()), SLOT(doNextAction()));
|
||||
connect(&actionTrigger, &SafeTimer::timeout, this, &Private::doNextAction);
|
||||
actionTrigger.setSingleShot(true);
|
||||
|
||||
reset(ResetAll);
|
||||
@ -1373,7 +1373,7 @@ public:
|
||||
// parent the context to us, so that moveToThread works
|
||||
c->setParent(this);
|
||||
|
||||
connect(c, SIGNAL(resultsReady()), SLOT(sasl_resultsReady()));
|
||||
connect(c, &SASLContext::resultsReady, this, &Private::sasl_resultsReady);
|
||||
}
|
||||
|
||||
~Private()
|
||||
|
@ -276,16 +276,16 @@ public:
|
||||
readyReadTrigger.setSingleShot(true);
|
||||
bytesWrittenTrigger.setSingleShot(true);
|
||||
finishedTrigger.setSingleShot(true);
|
||||
connect(&readyReadTrigger, SIGNAL(timeout()), SLOT(t_readyRead()));
|
||||
connect(&bytesWrittenTrigger, SIGNAL(timeout()), SLOT(t_bytesWritten()));
|
||||
connect(&finishedTrigger, SIGNAL(timeout()), SLOT(t_finished()));
|
||||
connect(&readyReadTrigger, &SafeTimer::timeout, this, &Private::t_readyRead);
|
||||
connect(&bytesWrittenTrigger, &SafeTimer::timeout, this, &Private::t_bytesWritten);
|
||||
connect(&finishedTrigger, &SafeTimer::timeout, this, &Private::t_finished);
|
||||
|
||||
reset(ResetAll);
|
||||
}
|
||||
|
||||
void init()
|
||||
{
|
||||
connect(c, SIGNAL(updated()), SLOT(updated()));
|
||||
connect(c, &MessageContext::updated, this, &Private::updated);
|
||||
}
|
||||
|
||||
void reset(ResetMode mode)
|
||||
|
@ -77,17 +77,17 @@ public:
|
||||
if(in_id != INVALID_Q_PIPE_ID)
|
||||
{
|
||||
in.take(in_id, QPipeDevice::Read);
|
||||
connect(&in, SIGNAL(readyRead()), SLOT(in_readyRead()));
|
||||
connect(&in, SIGNAL(closed()), SLOT(in_closed()));
|
||||
connect(&in, SIGNAL(error(QCA::QPipeEnd::Error)), SLOT(in_error(QCA::QPipeEnd::Error)));
|
||||
connect(&in, &QPipeEnd::readyRead, this, &ConsoleWorker::in_readyRead);
|
||||
connect(&in, &QPipeEnd::closed, this, &ConsoleWorker::in_closed);
|
||||
connect(&in, &QPipeEnd::error, this, &ConsoleWorker::in_error);
|
||||
in.enable();
|
||||
}
|
||||
|
||||
if(out_id != INVALID_Q_PIPE_ID)
|
||||
{
|
||||
out.take(out_id, QPipeDevice::Write);
|
||||
connect(&out, SIGNAL(bytesWritten(int)), SLOT(out_bytesWritten(int)));
|
||||
connect(&out, SIGNAL(closed()), SLOT(out_closed()));
|
||||
connect(&out, &QPipeEnd::bytesWritten, this, &ConsoleWorker::out_bytesWritten);
|
||||
connect(&out, &QPipeEnd::closed, this, &ConsoleWorker::out_closed);
|
||||
out.enable();
|
||||
}
|
||||
|
||||
@ -333,10 +333,10 @@ protected:
|
||||
// use direct connections here, so that the emits come from
|
||||
// the other thread. we can also connect to our own
|
||||
// signals to avoid having to make slots just to emit.
|
||||
connect(worker, SIGNAL(readyRead()), SIGNAL(readyRead()), Qt::DirectConnection);
|
||||
connect(worker, SIGNAL(bytesWritten(int)), SIGNAL(bytesWritten(int)), Qt::DirectConnection);
|
||||
connect(worker, SIGNAL(inputClosed()), SIGNAL(inputClosed()), Qt::DirectConnection);
|
||||
connect(worker, SIGNAL(outputClosed()), SIGNAL(outputClosed()), Qt::DirectConnection);
|
||||
connect(worker, &ConsoleWorker::readyRead, this, &ConsoleThread::readyRead, Qt::DirectConnection);
|
||||
connect(worker, &ConsoleWorker::bytesWritten, this, &ConsoleThread::bytesWritten, Qt::DirectConnection);
|
||||
connect(worker, &ConsoleWorker::inputClosed, this, &ConsoleThread::inputClosed, Qt::DirectConnection);
|
||||
connect(worker, &ConsoleWorker::outputClosed, this, &ConsoleThread::outputClosed, Qt::DirectConnection);
|
||||
|
||||
worker->start(_in_id, _out_id);
|
||||
}
|
||||
@ -597,7 +597,7 @@ public:
|
||||
{
|
||||
console = 0;
|
||||
thread = 0;
|
||||
connect(&lateTrigger, SIGNAL(timeout()), SLOT(doLate()));
|
||||
connect(&lateTrigger, &SafeTimer::timeout, this, &ConsoleReferencePrivate::doLate);
|
||||
lateTrigger.setSingleShot(true);
|
||||
}
|
||||
|
||||
@ -656,10 +656,10 @@ bool ConsoleReference::start(Console *console, SecurityMode mode)
|
||||
if(mode == SecurityEnabled)
|
||||
d->thread->setSecurityEnabled(true);
|
||||
|
||||
connect(d->thread, SIGNAL(readyRead()), SIGNAL(readyRead()));
|
||||
connect(d->thread, SIGNAL(bytesWritten(int)), SIGNAL(bytesWritten(int)));
|
||||
connect(d->thread, SIGNAL(inputClosed()), SIGNAL(inputClosed()));
|
||||
connect(d->thread, SIGNAL(outputClosed()), SIGNAL(outputClosed()));
|
||||
connect(d->thread, &ConsoleThread::readyRead, this, &ConsoleReference::readyRead);
|
||||
connect(d->thread, &ConsoleThread::bytesWritten, this, &ConsoleReference::bytesWritten);
|
||||
connect(d->thread, &ConsoleThread::inputClosed, this, &ConsoleReference::inputClosed);
|
||||
connect(d->thread, &ConsoleThread::outputClosed, this, &ConsoleReference::outputClosed);
|
||||
|
||||
d->late_read = false;
|
||||
d->late_close = false;
|
||||
@ -762,8 +762,8 @@ public:
|
||||
|
||||
Private(ConsolePrompt *_q) : QObject(_q), q(_q), sync(_q), console(this)
|
||||
{
|
||||
connect(&console, SIGNAL(readyRead()), SLOT(con_readyRead()));
|
||||
connect(&console, SIGNAL(inputClosed()), SLOT(con_inputClosed()));
|
||||
connect(&console, &ConsoleReference::readyRead, this, &Private::con_readyRead);
|
||||
connect(&console, &ConsoleReference::inputClosed, this, &Private::con_inputClosed);
|
||||
|
||||
con = 0;
|
||||
own_con = false;
|
||||
|
@ -40,8 +40,8 @@ public:
|
||||
QFileSystemWatcherRelay(QFileSystemWatcher *_watcher, QObject *parent = nullptr)
|
||||
:QObject(parent), watcher(_watcher)
|
||||
{
|
||||
connect(watcher, SIGNAL(directoryChanged(const QString &)), SIGNAL(directoryChanged(const QString &)), Qt::QueuedConnection);
|
||||
connect(watcher, SIGNAL(fileChanged(const QString &)), SIGNAL(fileChanged(const QString &)), Qt::QueuedConnection);
|
||||
connect(watcher, &QFileSystemWatcher::directoryChanged, this, &QFileSystemWatcherRelay::directoryChanged, Qt::QueuedConnection);
|
||||
connect(watcher, &QFileSystemWatcher::fileChanged, this, &QFileSystemWatcherRelay::fileChanged, Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
Q_SIGNALS:
|
||||
@ -65,7 +65,7 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
public Q_SLOTS:
|
||||
void watcher_changed(const QString &path)
|
||||
{
|
||||
Q_UNUSED(path);
|
||||
@ -106,7 +106,7 @@ void DirWatch::setDirName(const QString &dir)
|
||||
{
|
||||
d->watcher = new QFileSystemWatcher(this);
|
||||
d->watcher_relay = new QFileSystemWatcherRelay(d->watcher, this);
|
||||
connect(d->watcher_relay, SIGNAL(directoryChanged(const QString &)), d, SLOT(watcher_changed(const QString &)));
|
||||
connect(d->watcher_relay, &QFileSystemWatcherRelay::directoryChanged, d, &Private::watcher_changed);
|
||||
|
||||
d->watcher->addPath(d->dirName);
|
||||
}
|
||||
@ -137,8 +137,8 @@ public:
|
||||
|
||||
watcher = new QFileSystemWatcher(this);
|
||||
watcher_relay = new QFileSystemWatcherRelay(watcher, this);
|
||||
connect(watcher_relay, SIGNAL(directoryChanged(const QString &)), SLOT(dir_changed(const QString &)));
|
||||
connect(watcher_relay, SIGNAL(fileChanged(const QString &)), SLOT(file_changed(const QString &)));
|
||||
connect(watcher_relay, &QFileSystemWatcherRelay::directoryChanged, this, &Private::dir_changed);
|
||||
connect(watcher_relay, &QFileSystemWatcherRelay::fileChanged, this, &Private::file_changed);
|
||||
|
||||
QFileInfo fi(fileName);
|
||||
fi.makeAbsolute();
|
||||
|
@ -503,7 +503,7 @@ public:
|
||||
{
|
||||
do_quit = false;
|
||||
data = 0;
|
||||
connect(this, SIGNAL(canWrite_p(int, int)), SIGNAL(canWrite(int, int)));
|
||||
connect(this, &QPipeWriterThread::canWrite_p, this, &QPipeWriterThread::canWrite);
|
||||
DuplicateHandle(GetCurrentProcess(), id, GetCurrentProcess(), &pipe, 0, false, DUPLICATE_SAME_ACCESS);
|
||||
}
|
||||
|
||||
@ -638,7 +638,7 @@ public:
|
||||
{
|
||||
pipe = id;
|
||||
data = 0;
|
||||
connect(&timer, SIGNAL(timeout()), SLOT(tryNextWrite()));
|
||||
connect(&timer, &SafeTimer::timeout, this, &QPipeWriterPoll::tryNextWrite);
|
||||
}
|
||||
|
||||
virtual ~QPipeWriterPoll()
|
||||
@ -712,7 +712,7 @@ public:
|
||||
{
|
||||
do_quit = false;
|
||||
active = true;
|
||||
connect(this, SIGNAL(canRead_p(int)), SIGNAL(canRead(int)));
|
||||
connect(this, &QPipeReaderThread::canRead_p, this, &QPipeReaderThread::canRead);
|
||||
DuplicateHandle(GetCurrentProcess(), id, GetCurrentProcess(), &pipe, 0, false, DUPLICATE_SAME_ACCESS);
|
||||
}
|
||||
|
||||
@ -810,7 +810,7 @@ public:
|
||||
QPipeReaderPoll(Q_PIPE_ID id, QObject *parent = nullptr) : QPipeReader(parent), timer(this)
|
||||
{
|
||||
pipe = id;
|
||||
connect(&timer, SIGNAL(timeout()), SLOT(tryRead()));
|
||||
connect(&timer, &SafeTimer::timeout, this, &QPipeReaderPoll::tryRead);
|
||||
}
|
||||
|
||||
virtual ~QPipeReaderPoll()
|
||||
@ -1016,12 +1016,12 @@ public:
|
||||
else
|
||||
pipeReader = new QPipeReaderThread(pipe, this);
|
||||
#endif
|
||||
connect(pipeReader, SIGNAL(canRead(int)), this, SLOT(pr_canRead(int)));
|
||||
connect(pipeReader, &QPipeReader::canRead, this, &Private::pr_canRead);
|
||||
pipeReader->start();
|
||||
|
||||
// polling timer
|
||||
readTimer = new SafeTimer(this);
|
||||
connect(readTimer, SIGNAL(timeout()), SLOT(t_timeout()));
|
||||
connect(readTimer, &SafeTimer::timeout, this, &Private::t_timeout);
|
||||
|
||||
// updated: now that we have pipeReader, this no longer
|
||||
// polls for data. it only does delayed singleshot
|
||||
@ -1033,7 +1033,7 @@ public:
|
||||
|
||||
// socket notifier
|
||||
sn_read = new SafeSocketNotifier(pipe, QSocketNotifier::Read, this);
|
||||
connect(sn_read, SIGNAL(activated(int)), SLOT(sn_read_activated(int)));
|
||||
connect(sn_read, &SafeSocketNotifier::activated, this, &Private::sn_read_activated);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@ -1044,7 +1044,7 @@ public:
|
||||
|
||||
// socket notifier
|
||||
sn_write = new SafeSocketNotifier(pipe, QSocketNotifier::Write, this);
|
||||
connect(sn_write, SIGNAL(activated(int)), SLOT(sn_write_activated(int)));
|
||||
connect(sn_write, &SafeSocketNotifier::activated, this, &Private::sn_write_activated);
|
||||
sn_write->setEnabled(false);
|
||||
#endif
|
||||
}
|
||||
@ -1413,7 +1413,7 @@ int QPipeDevice::write(const char *data, int size)
|
||||
else
|
||||
d->pipeWriter = new QPipeWriterThread(d->pipe, d);
|
||||
#endif
|
||||
connect(d->pipeWriter, SIGNAL(canWrite(int, int)), d, SLOT(pw_canWrite(int, int)));
|
||||
connect(d->pipeWriter, &QPipeWriter::canWrite, d, &Private::pw_canWrite);
|
||||
d->pipeWriter->start();
|
||||
}
|
||||
|
||||
@ -1512,11 +1512,11 @@ public:
|
||||
writeTrigger.setSingleShot(true);
|
||||
closeTrigger.setSingleShot(true);
|
||||
writeErrorTrigger.setSingleShot(true);
|
||||
connect(&pipe, SIGNAL(notify()), SLOT(pipe_notify()));
|
||||
connect(&readTrigger, SIGNAL(timeout()), SLOT(doRead()));
|
||||
connect(&writeTrigger, SIGNAL(timeout()), SLOT(doWrite()));
|
||||
connect(&closeTrigger, SIGNAL(timeout()), SLOT(doClose()));
|
||||
connect(&writeErrorTrigger, SIGNAL(timeout()), SLOT(doWriteError()));
|
||||
connect(&pipe, &QPipeDevice::notify, this, &Private::pipe_notify);
|
||||
connect(&readTrigger, &SafeTimer::timeout, this, &Private::doRead);
|
||||
connect(&writeTrigger, &SafeTimer::timeout, this, &Private::doWrite);
|
||||
connect(&closeTrigger, &SafeTimer::timeout, this, &Private::doClose);
|
||||
connect(&writeErrorTrigger, &SafeTimer::timeout, this, &Private::doWriteError);
|
||||
reset(ResetSessionAndData);
|
||||
}
|
||||
|
||||
|
@ -151,7 +151,7 @@ private Q_SLOTS:
|
||||
{
|
||||
ed = QAbstractEventDispatcher::instance();
|
||||
//printf("TimerFixer[%p] linking to dispatcher %p\n", this, ed);
|
||||
connect(ed, SIGNAL(aboutToBlock()), SLOT(ed_aboutToBlock()));
|
||||
connect(ed, &QAbstractEventDispatcher::aboutToBlock, this, &TimerFixer::ed_aboutToBlock);
|
||||
}
|
||||
|
||||
void edunlink()
|
||||
@ -159,7 +159,7 @@ private Q_SLOTS:
|
||||
//printf("TimerFixer[%p] unlinking from dispatcher %p\n", this, ed);
|
||||
if(ed)
|
||||
{
|
||||
disconnect(ed, SIGNAL(aboutToBlock()), this, SLOT(ed_aboutToBlock()));
|
||||
disconnect(ed, &QAbstractEventDispatcher::aboutToBlock, this, &TimerFixer::ed_aboutToBlock);
|
||||
ed = 0;
|
||||
}
|
||||
}
|
||||
@ -459,7 +459,7 @@ protected:
|
||||
|
||||
loop = &eventLoop;
|
||||
agent = new SynchronizerAgent;
|
||||
connect(agent, SIGNAL(started()), SLOT(agent_started()), Qt::DirectConnection);
|
||||
connect(agent, &SynchronizerAgent::started, this, &Private::agent_started, Qt::DirectConnection);
|
||||
|
||||
// run the event loop
|
||||
eventLoop.exec();
|
||||
|
@ -111,7 +111,7 @@ public:
|
||||
agent = 0;
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
public Q_SLOTS:
|
||||
void agent_started();
|
||||
void agent_call_ret(bool success, const QVariant &ret);
|
||||
};
|
||||
@ -192,8 +192,8 @@ void SyncThread::run()
|
||||
d->m.lock();
|
||||
d->loop = new QEventLoop;
|
||||
d->agent = new SyncThreadAgent;
|
||||
connect(d->agent, SIGNAL(started()), d, SLOT(agent_started()), Qt::DirectConnection);
|
||||
connect(d->agent, SIGNAL(call_ret(bool, const QVariant &)), d, SLOT(agent_call_ret(bool, const QVariant &)), Qt::DirectConnection);
|
||||
connect(d->agent, &SyncThreadAgent::started, d, &Private::agent_started, Qt::DirectConnection);
|
||||
connect(d->agent, &SyncThreadAgent::call_ret, d, &Private::agent_call_ret, Qt::DirectConnection);
|
||||
d->loop->exec();
|
||||
d->m.lock();
|
||||
atEnd();
|
||||
|
@ -195,8 +195,8 @@ private:
|
||||
AnimatedKeyGen()
|
||||
{
|
||||
gen.setBlockingEnabled(false);
|
||||
connect(&gen, SIGNAL(finished()), SLOT(gen_finished()));
|
||||
connect(&t, SIGNAL(timeout()), SLOT(t_timeout()));
|
||||
connect(&gen, &QCA::KeyGenerator::finished, this, &AnimatedKeyGen::gen_finished);
|
||||
connect(&t, &QTimer::timeout, this, &AnimatedKeyGen::t_timeout);
|
||||
}
|
||||
|
||||
private Q_SLOTS:
|
||||
@ -282,7 +282,7 @@ private Q_SLOTS:
|
||||
// user can quit the monitoring by pressing enter
|
||||
printf("Monitoring keystores, press 'q' to quit.\n");
|
||||
prompt = new QCA::ConsolePrompt(this);
|
||||
connect(prompt, SIGNAL(finished()), SLOT(prompt_finished()));
|
||||
connect(prompt, &QCA::ConsolePrompt::finished, this, &KeyStoreMonitor::prompt_finished);
|
||||
prompt->getChar();
|
||||
|
||||
// kick off the subsystem
|
||||
@ -290,7 +290,7 @@ private Q_SLOTS:
|
||||
|
||||
// setup keystore manager for monitoring
|
||||
ksm = new QCA::KeyStoreManager(this);
|
||||
connect(ksm, SIGNAL(keyStoreAvailable(const QString &)), SLOT(ks_available(const QString &)));
|
||||
connect(ksm, &QCA::KeyStoreManager::keyStoreAvailable, this, &KeyStoreMonitor::ks_available);
|
||||
foreach(const QString &keyStoreId, ksm->keyStores())
|
||||
ks_available(keyStoreId);
|
||||
}
|
||||
@ -298,8 +298,8 @@ private Q_SLOTS:
|
||||
void ks_available(const QString &keyStoreId)
|
||||
{
|
||||
QCA::KeyStore *ks = new QCA::KeyStore(keyStoreId, ksm);
|
||||
connect(ks, SIGNAL(updated()), SLOT(ks_updated()));
|
||||
connect(ks, SIGNAL(unavailable()), SLOT(ks_unavailable()));
|
||||
connect(ks, &QCA::KeyStore::updated, this, &KeyStoreMonitor::ks_updated);
|
||||
connect(ks, &QCA::KeyStore::unavailable, this, &KeyStoreMonitor::ks_unavailable);
|
||||
keyStores += ks;
|
||||
|
||||
printf(" available: %s\n", qPrintable(ks->name()));
|
||||
@ -369,10 +369,10 @@ public:
|
||||
|
||||
prompt = 0;
|
||||
|
||||
connect(&handler, SIGNAL(eventReady(int, const QCA::Event &)), SLOT(ph_eventReady(int, const QCA::Event &)));
|
||||
connect(&handler, &QCA::EventHandler::eventReady, this, &PassphrasePrompt::ph_eventReady);
|
||||
handler.start();
|
||||
|
||||
connect(&ksm, SIGNAL(keyStoreAvailable(const QString &)), SLOT(ks_available(const QString &)));
|
||||
connect(&ksm, &QCA::KeyStoreManager::keyStoreAvailable, this, &PassphrasePrompt::ks_available);
|
||||
foreach(const QString &keyStoreId, ksm.keyStores())
|
||||
ks_available(keyStoreId);
|
||||
}
|
||||
@ -460,7 +460,7 @@ private Q_SLOTS:
|
||||
if(!prompt)
|
||||
{
|
||||
prompt = new QCA::ConsolePrompt(this);
|
||||
connect(prompt, SIGNAL(finished()), SLOT(prompt_finished()));
|
||||
connect(prompt, &QCA::ConsolePrompt::finished, this, &PassphrasePrompt::prompt_finished);
|
||||
prompt_id = id;
|
||||
prompt_event = e;
|
||||
prompt->getHidden(str);
|
||||
@ -544,7 +544,7 @@ private Q_SLOTS:
|
||||
{
|
||||
fprintf(stderr, "%s\n", qPrintable(str));
|
||||
prompt = new QCA::ConsolePrompt(this);
|
||||
connect(prompt, SIGNAL(finished()), SLOT(prompt_finished()));
|
||||
connect(prompt, &QCA::ConsolePrompt::finished, this, &PassphrasePrompt::prompt_finished);
|
||||
prompt_id = id;
|
||||
prompt_event = e;
|
||||
prompt->getChar();
|
||||
@ -616,8 +616,8 @@ private Q_SLOTS:
|
||||
void ks_available(const QString &keyStoreId)
|
||||
{
|
||||
QCA::KeyStore *ks = new QCA::KeyStore(keyStoreId, &ksm);
|
||||
connect(ks, SIGNAL(updated()), SLOT(ks_updated()));
|
||||
connect(ks, SIGNAL(unavailable()), SLOT(ks_unavailable()));
|
||||
connect(ks, &QCA::KeyStore::updated, this, &PassphrasePrompt::ks_updated);
|
||||
connect(ks, &QCA::KeyStore::unavailable, this, &PassphrasePrompt::ks_unavailable);
|
||||
keyStores += ks;
|
||||
ks->startAsynchronousMode();
|
||||
|
||||
|
@ -45,7 +45,7 @@ void FileWatchUnitTest::filewatchTest()
|
||||
QCA::FileWatch watcher;
|
||||
QCOMPARE( watcher.fileName(), QString() );
|
||||
|
||||
QSignalSpy spy( &watcher, SIGNAL(changed()) );
|
||||
QSignalSpy spy( &watcher, &QCA::FileWatch::changed );
|
||||
QVERIFY( spy.isValid() );
|
||||
QCOMPARE( spy.count(), 0 );
|
||||
|
||||
|
@ -66,8 +66,7 @@ class PGPPassphraseProvider: public QObject
|
||||
public:
|
||||
PGPPassphraseProvider(QObject *parent = nullptr) : QObject(parent)
|
||||
{
|
||||
connect(&m_handler, SIGNAL(eventReady(int, const QCA::Event &)),
|
||||
SLOT(eh_eventReady(int, const QCA::Event &)));
|
||||
connect(&m_handler, &QCA::EventHandler::eventReady, this, &PGPPassphraseProvider::eh_eventReady);
|
||||
m_handler.start();
|
||||
}
|
||||
|
||||
|
@ -174,13 +174,13 @@ void PipeUnitTest::signalTests()
|
||||
QVERIFY( pipe->readEnd().isValid() );
|
||||
pipe->readEnd().enable();
|
||||
|
||||
QSignalSpy readyReadSpy( &(pipe->readEnd()), SIGNAL( readyRead() ) );
|
||||
QSignalSpy readyReadSpy( &(pipe->readEnd()), &QCA::QPipeEnd::readyRead );
|
||||
QVERIFY( readyReadSpy.isValid() );
|
||||
QSignalSpy bytesWrittenSpy( &(pipe->writeEnd()), SIGNAL( bytesWritten(int) ) );
|
||||
QSignalSpy bytesWrittenSpy( &(pipe->writeEnd()), &QCA::QPipeEnd::bytesWritten );
|
||||
QVERIFY( bytesWrittenSpy.isValid() );
|
||||
QSignalSpy closedWriteSpy( &(pipe->writeEnd()), SIGNAL( closed() ) );
|
||||
QSignalSpy closedWriteSpy( &(pipe->writeEnd()), &QCA::QPipeEnd::closed );
|
||||
QVERIFY( closedWriteSpy.isValid() );
|
||||
QSignalSpy closedReadSpy( &(pipe->readEnd()), SIGNAL( closed() ) );
|
||||
QSignalSpy closedReadSpy( &(pipe->readEnd()), &QCA::QPipeEnd::closed );
|
||||
QVERIFY( closedReadSpy.isValid() );
|
||||
|
||||
QCOMPARE( readyReadSpy.count(), 0 );
|
||||
@ -221,13 +221,13 @@ void PipeUnitTest::signalTestsSecure()
|
||||
QVERIFY( pipe->readEnd().isValid() );
|
||||
pipe->readEnd().enable();
|
||||
|
||||
QSignalSpy readyReadSpy( &(pipe->readEnd()), SIGNAL( readyRead() ) );
|
||||
QSignalSpy readyReadSpy( &(pipe->readEnd()), &QCA::QPipeEnd::readyRead );
|
||||
QVERIFY( readyReadSpy.isValid() );
|
||||
QSignalSpy bytesWrittenSpy( &(pipe->writeEnd()), SIGNAL( bytesWritten(int) ) );
|
||||
QSignalSpy bytesWrittenSpy( &(pipe->writeEnd()), &QCA::QPipeEnd::bytesWritten );
|
||||
QVERIFY( bytesWrittenSpy.isValid() );
|
||||
QSignalSpy closedWriteSpy( &(pipe->writeEnd()), SIGNAL( closed() ) );
|
||||
QSignalSpy closedWriteSpy( &(pipe->writeEnd()), &QCA::QPipeEnd::closed );
|
||||
QVERIFY( closedWriteSpy.isValid() );
|
||||
QSignalSpy closedReadSpy( &(pipe->readEnd()), SIGNAL( closed() ) );
|
||||
QSignalSpy closedReadSpy( &(pipe->readEnd()), &QCA::QPipeEnd::closed );
|
||||
QVERIFY( closedReadSpy.isValid() );
|
||||
|
||||
QCOMPARE( readyReadSpy.count(), 0 );
|
||||
|
@ -38,13 +38,12 @@ public:
|
||||
TlsTest()
|
||||
{
|
||||
sock = new QTcpSocket( this );
|
||||
connect(sock, SIGNAL(connected()), SLOT(sock_connected()));
|
||||
connect(sock, SIGNAL(readyRead()), SLOT(sock_readyRead()));
|
||||
connect(sock, &QTcpSocket::connected, this, &TlsTest::sock_connected);
|
||||
connect(sock, &QTcpSocket::readyRead, this, &TlsTest::sock_readyRead);
|
||||
|
||||
ssl = new QCA::TLS( this );
|
||||
connect(ssl, SIGNAL(handshaken()), SLOT(ssl_handshaken()));
|
||||
connect(ssl, SIGNAL(readyReadOutgoing()),
|
||||
SLOT(ssl_readyReadOutgoing()));
|
||||
connect(ssl, &QCA::TLS::handshaken, this, &TlsTest::ssl_handshaken);
|
||||
connect(ssl, &QCA::TLS::readyReadOutgoing, this, &TlsTest::ssl_readyReadOutgoing);
|
||||
|
||||
sync = new QCA::Synchronizer( this );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user