Commit a7273602 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use new signal/slot

parent 572a4cbf
......@@ -84,7 +84,7 @@ void FakeServer::newConnection()
QMutexLocker locker(&m_mutex);
m_clientSockets << m_tcpServer->nextPendingConnection();
connect(m_clientSockets.last(), SIGNAL(readyRead()), this, SLOT(dataAvailable()));
connect(m_clientSockets.last(), &QIODevice::readyRead, this, &FakeServer::dataAvailable);
//m_clientParsers << new KIMAP::ImapStreamParser( m_clientSockets.last(), true );
QVERIFY(m_clientSockets.size() <= m_scenarios.size());
......@@ -100,7 +100,7 @@ void FakeServer::run()
return;
}
connect(m_tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection()));
connect(m_tcpServer, &QTcpServer::newConnection, this, &FakeServer::newConnection);
exec();
......
......@@ -370,7 +370,7 @@ bool ServerTestPrivate::handleNntpConversation(MailTransport::Socket *socket, in
// SASL DIGEST-MD5 CRAM-MD5 NTLM PLAIN LOGIN
// STARTTLS
// .
const QVector<QStringRef> lines = response.splitRef(QLatin1String("\r\n"), QString::SkipEmptyParts);
const QVector<QStringRef> lines = response.splitRef(QStringLiteral("\r\n"), QString::SkipEmptyParts);
for (const QStringRef &line : lines) {
if (line.compare(QLatin1String("STARTTLS"), Qt::CaseInsensitive) == 0) {
*shouldStartTLS = true;
......
......@@ -107,12 +107,12 @@ void TransportMgr::sendBtnClicked()
job->setCc(mCcEdit->text().isEmpty() ? QStringList() : mCcEdit->text().split(QLatin1Char(',')));
job->setBcc(mBccEdit->text().isEmpty() ? QStringList() : mBccEdit->text().split(QLatin1Char(',')));
job->setData(mMailEdit->document()->toPlainText().toLatin1());
connect(job, SIGNAL(result(KJob*)),
SLOT(jobResult(KJob*)));
connect(job, &KJob::result,
this, &TransportMgr::jobResult);
connect(job, SIGNAL(percent(KJob*,ulong)),
SLOT(jobPercent(KJob*,ulong)));
connect(job, SIGNAL(infoMessage(KJob*,QString,QString)),
SLOT(jobInfoMessage(KJob*,QString,QString)));
connect(job, &KJob::infoMessage,
this, &TransportMgr::jobInfoMessage);
mCurrentJob = job;
TransportManager::self()->schedule(job);
}
......
......@@ -67,7 +67,7 @@ void MessageQueueJobTest::initTestCase()
// check that outbox is empty
SpecialMailCollectionsRequestJob *rjob = new SpecialMailCollectionsRequestJob(this);
rjob->requestDefaultCollection(SpecialMailCollections::Outbox);
QSignalSpy spy(rjob, SIGNAL(result(KJob*)));
QSignalSpy spy(rjob, &KJob::result);
QVERIFY(spy.wait(10000));
verifyOutboxContents(0);
}
......
......@@ -146,8 +146,8 @@ MessageQueueJob *MessageQueuer::createQueueJob()
this, &MessageQueuer::jobResult);
connect(job, SIGNAL(percent(KJob*,ulong)),
SLOT(jobPercent(KJob*,ulong)));
connect(job, SIGNAL(infoMessage(KJob*,QString,QString)),
SLOT(jobInfoMessage(KJob*,QString,QString)));
connect(job, &KJob::infoMessage,
this, &MessageQueuer::jobInfoMessage);
return job;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment