Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
KMailTransport
Commits
52710ca8
Commit
52710ca8
authored
Nov 02, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modernize code
parent
a86629be
Pipeline
#39280
passed with stage
in 11 minutes and 4 seconds
Changes
19
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
46 additions
and
46 deletions
+46
-46
src/kcm/configmodule.cpp
src/kcm/configmodule.cpp
+2
-2
src/kmailtransport/plugins/smtp/autotests/fakeserver.cpp
src/kmailtransport/plugins/smtp/autotests/fakeserver.cpp
+1
-1
src/kmailtransport/plugins/smtp/smtpconfigdialog.cpp
src/kmailtransport/plugins/smtp/smtpconfigdialog.cpp
+1
-1
src/kmailtransport/tests/addtransportdialogng_gui.cpp
src/kmailtransport/tests/addtransportdialogng_gui.cpp
+3
-3
src/kmailtransport/tests/transportmgr.cpp
src/kmailtransport/tests/transportmgr.cpp
+2
-2
src/kmailtransport/widgets/addtransportdialogng.cpp
src/kmailtransport/widgets/addtransportdialogng.cpp
+2
-2
src/kmailtransport/widgets/transportlistview.cpp
src/kmailtransport/widgets/transportlistview.cpp
+2
-2
src/kmailtransportakonadi/autotests/attributetest.cpp
src/kmailtransportakonadi/autotests/attributetest.cpp
+5
-5
src/kmailtransportakonadi/autotests/messagequeuejobtest.cpp
src/kmailtransportakonadi/autotests/messagequeuejobtest.cpp
+10
-10
src/kmailtransportakonadi/dispatcherinterface.cpp
src/kmailtransportakonadi/dispatcherinterface.cpp
+3
-3
src/kmailtransportakonadi/dispatchmodeattribute.cpp
src/kmailtransportakonadi/dispatchmodeattribute.cpp
+1
-1
src/kmailtransportakonadi/filteractionjob.cpp
src/kmailtransportakonadi/filteractionjob.cpp
+2
-2
src/kmailtransportakonadi/messagequeuejob.cpp
src/kmailtransportakonadi/messagequeuejob.cpp
+3
-3
src/kmailtransportakonadi/plugins/akonadimailtransportplugin.cpp
...iltransportakonadi/plugins/akonadimailtransportplugin.cpp
+1
-1
src/kmailtransportakonadi/plugins/resourcesendjob.cpp
src/kmailtransportakonadi/plugins/resourcesendjob.cpp
+1
-1
src/kmailtransportakonadi/sentactionattribute.cpp
src/kmailtransportakonadi/sentactionattribute.cpp
+1
-1
src/kmailtransportakonadi/tests/clearerror.cpp
src/kmailtransportakonadi/tests/clearerror.cpp
+1
-1
src/kmailtransportakonadi/tests/queuer.cpp
src/kmailtransportakonadi/tests/queuer.cpp
+4
-4
src/kmailtransportakonadi/tests/sendqueued.cpp
src/kmailtransportakonadi/tests/sendqueued.cpp
+1
-1
No files found.
src/kcm/configmodule.cpp
View file @
52710ca8
...
...
@@ -21,9 +21,9 @@ ConfigModule::ConfigModule(QWidget *parent, const QVariantList &args)
:
KCModule
(
parent
,
args
)
{
setButtons
(
NoAdditionalButton
);
QVBoxLayo
ut
*
l
=
new
QVBoxLayout
(
this
);
a
ut
o
*
l
=
new
QVBoxLayout
(
this
);
l
->
setContentsMargins
(
0
,
0
,
0
,
0
);
TransportManagementWidget
*
tmw
=
new
TransportManagementWidget
(
this
);
auto
*
tmw
=
new
TransportManagementWidget
(
this
);
l
->
addWidget
(
tmw
);
}
...
...
src/kmailtransport/plugins/smtp/autotests/fakeserver.cpp
View file @
52710ca8
...
...
@@ -57,7 +57,7 @@ void FakeServer::dataAvailable()
{
QMutexLocker
locker
(
&
m_mutex
);
QTcpSocket
*
socket
=
qobject_cast
<
QTcpSocket
*>
(
sender
());
auto
*
socket
=
qobject_cast
<
QTcpSocket
*>
(
sender
());
Q_ASSERT
(
socket
!=
nullptr
);
int
scenarioNumber
=
m_clientSockets
.
indexOf
(
socket
);
...
...
src/kmailtransport/plugins/smtp/smtpconfigdialog.cpp
View file @
52710ca8
...
...
@@ -22,7 +22,7 @@ SmtpConfigDialog::SmtpConfigDialog(Transport *transport, QWidget *parent)
{
Q_ASSERT
(
transport
);
mTransport
=
transport
;
QVBoxLayo
ut
*
mainLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
mainLayout
=
new
QVBoxLayout
(
this
);
mConfigWidget
=
new
SMTPConfigWidget
(
transport
,
this
);
mConfigWidget
->
setObjectName
(
QStringLiteral
(
"smtpconfigwidget"
));
mainLayout
->
addWidget
(
mConfigWidget
);
...
...
src/kmailtransport/tests/addtransportdialogng_gui.cpp
View file @
52710ca8
...
...
@@ -15,11 +15,11 @@
AddTransportDialogNG_gui
::
AddTransportDialogNG_gui
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
QHBoxLayo
ut
*
layout
=
new
QHBoxLayout
(
this
);
a
ut
o
*
layout
=
new
QHBoxLayout
(
this
);
QPushButton
*
button
=
new
QPushButton
(
QStringLiteral
(
"Add transport"
));
layout
->
addWidget
(
button
);
connect
(
button
,
&
QPushButton
::
clicked
,
this
,
[
this
]
{
MailTransport
::
AddTransportDialogNG
*
dlg
=
new
MailTransport
::
AddTransportDialogNG
(
this
);
auto
*
dlg
=
new
MailTransport
::
AddTransportDialogNG
(
this
);
dlg
->
exec
();
delete
dlg
;
});
...
...
@@ -30,7 +30,7 @@ int main(int argc, char **argv)
QApplication
app
(
argc
,
argv
);
app
.
setApplicationName
(
QStringLiteral
(
"addtransportnewng"
));
QStandardPaths
::
setTestModeEnabled
(
true
);
AddTransportDialogNG_gui
*
t
=
new
AddTransportDialogNG_gui
();
auto
*
t
=
new
AddTransportDialogNG_gui
();
t
->
show
();
app
.
exec
();
delete
t
;
...
...
src/kmailtransport/tests/transportmgr.cpp
View file @
52710ca8
...
...
@@ -24,7 +24,7 @@ using namespace MailTransport;
TransportMgr
::
TransportMgr
()
:
mCurrentJob
(
nullptr
)
{
QVBoxLayo
ut
*
vbox
=
new
QVBoxLayout
(
this
);
a
ut
o
*
vbox
=
new
QVBoxLayout
(
this
);
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
addWidget
(
new
TransportManagementWidget
(
this
));
...
...
@@ -117,7 +117,7 @@ int main(int argc, char **argv)
QApplication
app
(
argc
,
argv
);
app
.
setApplicationName
(
QStringLiteral
(
"transportmgr"
));
TransportMgr
*
t
=
new
TransportMgr
();
auto
*
t
=
new
TransportMgr
();
t
->
show
();
app
.
exec
();
delete
t
;
...
...
src/kmailtransport/widgets/addtransportdialogng.cpp
View file @
52710ca8
...
...
@@ -87,7 +87,7 @@ AddTransportDialogNG::AddTransportDialogNG(QWidget *parent)
{
// Setup UI.
{
QVBoxLayo
ut
*
mainLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
mainLayout
=
new
QVBoxLayout
(
this
);
QWidget
*
widget
=
new
QWidget
(
this
);
d
->
ui
.
setupUi
(
widget
);
mainLayout
->
addWidget
(
widget
);
...
...
@@ -105,7 +105,7 @@ AddTransportDialogNG::AddTransportDialogNG(QWidget *parent)
// Populate type list.
const
auto
transportTypes
=
TransportManager
::
self
()
->
types
();
for
(
const
TransportType
&
type
:
transportTypes
)
{
QTreeWidgetItem
*
treeItem
=
new
QTreeWidgetItem
(
d
->
ui
.
typeListView
);
auto
*
treeItem
=
new
QTreeWidgetItem
(
d
->
ui
.
typeListView
);
treeItem
->
setText
(
0
,
type
.
name
());
treeItem
->
setText
(
1
,
type
.
description
());
treeItem
->
setToolTip
(
1
,
type
.
description
());
...
...
src/kmailtransport/widgets/transportlistview.cpp
View file @
52710ca8
...
...
@@ -68,7 +68,7 @@ void TransportListView::commitData(QWidget *editor)
return
;
}
QTreeWidgetItem
*
item
=
selectedItems
().
first
();
QLineEdit
*
edit
=
dynamic_cast
<
QLineEdit
*>
(
editor
);
// krazy:exclude=qclasses
auto
*
edit
=
dynamic_cast
<
QLineEdit
*>
(
editor
);
// krazy:exclude=qclasses
Q_ASSERT
(
edit
);
// original code had if
const
int
id
=
item
->
data
(
0
,
Qt
::
UserRole
).
toInt
();
...
...
@@ -94,7 +94,7 @@ void TransportListView::fillTransportList()
clear
();
const
auto
lstTransports
=
TransportManager
::
self
()
->
transports
();
for
(
Transport
*
t
:
lstTransports
)
{
QTreeWidgetItem
*
item
=
new
QTreeWidgetItem
(
this
);
auto
*
item
=
new
QTreeWidgetItem
(
this
);
item
->
setData
(
0
,
Qt
::
UserRole
,
t
->
id
());
QString
name
=
t
->
name
();
if
(
TransportManager
::
self
()
->
defaultTransportId
()
==
t
->
id
())
{
...
...
src/kmailtransportakonadi/autotests/attributetest.cpp
View file @
52710ca8
...
...
@@ -73,7 +73,7 @@ void AttributeTest::testSerialization()
cc
<<
QStringLiteral
(
"cc2@me.org"
);
QStringList
bcc
(
QStringLiteral
(
"bcc1@me.org"
));
bcc
<<
QStringLiteral
(
"bcc2@me.org"
);
AddressAttrib
ut
e
*
a
=
new
AddressAttribute
(
from
,
to
,
cc
,
bcc
);
a
ut
o
*
a
=
new
AddressAttribute
(
from
,
to
,
cc
,
bcc
);
QByteArray
data
=
a
->
serialized
();
delete
a
;
a
=
new
AddressAttribute
;
...
...
@@ -92,7 +92,7 @@ void AttributeTest::testSerialization()
qDebug
()
<<
"ms"
<<
date
.
toString
(
QStringLiteral
(
"z"
));
int
ms
=
date
.
toString
(
QStringLiteral
(
"z"
)).
toInt
();
date
=
date
.
addMSecs
(
-
ms
);
DispatchModeAttribute
*
a
=
new
DispatchModeAttribute
(
mode
);
auto
*
a
=
new
DispatchModeAttribute
(
mode
);
a
->
setSendAfter
(
date
);
QByteArray
data
=
a
->
serialized
();
delete
a
;
...
...
@@ -105,7 +105,7 @@ void AttributeTest::testSerialization()
{
QString
msg
(
QStringLiteral
(
"The #!@$ing thing failed!"
));
ErrorAttrib
ut
e
*
a
=
new
ErrorAttribute
(
msg
);
a
ut
o
*
a
=
new
ErrorAttribute
(
msg
);
QByteArray
data
=
a
->
serialized
();
delete
a
;
a
=
new
ErrorAttribute
;
...
...
@@ -115,7 +115,7 @@ void AttributeTest::testSerialization()
}
{
SentActionAttribute
*
a
=
new
SentActionAttribute
();
auto
*
a
=
new
SentActionAttribute
();
const
qlonglong
id
=
123456789012345ll
;
a
->
addAction
(
SentActionAttribute
::
Action
::
MarkAsReplied
,
QVariant
(
id
));
...
...
@@ -225,7 +225,7 @@ void AttributeTest::testSerialization()
{
int
id
=
3219
;
TransportAttrib
ut
e
*
a
=
new
TransportAttribute
(
id
);
a
ut
o
*
a
=
new
TransportAttribute
(
id
);
QByteArray
data
=
a
->
serialized
();
delete
a
;
a
=
new
TransportAttribute
;
...
...
src/kmailtransportakonadi/autotests/messagequeuejobtest.cpp
View file @
52710ca8
...
...
@@ -52,7 +52,7 @@ void MessageQueueJobTest::initTestCase()
mda
.
setIsOnline
(
false
);
// check that outbox is empty
SpecialMailCollectionsRequestJob
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
auto
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
rjob
->
requestDefaultCollection
(
SpecialMailCollections
::
Outbox
);
QSignalSpy
spy
(
rjob
,
&
KJob
::
result
);
QVERIFY
(
spy
.
wait
(
10000
));
...
...
@@ -66,7 +66,7 @@ void MessageQueueJobTest::testValidMessages()
QVERIFY2
(
tid
>=
0
,
"I need a default transport, but there is none."
);
// send a valid message using the default transport
MessageQueueJob
*
qjob
=
new
MessageQueueJob
;
auto
*
qjob
=
new
MessageQueueJob
;
qjob
->
transportAttribute
().
setTransportId
(
tid
);
Message
::
Ptr
msg
=
Message
::
Ptr
(
new
Message
);
msg
->
setContent
(
"
\n
This is message #1 from the MessageQueueJobTest unit test.
\n
"
);
...
...
@@ -87,30 +87,30 @@ void MessageQueueJobTest::testValidMessages()
Item
item
=
fjob
->
items
().
constFirst
();
QVERIFY
(
!
item
.
remoteId
().
isEmpty
());
// stored by the resource
QVERIFY
(
item
.
hasPayload
<
Message
::
Ptr
>
());
AddressAttrib
ut
e
*
addrA
=
item
.
attribute
<
AddressAttribute
>
();
a
ut
o
*
addrA
=
item
.
attribute
<
AddressAttribute
>
();
QVERIFY
(
addrA
);
QVERIFY
(
addrA
->
from
().
isEmpty
());
QCOMPARE
(
addrA
->
to
().
count
(),
1
);
QCOMPARE
(
addrA
->
to
(),
SPAM_ADDRESS
);
QCOMPARE
(
addrA
->
cc
().
count
(),
0
);
QCOMPARE
(
addrA
->
bcc
().
count
(),
0
);
DispatchModeAttribute
*
dA
=
item
.
attribute
<
DispatchModeAttribute
>
();
auto
*
dA
=
item
.
attribute
<
DispatchModeAttribute
>
();
QVERIFY
(
dA
);
QCOMPARE
(
dA
->
dispatchMode
(),
DispatchModeAttribute
::
Automatic
);
// default mode
SentBehaviourAttribute
*
sA
=
item
.
attribute
<
SentBehaviourAttribute
>
();
auto
*
sA
=
item
.
attribute
<
SentBehaviourAttribute
>
();
QVERIFY
(
sA
);
// default sent collection
QCOMPARE
(
sA
->
sentBehaviour
(),
SentBehaviourAttribute
::
MoveToDefaultSentCollection
);
TransportAttrib
ut
e
*
tA
=
item
.
attribute
<
TransportAttribute
>
();
a
ut
o
*
tA
=
item
.
attribute
<
TransportAttribute
>
();
QVERIFY
(
tA
);
QCOMPARE
(
tA
->
transportId
(),
tid
);
ErrorAttrib
ut
e
*
eA
=
item
.
attribute
<
ErrorAttribute
>
();
a
ut
o
*
eA
=
item
.
attribute
<
ErrorAttribute
>
();
QVERIFY
(
!
eA
);
// no error
QCOMPARE
(
item
.
flags
().
count
(),
1
);
QVERIFY
(
item
.
flags
().
contains
(
Akonadi
::
MessageFlags
::
Queued
));
// delete message, for further tests
ItemDeleteJob
*
djob
=
new
ItemDeleteJob
(
item
);
auto
*
djob
=
new
ItemDeleteJob
(
item
);
AKVERIFYEXEC
(
djob
);
verifyOutboxContents
(
0
);
...
...
@@ -126,7 +126,7 @@ void MessageQueueJobTest::testInvalidMessages()
Message
::
Ptr
msg
;
// without message
MessageQueueJob
*
job
=
new
MessageQueueJob
;
auto
*
job
=
new
MessageQueueJob
;
job
->
transportAttribute
().
setTransportId
(
TransportManager
::
self
()
->
defaultTransportId
());
job
->
addressAttribute
().
setTo
(
SPAM_ADDRESS
);
QVERIFY
(
!
job
->
exec
());
...
...
@@ -166,7 +166,7 @@ void MessageQueueJobTest::verifyOutboxContents(qlonglong count)
Collection
outbox
=
SpecialMailCollections
::
self
()
->
defaultCollection
(
SpecialMailCollections
::
Outbox
);
QVERIFY
(
outbox
.
isValid
());
CollectionStatisticsJob
*
job
=
new
CollectionStatisticsJob
(
outbox
);
auto
*
job
=
new
CollectionStatisticsJob
(
outbox
);
AKVERIFYEXEC
(
job
);
QCOMPARE
(
job
->
statistics
().
count
(),
count
);
}
...
...
src/kmailtransportakonadi/dispatcherinterface.cpp
View file @
52710ca8
...
...
@@ -54,7 +54,7 @@ void DispatcherInterface::dispatchManually()
return
;
}
FilterActionJob
*
mjob
=
new
FilterActionJob
(
outbox
,
new
SendQueuedAction
,
sInstance
);
auto
*
mjob
=
new
FilterActionJob
(
outbox
,
new
SendQueuedAction
,
sInstance
);
QObject
::
connect
(
mjob
,
&
KJob
::
result
,
sInstance
(),
&
DispatcherInterfacePrivate
::
massModifyResult
);
}
...
...
@@ -67,7 +67,7 @@ void DispatcherInterface::retryDispatching()
return
;
}
FilterActionJob
*
mjob
=
new
FilterActionJob
(
outbox
,
new
ClearErrorAction
,
sInstance
);
auto
*
mjob
=
new
FilterActionJob
(
outbox
,
new
ClearErrorAction
,
sInstance
);
QObject
::
connect
(
mjob
,
&
KJob
::
result
,
sInstance
(),
&
DispatcherInterfacePrivate
::
massModifyResult
);
}
...
...
@@ -80,7 +80,7 @@ void DispatcherInterface::dispatchManualTransport(int transportId)
return
;
}
FilterActionJob
*
mjob
auto
*
mjob
=
new
FilterActionJob
(
outbox
,
new
DispatchManualTransportAction
(
transportId
),
sInstance
);
QObject
::
connect
(
mjob
,
&
KJob
::
result
,
sInstance
(),
&
DispatcherInterfacePrivate
::
massModifyResult
);
}
...
...
src/kmailtransportakonadi/dispatchmodeattribute.cpp
View file @
52710ca8
...
...
@@ -33,7 +33,7 @@ DispatchModeAttribute::~DispatchModeAttribute()
DispatchModeAttribute
*
DispatchModeAttribute
::
clone
()
const
{
DispatchModeAttribute
*
const
cloned
=
new
DispatchModeAttribute
(
d
->
mMode
);
auto
*
const
cloned
=
new
DispatchModeAttribute
(
d
->
mMode
);
cloned
->
setSendAfter
(
d
->
mDueDate
);
return
cloned
;
}
...
...
src/kmailtransportakonadi/filteractionjob.cpp
View file @
52710ca8
...
...
@@ -46,7 +46,7 @@ void FilterActionJob::Private::fetchResult(KJob *job)
return
;
}
ItemFetchJob
*
fjob
=
dynamic_cast
<
ItemFetchJob
*>
(
job
);
auto
*
fjob
=
dynamic_cast
<
ItemFetchJob
*>
(
job
);
Q_ASSERT
(
fjob
);
Q_ASSERT
(
items
.
isEmpty
());
items
=
fjob
->
items
();
...
...
@@ -109,7 +109,7 @@ void FilterActionJob::doStart()
{
if
(
d
->
collection
.
isValid
())
{
qCDebug
(
MAILTRANSPORTAKONADI_LOG
)
<<
"Fetching collection"
<<
d
->
collection
.
id
();
ItemFetchJob
*
fjob
=
new
ItemFetchJob
(
d
->
collection
,
this
);
auto
*
fjob
=
new
ItemFetchJob
(
d
->
collection
,
this
);
Q_ASSERT
(
d
->
functor
);
d
->
fetchScope
=
d
->
functor
->
fetchScope
();
fjob
->
setFetchScope
(
d
->
fetchScope
);
...
...
src/kmailtransportakonadi/messagequeuejob.cpp
View file @
52710ca8
...
...
@@ -111,7 +111,7 @@ void MessageQueueJob::Private::outboxRequestResult(KJob *job)
return
;
}
SpecialMailCollectionsRequestJob
*
requestJob
auto
*
requestJob
=
qobject_cast
<
SpecialMailCollectionsRequestJob
*>
(
job
);
if
(
!
requestJob
)
{
return
;
...
...
@@ -136,7 +136,7 @@ void MessageQueueJob::Private::outboxRequestResult(KJob *job)
// Store the item in the outbox.
const
Collection
collection
=
requestJob
->
collection
();
Q_ASSERT
(
collection
.
isValid
());
ItemCreateJob
*
cjob
=
new
ItemCreateJob
(
item
,
collection
);
// job autostarts
auto
*
cjob
=
new
ItemCreateJob
(
item
,
collection
);
// job autostarts
q
->
addSubjob
(
cjob
);
}
...
...
@@ -188,7 +188,7 @@ void MessageQueueJob::setMessage(const Message::Ptr &message)
void
MessageQueueJob
::
start
()
{
SpecialMailCollectionsRequestJob
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
auto
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
rjob
->
requestDefaultCollection
(
SpecialMailCollections
::
Outbox
);
connect
(
rjob
,
&
SpecialMailCollectionsRequestJob
::
result
,
this
,
[
this
](
KJob
*
job
)
{
d
->
outboxRequestResult
(
job
);
...
...
src/kmailtransportakonadi/plugins/akonadimailtransportplugin.cpp
View file @
52710ca8
...
...
@@ -84,7 +84,7 @@ MailTransport::TransportJob *AkonadiMailTransportPlugin::createTransportJob(Mail
void
AkonadiMailTransportPlugin
::
initializeTransport
(
MailTransport
::
Transport
*
t
,
const
QString
&
identifier
)
{
AgentInstanceCreateJob
*
cjob
=
new
AgentInstanceCreateJob
(
identifier
);
auto
*
cjob
=
new
AgentInstanceCreateJob
(
identifier
);
if
(
!
cjob
->
exec
())
{
qCWarning
(
MAILTRANSPORT_AKONADI_LOG
)
<<
"Failed to create agent instance of type"
<<
identifier
;
return
;
...
...
src/kmailtransportakonadi/plugins/resourcesendjob.cpp
View file @
52710ca8
...
...
@@ -30,7 +30,7 @@ void ResourceSendJob::doStart()
{
Message
::
Ptr
msg
=
Message
::
Ptr
(
new
Message
);
msg
->
setContent
(
data
());
MessageQueueJob
*
job
=
new
MessageQueueJob
;
auto
*
job
=
new
MessageQueueJob
;
job
->
setMessage
(
msg
);
job
->
transportAttribute
().
setTransportId
(
transport
()
->
id
());
// Default dispatch mode (send now).
...
...
src/kmailtransportakonadi/sentactionattribute.cpp
View file @
52710ca8
...
...
@@ -104,7 +104,7 @@ SentActionAttribute::Action::List SentActionAttribute::actions() const
SentActionAttribute
*
SentActionAttribute
::
clone
()
const
{
SentActionAttribute
*
attribute
=
new
SentActionAttribute
;
auto
*
attribute
=
new
SentActionAttribute
;
attribute
->
d
->
mActions
=
d
->
mActions
;
return
attribute
;
...
...
src/kmailtransportakonadi/tests/clearerror.cpp
View file @
52710ca8
...
...
@@ -22,7 +22,7 @@ Runner::Runner()
{
Control
::
start
();
SpecialMailCollectionsRequestJob
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
auto
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
rjob
->
requestDefaultCollection
(
SpecialMailCollections
::
Outbox
);
connect
(
rjob
,
&
SpecialMailCollectionsRequestJob
::
result
,
this
,
&
Runner
::
checkFolders
);
rjob
->
start
();
...
...
src/kmailtransportakonadi/tests/queuer.cpp
View file @
52710ca8
...
...
@@ -35,7 +35,7 @@ MessageQueuer::MessageQueuer()
if
(
!
Akonadi
::
Control
::
start
())
{
qFatal
(
"Could not start Akonadi server."
);
}
QVBoxLayo
ut
*
vbox
=
new
QVBoxLayout
(
this
);
a
ut
o
*
vbox
=
new
QVBoxLayout
(
this
);
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mComboBox
=
new
TransportComboBox
(
this
);
...
...
@@ -89,7 +89,7 @@ void MessageQueuer::sendOnDateClicked()
{
QPointer
<
QDialog
>
dialog
=
new
QDialog
(
this
);
auto
layout
=
new
QVBoxLayout
(
dialog
);
QDateTimeEdit
*
dt
=
new
QDateTimeEdit
(
dialog
);
auto
*
dt
=
new
QDateTimeEdit
(
dialog
);
dt
->
setDateTime
(
QDateTime
::
currentDateTime
());
dt
->
setDisplayFormat
(
QStringLiteral
(
"hh:mm:ss"
));
layout
->
addWidget
(
dt
);
...
...
@@ -116,7 +116,7 @@ MessageQueueJob *MessageQueuer::createQueueJob()
msg
->
setContent
(
QByteArray
(
"
\n
"
)
+
mMailEdit
->
document
()
->
toPlainText
().
toLatin1
());
qDebug
()
<<
"msg:"
<<
msg
->
encodedContent
(
true
);
MessageQueueJob
*
job
=
new
MessageQueueJob
();
auto
*
job
=
new
MessageQueueJob
();
job
->
setMessage
(
msg
);
job
->
transportAttribute
().
setTransportId
(
mComboBox
->
currentTransportId
());
// default dispatch mode
...
...
@@ -144,7 +144,7 @@ int main(int argc, char **argv)
QApplication
app
(
argc
,
argv
);
app
.
setApplicationName
(
QStringLiteral
(
"messagequeuer"
));
MessageQueuer
*
t
=
new
MessageQueuer
();
auto
*
t
=
new
MessageQueuer
();
t
->
show
();
app
.
exec
();
delete
t
;
...
...
src/kmailtransportakonadi/tests/sendqueued.cpp
View file @
52710ca8
...
...
@@ -22,7 +22,7 @@ Runner::Runner()
{
Control
::
start
();
SpecialMailCollectionsRequestJob
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
auto
*
rjob
=
new
SpecialMailCollectionsRequestJob
(
this
);
rjob
->
requestDefaultCollection
(
SpecialMailCollections
::
Outbox
);
connect
(
rjob
,
&
SpecialMailCollectionsRequestJob
::
result
,
this
,
&
Runner
::
checkFolders
);
rjob
->
start
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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