Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMailTransport
Commits
a7273602
Commit
a7273602
authored
Apr 23, 2019
by
Laurent Montel
Browse files
Use new signal/slot
parent
572a4cbf
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/kmailtransport/plugins/smtp/autotests/fakeserver.cpp
View file @
a7273602
...
...
@@ -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
();
...
...
src/kmailtransport/servertest.cpp
View file @
a7273602
...
...
@@ -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
(
Q
Latin1
String
(
"
\r\n
"
),
QString
::
SkipEmptyParts
);
const
QVector
<
QStringRef
>
lines
=
response
.
splitRef
(
QString
Literal
(
"
\r\n
"
),
QString
::
SkipEmptyParts
);
for
(
const
QStringRef
&
line
:
lines
)
{
if
(
line
.
compare
(
QLatin1String
(
"STARTTLS"
),
Qt
::
CaseInsensitive
)
==
0
)
{
*
shouldStartTLS
=
true
;
...
...
src/kmailtransport/tests/transportmgr.cpp
View file @
a7273602
...
...
@@ -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
);
}
...
...
src/kmailtransportakonadi/autotests/messagequeuejobtest.cpp
View file @
a7273602
...
...
@@ -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
);
}
...
...
src/kmailtransportakonadi/tests/queuer.cpp
View file @
a7273602
...
...
@@ -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
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment