QEventLoop loop;
connect(ftp, SIGNAL(done(bool)), &loop, SLOT(quit()));
- connect(ftp, SIGNAL(commandFinished(int, bool)), this, SLOT(mkdir2Slot(int, bool)));
+ connect(ftp, SIGNAL(commandFinished(int,bool)), this, SLOT(mkdir2Slot(int,bool)));
QTimer::singleShot(5000, &loop, SLOT(quit()));
QSignalSpy commandStartedSpy(ftp, SIGNAL(commandStarted(int)));
- QSignalSpy commandFinishedSpy(ftp, SIGNAL(commandFinished(int, bool)));
+ QSignalSpy commandFinishedSpy(ftp, SIGNAL(commandFinished(int,bool)));
loop.exec();
SLOT(done(bool)) );
connect( nFtp, SIGNAL(stateChanged(int)),
SLOT(stateChanged(int)) );
- connect( nFtp, SIGNAL(listInfo(const QUrlInfo&)),
- SLOT(listInfo(const QUrlInfo&)) );
+ connect( nFtp, SIGNAL(listInfo(QUrlInfo)),
+ SLOT(listInfo(QUrlInfo)) );
connect( nFtp, SIGNAL(readyRead()),
SLOT(readyRead()) );
- connect( nFtp, SIGNAL(dataTransferProgress(qint64, qint64)),
- SLOT(dataTransferProgress(qint64, qint64)) );
+ connect( nFtp, SIGNAL(dataTransferProgress(qint64,qint64)),
+ SLOT(dataTransferProgress(qint64,qint64)) );
return nFtp;
}
QFtp ftp;
QSignalSpy doneSpy(&ftp, SIGNAL(done(bool)));
- QSignalSpy commandFinishedSpy(&ftp, SIGNAL(commandFinished(int, bool)));
+ QSignalSpy commandFinishedSpy(&ftp, SIGNAL(commandFinished(int,bool)));
this->ftp = &ftp;
connect(&ftp, SIGNAL(done(bool)), this, SLOT(cdUpSlot(bool)));
QHttpNetworkReply *reply = connection.sendRequest(request);
connect(reply, SIGNAL(finished()), SLOT(finishedReply()));
- connect(reply, SIGNAL(finishedWithError(QNetworkReply::NetworkError, const QString &)),
- SLOT(finishedWithError(QNetworkReply::NetworkError, const QString &)));
+ connect(reply, SIGNAL(finishedWithError(QNetworkReply::NetworkError,QString)),
+ SLOT(finishedWithError(QNetworkReply::NetworkError,QString)));
QTime stopWatch;
stopWatch.start();
QHttpNetworkRequest request(protocol + host + path);
QHttpNetworkReply *reply = connection.sendRequest(request);
- connect(reply, SIGNAL(authenticationRequired(const QHttpNetworkRequest&, QAuthenticator *)),
- SLOT(challenge401(const QHttpNetworkRequest&, QAuthenticator *)));
+ connect(reply, SIGNAL(authenticationRequired(QHttpNetworkRequest,QAuthenticator*)),
+ SLOT(challenge401(QHttpNetworkRequest,QAuthenticator*)));
finishedCalled = false;
finishedWithErrorCalled = false;
connect(reply, SIGNAL(finished()), SLOT(finishedReply()));
- connect(reply, SIGNAL(finishedWithError(QNetworkReply::NetworkError, const QString &)),
- SLOT(finishedWithError(QNetworkReply::NetworkError, const QString &)));
+ connect(reply, SIGNAL(finishedWithError(QNetworkReply::NetworkError,QString)),
+ SLOT(finishedWithError(QNetworkReply::NetworkError,QString)));
QTime stopWatch;
stopWatch.start();
QHttpNetworkRequest request(protocol + host + path);
QHttpNetworkReply *reply = connection.sendRequest(request);
- connect(reply, SIGNAL(sslErrors(const QList<QSslError>&)),
- SLOT(sslErrors(const QList<QSslError>&)));
+ connect(reply, SIGNAL(sslErrors(QList<QSslError>)),
+ SLOT(sslErrors(QList<QSslError>)));
finishedWithErrorCalled = false;
netErrorCode = QNetworkReply::NoError;
connect(reply, SIGNAL(finished()), SLOT(finishedReply()));
- connect(reply, SIGNAL(finishedWithError(QNetworkReply::NetworkError, const QString &)),
- SLOT(finishedWithError(QNetworkReply::NetworkError, const QString &)));
+ connect(reply, SIGNAL(finishedWithError(QNetworkReply::NetworkError,QString)),
+ SLOT(finishedWithError(QNetworkReply::NetworkError,QString)));
QTime stopWatch;
stopWatch.start();
connect(serverSocket, SIGNAL(encrypted()), this, SLOT(encryptedSlot()));
connect(serverSocket, SIGNAL(readyRead()), this, SLOT(readyReadSlot()));
serverSocket->setProtocol(QSsl::AnyProtocol);
- connect(serverSocket, SIGNAL(sslErrors(const QList<QSslError>&)), serverSocket, SLOT(ignoreSslErrors()));
+ connect(serverSocket, SIGNAL(sslErrors(QList<QSslError>)), serverSocket, SLOT(ignoreSslErrors()));
serverSocket->setLocalCertificate(testDataDir + "/certs/server.pem");
serverSocket->setPrivateKey(testDataDir + "/certs/server.key");
serverSocket->startServerEncryption();
QSignalSpy spy(reply.data(), SIGNAL(uploadProgress(qint64,qint64)));
connect(&server, SIGNAL(newEncryptedConnection()), &QTestEventLoop::instance(), SLOT(exitLoop()));
- connect(reply, SIGNAL(sslErrors(const QList<QSslError>&)), reply.data(), SLOT(ignoreSslErrors()));
+ connect(reply, SIGNAL(sslErrors(QList<QSslError>)), reply.data(), SLOT(ignoreSslErrors()));
// get the request started and the incoming socket connected
QTestEventLoop::instance().enterLoop(10);
QFETCH(QList<QSslError>, expectedSslErrors);
// store the errors to ignore them later in the slot connected below
storedExpectedSslErrors = expectedSslErrors;
- connect(&manager, SIGNAL(sslErrors(QNetworkReply *, const QList<QSslError> &)),
- this, SLOT(ignoreSslErrorListSlot(QNetworkReply *, const QList<QSslError> &)));
+ connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
+ this, SLOT(ignoreSslErrorListSlot(QNetworkReply*,QList<QSslError>)));
QVERIFY(waitForFinish(reply) != Timeout);
#endif
manager.setProxy(proxy);
QSignalSpy authSpy(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)));
- QSignalSpy proxyAuthSpy(&manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
+ QSignalSpy proxyAuthSpy(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
AuthenticationCacheHelper helper;
- connect(&manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), &helper, SLOT(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
+ connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), &helper, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), &helper, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
QNetworkRequest request(url);
connect(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)),
SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
- connect(&manager, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)), &helper, SLOT(proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *)));
+ connect(&manager, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), &helper, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
connect(&manager, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), &helper, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
helper.httpUserName = "httptest";
QNetworkRequest::SynchronousRequestAttribute,
true);
QNetworkReplyPtr reply;
- QSignalSpy sslErrorsSpy(&manager, SIGNAL(sslErrors(QNetworkReply *, const QList<QSslError> &)));
+ QSignalSpy sslErrorsSpy(&manager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)));
runSimpleRequest(QNetworkAccessManager::GetOperation, request, reply, 0);
QVERIFY(reply->isFinished());
QCOMPARE(reply->error(), QNetworkReply::SslHandshakeFailedError);
QFETCH(QString, addresses);
lookupDone = false;
- QHostInfo::lookupHost(hostname, this, SLOT(resultsReady(const QHostInfo&)));
+ QHostInfo::lookupHost(hostname, this, SLOT(resultsReady(QHostInfo)));
QTestEventLoop::instance().enterLoop(10);
QVERIFY(!QTestEventLoop::instance().timeout());
QSKIP("This platform does not support IPv6 lookups");
lookupDone = false;
- QHostInfo::lookupHost(hostname, this, SLOT(resultsReady(const QHostInfo&)));
+ QHostInfo::lookupHost(hostname, this, SLOT(resultsReady(QHostInfo)));
QTestEventLoop::instance().enterLoop(10);
QVERIFY(!QTestEventLoop::instance().timeout());
void LookupReceiver::start()
{
for (int i=0;i<numrequests;i++)
- QHostInfo::lookupHost(QString("qt.nokia.com"), this, SLOT(resultsReady(const QHostInfo&)));
+ QHostInfo::lookupHost(QString("qt.nokia.com"), this, SLOT(resultsReady(QHostInfo)));
}
void LookupReceiver::resultsReady(const QHostInfo &info)
lookupsDoneCounter = 0;
for (int i = 0; i < COUNT; i++)
- QHostInfo::lookupHost("localhost", this, SLOT(resultsReady(const QHostInfo)));
+ QHostInfo::lookupHost("localhost", this, SLOT(resultsReady(QHostInfo)));
QElapsedTimer timer;
timer.start();
for (int i = 0; i < hostnameList.size(); i++)
for (int j = 0; j < repeats; ++j)
- QHostInfo::lookupHost(hostnameList.at(i), this, SLOT(resultsReady(const QHostInfo)));
+ QHostInfo::lookupHost(hostnameList.at(i), this, SLOT(resultsReady(QHostInfo)));
QElapsedTimer timer;
timer.start();
QSignalSpy hostFoundSpy(&socket, SIGNAL(hostFound()));
QSignalSpy disconnectedSpy(&socket, SIGNAL(disconnected()));
QSignalSpy connectionEncryptedSpy(&socket, SIGNAL(encrypted()));
- QSignalSpy sslErrorsSpy(&socket, SIGNAL(sslErrors(const QList<QSslError> &)));
+ QSignalSpy sslErrorsSpy(&socket, SIGNAL(sslErrors(QList<QSslError>)));
connect(&socket, SIGNAL(connected()), this, SLOT(exitLoop()));
connect(&socket, SIGNAL(disconnected()), this, SLOT(exitLoop()));
connect(&socket, SIGNAL(modeChanged(QSslSocket::SslMode)), this, SLOT(exitLoop()));
connect(&socket, SIGNAL(encrypted()), this, SLOT(exitLoop()));
connect(&socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(exitLoop()));
- connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(exitLoop()));
// Start connecting
socket.connectToHost(QtNetworkSettings::serverName(), 993);
QSslSocket socket;
this->socket = &socket;
QSignalSpy encryptedSpy(&socket, SIGNAL(encrypted()));
- QSignalSpy sslErrorsSpy(&socket, SIGNAL(sslErrors(const QList<QSslError> &)));
+ QSignalSpy sslErrorsSpy(&socket, SIGNAL(sslErrors(QList<QSslError>)));
connect(&socket, SIGNAL(readyRead()), this, SLOT(exitLoop()));
connect(&socket, SIGNAL(encrypted()), this, SLOT(exitLoop()));
connect(&socket, SIGNAL(connected()), this, SLOT(exitLoop()));
- connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
- connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(exitLoop()));
+ connect(&socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
+ connect(&socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(exitLoop()));
// Start connecting
socket.connectToHost(QtNetworkSettings::serverName(), 993);
{
socket = new QSslSocket(this);
socket->setProtocol(protocol);
- connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
QFile file(m_keyFile);
QVERIFY(file.open(QIODevice::ReadOnly));
socket->setProtocol(clientProtocol);
// upon SSL wrong version error, error will be triggered, not sslErrors
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), &loop, SLOT(quit()));
- connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
connect(socket, SIGNAL(encrypted()), &loop, SLOT(quit()));
client->connectToHostEncrypted(QHostAddress(QHostAddress::LocalHost).toString(), server.serverPort());
QSslSocketPtr client(new QSslSocket);
socket = client.data();;
- connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
connect(socket, SIGNAL(encrypted()), &loop, SLOT(quit()));
client->connectToHostEncrypted(QHostAddress(QHostAddress::LocalHost).toString(), server.serverPort());
QSslSocketPtr socket = newSocket();
this->socket = socket.data();
- connect(this->socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(this->socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QVERIFY(socket->waitForEncrypted(10000));
QSslSocketPtr socket = newSocket();
this->socket = socket.data();
- connect(this->socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(this->socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QVERIFY(socket->waitForEncrypted(-1));
QSslSocketPtr socket = newSocket();
this->socket = socket.data();
- connect(this->socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(this->socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 993);
QVERIFY(socket->waitForConnected(10000));
void incomingConnection(qintptr socketDescriptor)
{
socket = new QSslSocket(this);
- connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
QFile file(SRCDIR "certs/fluke.key");
QVERIFY(file.open(QIODevice::ReadOnly));
storedExpectedSslErrors = expectedSslErrors;
connect(&socket, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)),
this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
- connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)),
- this, SLOT(ignoreErrorListSlot(const QList<QSslError> &)));
+ connect(&socket, SIGNAL(sslErrors(QList<QSslError>)),
+ this, SLOT(ignoreErrorListSlot(QList<QSslError>)));
socket.connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QFETCH(int, expectedSslErrorSignalCount);
QSslSocketPtr socket = newSocket();
this->socket = socket.data();
- connect(this->socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(this->socket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QByteArray data;
QSslConfiguration::setDefaultConfiguration(emptyConf);
QSslSocketPtr socket = newSocket();
- connect(socket.data(), SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
+ connect(socket.data(), SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(ignoreErrorSlot()));
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QVERIFY2(!socket->waitForEncrypted(4000), qPrintable(socket->errorString()));
}
QNetworkRequest(
QUrl("http://" + QtNetworkSettings::serverName() + "/qtest/bigfile")
));
- connect(reply, SIGNAL(downloadProgress(qint64, qint64)),
- this, SLOT(dataReadProgress(qint64, qint64)));
+ connect(reply, SIGNAL(downloadProgress(qint64,qint64)),
+ this, SLOT(dataReadProgress(qint64,qint64)));
connect(reply, SIGNAL(readyRead()),
this, SLOT(dataReadyRead()));
connect(reply, SIGNAL(finished()), this, SLOT(finishedFromReply()));
QBENCHMARK{
QNetworkReply* reply = manager.post(request, data);
- connect(reply, SIGNAL(sslErrors( const QList<QSslError> &)), reply, SLOT(ignoreSslErrors()));
+ connect(reply, SIGNAL(sslErrors(QList<QSslError>)), reply, SLOT(ignoreSslErrors()));
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()), Qt::QueuedConnection);
QTestEventLoop::instance().enterLoop(5);
QVERIFY(!QTestEventLoop::instance().timeout());
QNetworkRequest request = requestList.takeFirst();
timeOneRequest.restart();
reply = manager.get(request);
- QObject::connect(reply, SIGNAL(sslErrors( const QList<QSslError> &)), reply, SLOT(ignoreSslErrors()));
+ QObject::connect(reply, SIGNAL(sslErrors(QList<QSslError>)), reply, SLOT(ignoreSslErrors()));
QObject::connect(reply, SIGNAL(finished()), this, SLOT(doNextRequest()));
}
QBENCHMARK {
for (int i = 0; i < hostnameList.size(); i++)
- QHostInfo::lookupHost(hostnameList.at(i), &receiver, SLOT(resultsReady(const QHostInfo)));
+ QHostInfo::lookupHost(hostnameList.at(i), &receiver, SLOT(resultsReady(QHostInfo)));
QTestEventLoop::instance().enterLoop(20);
QVERIFY(!QTestEventLoop::instance().timeout());
}
createMenus();
connect(&m_NetworkConfigurationManager, SIGNAL(updateCompleted()), this, SLOT(configurationsUpdateCompleted()));
- connect(&m_NetworkConfigurationManager, SIGNAL(configurationAdded(const QNetworkConfiguration&)),
- this, SLOT(configurationAdded(const QNetworkConfiguration&)));
- connect(&m_NetworkConfigurationManager, SIGNAL(configurationRemoved(const QNetworkConfiguration&)),
- this, SLOT(configurationRemoved(const QNetworkConfiguration&)));
+ connect(&m_NetworkConfigurationManager, SIGNAL(configurationAdded(QNetworkConfiguration)),
+ this, SLOT(configurationAdded(QNetworkConfiguration)));
+ connect(&m_NetworkConfigurationManager, SIGNAL(configurationRemoved(QNetworkConfiguration)),
+ this, SLOT(configurationRemoved(QNetworkConfiguration)));
connect(&m_NetworkConfigurationManager, SIGNAL(onlineStateChanged(bool)),
this, SLOT(onlineStateChanged(bool)));
- connect(&m_NetworkConfigurationManager, SIGNAL(configurationChanged(const QNetworkConfiguration&)),
- this, SLOT(configurationChanged(const QNetworkConfiguration&)));
+ connect(&m_NetworkConfigurationManager, SIGNAL(configurationChanged(QNetworkConfiguration)),
+ this, SLOT(configurationChanged(QNetworkConfiguration)));
showConfigurations();
}
return;
}
createQNetworkAccessManagerButton->setText("Recreate");
- connect(m_dataTransferer, SIGNAL(finished(quint32, qint64, QString)), this, SLOT(finished(quint32, qint64, QString)));
+ connect(m_dataTransferer, SIGNAL(finished(quint32,qint64,QString)), this, SLOT(finished(quint32,qint64,QString)));
}
void SessionTab::on_sendRequestButton_clicked()
void SessionTab::on_alrButton_clicked()
{
if (!m_alrEnabled) {
- connect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(const QNetworkConfiguration&, bool)),
- this, SLOT(preferredConfigurationChanged(const QNetworkConfiguration&, bool)));
+ connect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)),
+ this, SLOT(preferredConfigurationChanged(QNetworkConfiguration,bool)));
alrButton->setText("Disable ALR");
m_alrEnabled = true;
} else {
- disconnect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(const QNetworkConfiguration&, bool)), 0, 0);
+ disconnect(m_NetworkSession, SIGNAL(preferredConfigurationChanged(QNetworkConfiguration,bool)), 0, 0);
alrButton->setText("Enable ALR");
m_alrEnabled = false;
}
: queueMode (Parallel)
{
connect(&nam, SIGNAL(finished(QNetworkReply*)), this, SLOT(finished(QNetworkReply*)));
- connect(&nam, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*, QAuthenticator*)));
- connect(&nam, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*)));
+ connect(&nam, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)));
+ connect(&nam, SIGNAL(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(QNetworkProxy,QAuthenticator*)));
#ifndef QT_NO_SSL
- connect(&nam, SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), this, SLOT(sslErrors(QNetworkReply*, const QList<QSslError>&)));
+ connect(&nam, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(sslErrors(QNetworkReply*,QList<QSslError>)));
#endif
}