Commit 341754da authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Modernize code

parent 29987401
Pipeline #39391 passed with stage
in 7 minutes and 46 seconds
...@@ -55,7 +55,7 @@ void FakeServer::dataAvailable() ...@@ -55,7 +55,7 @@ void FakeServer::dataAvailable()
{ {
QMutexLocker locker(&m_mutex); QMutexLocker locker(&m_mutex);
QTcpSocket *socket = qobject_cast<QTcpSocket *>(sender()); auto *socket = qobject_cast<QTcpSocket *>(sender());
Q_ASSERT(socket != nullptr); Q_ASSERT(socket != nullptr);
int scenarioNumber = m_clientSockets.indexOf(socket); int scenarioNumber = m_clientSockets.indexOf(socket);
......
...@@ -156,7 +156,7 @@ void SmtpTest::testLoginJob() ...@@ -156,7 +156,7 @@ void SmtpTest::testLoginJob()
session.setCustomHostname(QStringLiteral("127.0.0.1")); session.setCustomHostname(QStringLiteral("127.0.0.1"));
session.openAndWait(); session.openAndWait();
KSmtp::LoginJob *login = new KSmtp::LoginJob(&session); auto *login = new KSmtp::LoginJob(&session);
login->setPreferedAuthMode(mode); login->setPreferedAuthMode(mode);
login->setUserName(QStringLiteral("login")); login->setUserName(QStringLiteral("login"));
login->setPassword(QStringLiteral("password")); login->setPassword(QStringLiteral("password"));
...@@ -226,7 +226,7 @@ void SmtpTest::testSendJob() ...@@ -226,7 +226,7 @@ void SmtpTest::testSendJob()
session.setCustomHostname(QStringLiteral("127.0.0.1")); session.setCustomHostname(QStringLiteral("127.0.0.1"));
session.openAndWait(); session.openAndWait();
KSmtp::SendJob *send = new KSmtp::SendJob(&session); auto *send = new KSmtp::SendJob(&session);
send->setData("From: foo@bar.com\r\nTo: bar@foo.com\r\nHello world.\r\n.\r\n.\r\n..\r\n.Foo\r\nEnd"); send->setData("From: foo@bar.com\r\nTo: bar@foo.com\r\nHello world.\r\n.\r\n.\r\n..\r\n.Foo\r\nEnd");
send->setFrom(QStringLiteral("foo@bar.com")); send->setFrom(QStringLiteral("foo@bar.com"));
send->setTo({QStringLiteral("bar@foo.com")}); send->setTo({QStringLiteral("bar@foo.com")});
......
...@@ -20,7 +20,7 @@ namespace KSmtp { ...@@ -20,7 +20,7 @@ namespace KSmtp {
class KSMTP_EXPORT SessionUiProxy class KSMTP_EXPORT SessionUiProxy
{ {
public: public:
typedef QSharedPointer<SessionUiProxy> Ptr; using Ptr = QSharedPointer<SessionUiProxy>;
virtual ~SessionUiProxy(); virtual ~SessionUiProxy();
/** /**
......
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