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
PIM MailCommon
Commits
8a857804
Commit
8a857804
authored
Nov 02, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modernize code
parent
994a8112
Pipeline
#39277
passed with stage
in 33 minutes and 16 seconds
Changes
127
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
127 changed files
with
369 additions
and
369 deletions
+369
-369
autotests/favoritestest.cpp
autotests/favoritestest.cpp
+4
-4
autotests/foldertreewidgettest.cpp
autotests/foldertreewidgettest.cpp
+6
-6
src/collectionpage/attributes/expirecollectionattribute.cpp
src/collectionpage/attributes/expirecollectionattribute.cpp
+1
-1
src/collectionpage/collectionexpiryjob.cpp
src/collectionpage/collectionexpiryjob.cpp
+2
-2
src/collectionpage/collectionexpirypage.cpp
src/collectionpage/collectionexpirypage.cpp
+2
-2
src/collectionpage/collectionexpirywidget.cpp
src/collectionpage/collectionexpirywidget.cpp
+5
-5
src/collectionpage/collectiongeneralpage.cpp
src/collectionpage/collectiongeneralpage.cpp
+7
-7
src/collectionpage/collectiongeneralwidget.cpp
src/collectionpage/collectiongeneralwidget.cpp
+4
-4
src/collectionpage/collectiontemplateswidget.cpp
src/collectionpage/collectiontemplateswidget.cpp
+3
-3
src/collectionpage/collectionviewwidget.cpp
src/collectionpage/collectionviewwidget.cpp
+10
-10
src/filter/autotests/filteractionaddheadertest.cpp
src/filter/autotests/filteractionaddheadertest.cpp
+4
-4
src/filter/autotests/filteractionaddtoaddressbooktest.cpp
src/filter/autotests/filteractionaddtoaddressbooktest.cpp
+2
-2
src/filter/autotests/filteractiondeletetest.cpp
src/filter/autotests/filteractiondeletetest.cpp
+1
-1
src/filter/autotests/filteractionexectest.cpp
src/filter/autotests/filteractionexectest.cpp
+2
-2
src/filter/autotests/filteractionmissingaccountdialogtest.cpp
...filter/autotests/filteractionmissingaccountdialogtest.cpp
+3
-3
src/filter/autotests/filteractionmissingidentitydialogtest.cpp
...ilter/autotests/filteractionmissingidentitydialogtest.cpp
+4
-4
src/filter/autotests/filteractionmissingsoundurldialogtest.cpp
...ilter/autotests/filteractionmissingsoundurldialogtest.cpp
+3
-3
src/filter/autotests/filteractionmissingtagdialogtest.cpp
src/filter/autotests/filteractionmissingtagdialogtest.cpp
+4
-4
src/filter/autotests/filteractionmissingtemplatedialogtest.cpp
...ilter/autotests/filteractionmissingtemplatedialogtest.cpp
+3
-3
src/filter/autotests/filteractionmissingtransportdialogtest.cpp
...lter/autotests/filteractionmissingtransportdialogtest.cpp
+3
-3
src/filter/autotests/filteractionmovetest.cpp
src/filter/autotests/filteractionmovetest.cpp
+1
-1
src/filter/autotests/filteractionplaysoundtest.cpp
src/filter/autotests/filteractionplaysoundtest.cpp
+1
-1
src/filter/autotests/filteractionrewriteheadertest.cpp
src/filter/autotests/filteractionrewriteheadertest.cpp
+3
-3
src/filter/autotests/filteractionsettransporttest.cpp
src/filter/autotests/filteractionsettransporttest.cpp
+1
-1
src/filter/autotests/filteractionwithaddresstest.cpp
src/filter/autotests/filteractionwithaddresstest.cpp
+2
-2
src/filter/autotests/filteractionwithurltest.cpp
src/filter/autotests/filteractionwithurltest.cpp
+4
-4
src/filter/autotests/filterconverttosieveresultdialogtest.cpp
...filter/autotests/filterconverttosieveresultdialogtest.cpp
+4
-4
src/filter/autotests/invalidfilterdialogtest.cpp
src/filter/autotests/invalidfilterdialogtest.cpp
+2
-2
src/filter/autotests/invalidfilterwidgettest.cpp
src/filter/autotests/invalidfilterwidgettest.cpp
+2
-2
src/filter/dialog/filteractionmissingaccountdialog.cpp
src/filter/dialog/filteractionmissingaccountdialog.cpp
+1
-1
src/filter/dialog/filteractionmissingfolderdialog.cpp
src/filter/dialog/filteractionmissingfolderdialog.cpp
+1
-1
src/filter/dialog/filteractionmissingidentitydialog.cpp
src/filter/dialog/filteractionmissingidentitydialog.cpp
+1
-1
src/filter/dialog/filteractionmissingsoundurldialog.cpp
src/filter/dialog/filteractionmissingsoundurldialog.cpp
+1
-1
src/filter/dialog/filteractionmissingtagdialog.cpp
src/filter/dialog/filteractionmissingtagdialog.cpp
+3
-3
src/filter/dialog/filteractionmissingtemplatedialog.cpp
src/filter/dialog/filteractionmissingtemplatedialog.cpp
+1
-1
src/filter/dialog/filteractionmissingtransportdialog.cpp
src/filter/dialog/filteractionmissingtransportdialog.cpp
+1
-1
src/filter/dialog/selectthunderbirdfilterfilesdialog.cpp
src/filter/dialog/selectthunderbirdfilterfilesdialog.cpp
+1
-1
src/filter/filteractions/filteractionaddheader.cpp
src/filter/filteractions/filteractionaddheader.cpp
+5
-5
src/filter/filteractions/filteractionaddtoaddressbook.cpp
src/filter/filteractions/filteractionaddtoaddressbook.cpp
+3
-3
src/filter/filteractions/filteractioncopy.cpp
src/filter/filteractions/filteractioncopy.cpp
+1
-1
src/filter/filteractions/filteractiondecrypt.cpp
src/filter/filteractions/filteractiondecrypt.cpp
+1
-1
src/filter/filteractions/filteractiondict.cpp
src/filter/filteractions/filteractiondict.cpp
+1
-1
src/filter/filteractions/filteractiondict.h
src/filter/filteractions/filteractiondict.h
+1
-1
src/filter/filteractions/filteractionforward.cpp
src/filter/filteractions/filteractionforward.cpp
+5
-5
src/filter/filteractions/filteractionrewriteheader.cpp
src/filter/filteractions/filteractionrewriteheader.cpp
+7
-7
src/filter/filteractions/filteractionsetidentity.cpp
src/filter/filteractions/filteractionsetidentity.cpp
+4
-4
src/filter/filteractions/filteractionsettransport.cpp
src/filter/filteractions/filteractionsettransport.cpp
+4
-4
src/filter/filteractions/filteractionwidget.cpp
src/filter/filteractions/filteractionwidget.cpp
+5
-5
src/filter/filteractions/filteractionwithaddress.cpp
src/filter/filteractions/filteractionwithaddress.cpp
+1
-1
src/filter/filteractions/filteractionwithcommand.cpp
src/filter/filteractions/filteractionwithcommand.cpp
+3
-3
src/filter/filteractions/filteractionwithfolder.cpp
src/filter/filteractions/filteractionwithfolder.cpp
+1
-1
src/filter/filteractions/filteractionwithstring.cpp
src/filter/filteractions/filteractionwithstring.cpp
+1
-1
src/filter/filteractions/filteractionwithtest.cpp
src/filter/filteractions/filteractionwithtest.cpp
+1
-1
src/filter/filteractions/filteractionwithurl.cpp
src/filter/filteractions/filteractionwithurl.cpp
+5
-5
src/filter/filterconverter/filterconverttosieveresultdialog.cpp
...lter/filterconverter/filterconverttosieveresultdialog.cpp
+3
-3
src/filter/filterimporter/autotests/filterimportbalsatest.cpp
...filter/filterimporter/autotests/filterimportbalsatest.cpp
+1
-1
src/filter/filterimporter/autotests/filterimportclawmailtest.cpp
...ter/filterimporter/autotests/filterimportclawmailtest.cpp
+1
-1
src/filter/filterimporter/autotests/filterimportergmailtest.cpp
...lter/filterimporter/autotests/filterimportergmailtest.cpp
+1
-1
src/filter/filterimporter/autotests/filterimportevolutiontest.cpp
...er/filterimporter/autotests/filterimportevolutiontest.cpp
+1
-1
src/filter/filterimporter/autotests/filterimportprocmailtest.cpp
...ter/filterimporter/autotests/filterimportprocmailtest.cpp
+1
-1
src/filter/filterimporter/autotests/filterimportsylpheedtest.cpp
...ter/filterimporter/autotests/filterimportsylpheedtest.cpp
+1
-1
src/filter/filterimporter/autotests/filterimportthunderbirdtest.cpp
.../filterimporter/autotests/filterimportthunderbirdtest.cpp
+1
-1
src/filter/filterimporter/filterimporterbalsa.cpp
src/filter/filterimporter/filterimporterbalsa.cpp
+1
-1
src/filter/filterimporter/filterimporterclawsmail.cpp
src/filter/filterimporter/filterimporterclawsmail.cpp
+1
-1
src/filter/filterimporter/filterimporterevolution.cpp
src/filter/filterimporter/filterimporterevolution.cpp
+1
-1
src/filter/filterimporter/filterimportergmail.cpp
src/filter/filterimporter/filterimportergmail.cpp
+1
-1
src/filter/filterimporter/filterimportersylpheed.cpp
src/filter/filterimporter/filterimportersylpheed.cpp
+1
-1
src/filter/filterimporterexporter.cpp
src/filter/filterimporterexporter.cpp
+9
-9
src/filter/filtermanager.cpp
src/filter/filtermanager.cpp
+2
-2
src/filter/filterselectiondialog.cpp
src/filter/filterselectiondialog.cpp
+3
-3
src/filter/invalidfilters/invalidfilterdialog.cpp
src/filter/invalidfilters/invalidfilterdialog.cpp
+2
-2
src/filter/invalidfilters/invalidfilterlistitemdelegate.cpp
src/filter/invalidfilters/invalidfilterlistitemdelegate.cpp
+3
-3
src/filter/invalidfilters/invalidfilterlistview.cpp
src/filter/invalidfilters/invalidfilterlistview.cpp
+2
-2
src/filter/invalidfilters/invalidfilterwidget.cpp
src/filter/invalidfilters/invalidfilterwidget.cpp
+1
-1
src/filter/kmfilteraccountlist.cpp
src/filter/kmfilteraccountlist.cpp
+2
-2
src/filter/kmfilterdialog.cpp
src/filter/kmfilterdialog.cpp
+21
-21
src/filter/kmfilterlistbox.cpp
src/filter/kmfilterlistbox.cpp
+15
-15
src/filter/mdnadvicedialog.cpp
src/filter/mdnadvicedialog.cpp
+1
-1
src/filter/soundtestwidget.cpp
src/filter/soundtestwidget.cpp
+1
-1
src/filter/tests/filteractionmissingidentitydialoggui.cpp
src/filter/tests/filteractionmissingidentitydialoggui.cpp
+1
-1
src/filter/tests/filterimporterexportergui.cpp
src/filter/tests/filterimporterexportergui.cpp
+3
-3
src/filter/tests/invalidfilterdialoggui.cpp
src/filter/tests/invalidfilterdialoggui.cpp
+1
-1
src/filter/tests/kmfilterdialogtestgui.cpp
src/filter/tests/kmfilterdialogtestgui.cpp
+2
-2
src/folder/accountconfigorderdialog.cpp
src/folder/accountconfigorderdialog.cpp
+5
-5
src/folder/foldercollectionmonitor.cpp
src/folder/foldercollectionmonitor.cpp
+2
-2
src/folder/folderrequester.cpp
src/folder/folderrequester.cpp
+3
-3
src/folder/folderselectiondialog.cpp
src/folder/folderselectiondialog.cpp
+2
-2
src/folder/foldersettings.cpp
src/folder/foldersettings.cpp
+1
-1
src/folder/foldertreeview.cpp
src/folder/foldertreeview.cpp
+5
-5
src/folder/foldertreewidget.cpp
src/folder/foldertreewidget.cpp
+1
-1
src/folder/foldertreewidgetproxymodel.cpp
src/folder/foldertreewidgetproxymodel.cpp
+1
-1
src/job/backupjob.cpp
src/job/backupjob.cpp
+4
-4
src/job/expirejob.cpp
src/job/expirejob.cpp
+5
-5
src/kernel/mailkernel.cpp
src/kernel/mailkernel.cpp
+3
-3
src/mdn/mdnadvicehelper.cpp
src/mdn/mdnadvicehelper.cpp
+2
-2
src/search/searchpattern.cpp
src/search/searchpattern.cpp
+1
-1
src/search/searchpatternedit.cpp
src/search/searchpatternedit.cpp
+7
-7
src/search/searchrule/searchrulestring.cpp
src/search/searchrule/searchrulestring.cpp
+4
-4
src/search/widgethandler/daterulewidgethandler.cpp
src/search/widgethandler/daterulewidgethandler.cpp
+4
-4
src/search/widgethandler/headersrulerwidgethandler.cpp
src/search/widgethandler/headersrulerwidgethandler.cpp
+5
-5
src/search/widgethandler/messagerulewidgethandler.cpp
src/search/widgethandler/messagerulewidgethandler.cpp
+6
-6
src/search/widgethandler/numericdoublerulewidgethandler.cpp
src/search/widgethandler/numericdoublerulewidgethandler.cpp
+4
-4
src/search/widgethandler/numericrulewidgethandler.cpp
src/search/widgethandler/numericrulewidgethandler.cpp
+4
-4
src/search/widgethandler/tagrulewidgethandler.cpp
src/search/widgethandler/tagrulewidgethandler.cpp
+7
-7
src/search/widgethandler/textrulerwidgethandler.cpp
src/search/widgethandler/textrulerwidgethandler.cpp
+4
-4
src/snippets/autotests/snippetattachmentwidgettest.cpp
src/snippets/autotests/snippetattachmentwidgettest.cpp
+3
-3
src/snippets/autotests/snippetcustomfileattachmentnamedialogtest.cpp
...s/autotests/snippetcustomfileattachmentnamedialogtest.cpp
+3
-3
src/snippets/autotests/snippetcustomfileattachmentnamewidgettest.cpp
...s/autotests/snippetcustomfileattachmentnamewidgettest.cpp
+3
-3
src/snippets/autotests/snippetselectattachmentdialogtest.cpp
src/snippets/autotests/snippetselectattachmentdialogtest.cpp
+3
-3
src/snippets/autotests/snippetselectattachmentwidgettest.cpp
src/snippets/autotests/snippetselectattachmentwidgettest.cpp
+2
-2
src/snippets/snippetattachmentwidget.cpp
src/snippets/snippetattachmentwidget.cpp
+2
-2
src/snippets/snippetcustomfileattachmentnamedialog.cpp
src/snippets/snippetcustomfileattachmentnamedialog.cpp
+1
-1
src/snippets/snippetcustomfileattachmentnamewidget.cpp
src/snippets/snippetcustomfileattachmentnamewidget.cpp
+3
-3
src/snippets/snippetdialog.cpp
src/snippets/snippetdialog.cpp
+1
-1
src/snippets/snippetselectattachmentdialog.cpp
src/snippets/snippetselectattachmentdialog.cpp
+1
-1
src/snippets/snippetselectattachmentwidget.cpp
src/snippets/snippetselectattachmentwidget.cpp
+1
-1
src/snippets/snippetsmanager.cpp
src/snippets/snippetsmanager.cpp
+1
-1
src/snippets/snippetsmodel.cpp
src/snippets/snippetsmodel.cpp
+8
-8
src/snippets/snippetvariabledialog.cpp
src/snippets/snippetvariabledialog.cpp
+1
-1
src/snippets/snippetwidget.cpp
src/snippets/snippetwidget.cpp
+2
-2
src/tag/addtagdialog.cpp
src/tag/addtagdialog.cpp
+3
-3
src/tag/tag.cpp
src/tag/tag.cpp
+2
-2
src/tag/tagwidget.cpp
src/tag/tagwidget.cpp
+3
-3
src/util/mailutil.cpp
src/util/mailutil.cpp
+1
-1
src/widgets/favoritecollectionwidget.cpp
src/widgets/favoritecollectionwidget.cpp
+4
-4
src/widgets/redirectdialog.cpp
src/widgets/redirectdialog.cpp
+3
-3
src/widgets/redirectwidget.cpp
src/widgets/redirectwidget.cpp
+2
-2
No files found.
autotests/favoritestest.cpp
View file @
8a857804
...
...
@@ -64,9 +64,9 @@ static bool waitForPopulation(const QModelIndex &idx, EntityTreeModel *model, in
EntityTreeModel
*
FavoriteProxyTest
::
createETM
()
{
ChangeRecorder
*
changeRecorder
=
new
ChangeRecorder
(
this
);
auto
*
changeRecorder
=
new
ChangeRecorder
(
this
);
changeRecorder
->
setCollectionMonitored
(
Collection
::
root
());
EntityTreeModel
*
model
=
new
EntityTreeModel
(
changeRecorder
,
this
);
auto
*
model
=
new
EntityTreeModel
(
changeRecorder
,
this
);
model
->
setItemPopulationStrategy
(
Akonadi
::
EntityTreeModel
::
LazyPopulation
);
return
model
;
}
...
...
@@ -97,10 +97,10 @@ void FavoriteProxyTest::testReordering()
configGroup
.
writeEntry
(
"FavoriteCollectionLabels"
,
labels
);
configGroup
.
writeEntry
(
"0"
,
order
);
FavoriteCollectionsModel
*
favoriteModel
=
new
FavoriteCollectionsModel
(
model
,
configGroup
,
this
);
auto
*
favoriteModel
=
new
FavoriteCollectionsModel
(
model
,
configGroup
,
this
);
QTRY_COMPARE
(
favoriteModel
->
rowCount
(),
2
);
FavoriteCollectionOrderProxyModel
*
orderProxy
=
new
FavoriteCollectionOrderProxyModel
(
this
);
auto
*
orderProxy
=
new
FavoriteCollectionOrderProxyModel
(
this
);
orderProxy
->
setOrderConfig
(
configGroup
);
orderProxy
->
setSourceModel
(
favoriteModel
);
orderProxy
->
sort
(
0
,
Qt
::
AscendingOrder
);
...
...
autotests/foldertreewidgettest.cpp
View file @
8a857804
...
...
@@ -49,7 +49,7 @@ private Q_SLOTS:
{
AkonadiTest
::
checkTestIsIsolated
();
DummyKernel
*
kernel
=
new
DummyKernel
(
nullptr
);
auto
*
kernel
=
new
DummyKernel
(
nullptr
);
CommonKernel
->
registerKernelIf
(
kernel
);
CommonKernel
->
registerSettingsIf
(
kernel
);
...
...
@@ -106,7 +106,7 @@ private Q_SLOTS:
QSignalSpy
rATBRSpy_TopModel
(
mTopModel
,
&
QAbstractItemModel
::
rowsAboutToBeRemoved
);
// Now delete it
Akonadi
::
CollectionDeleteJob
*
delJob
=
new
Akonadi
::
CollectionDeleteJob
(
searchCol
);
auto
*
delJob
=
new
Akonadi
::
CollectionDeleteJob
(
searchCol
);
AKVERIFYEXEC
(
delJob
);
// Check it disappeared from the tree, as well as the toplevel item
...
...
@@ -142,7 +142,7 @@ private Q_SLOTS:
// Create resources
const
int
numResources
=
numFolders
.
count
();
for
(
int
i
=
1
/*first one already created*/
;
i
<
numResources
;
++
i
)
{
AgentInstanceCreateJob
*
agentCreateJob
=
new
AgentInstanceCreateJob
(
agentType
);
auto
*
agentCreateJob
=
new
AgentInstanceCreateJob
(
agentType
);
AKVERIFYEXEC
(
agentCreateJob
);
const
QString
identifier
=
agentCreateJob
->
instance
().
identifier
();
...
...
@@ -158,7 +158,7 @@ private Q_SLOTS:
Collection
mailCollection
;
mailCollection
.
setParentCollection
(
topLevelCollection
);
mailCollection
.
setName
(
QStringLiteral
(
"mailCollection_%1_%2"
).
arg
(
i
).
arg
(
number
));
CollectionCreateJob
*
collCreateJob
=
new
CollectionCreateJob
(
mailCollection
);
auto
*
collCreateJob
=
new
CollectionCreateJob
(
mailCollection
);
AKVERIFYEXEC
(
collCreateJob
);
}
const
int
resourceRow
=
collectNames
(
mTopModel
).
indexOf
(
"res"
+
QString
::
number
(
i
+
1
));
...
...
@@ -183,7 +183,7 @@ private Q_SLOTS:
Collection
mailCollection
;
mailCollection
.
setParentCollection
(
currentColl
);
mailCollection
.
setName
(
QStringLiteral
(
"sub%1"
).
arg
(
number
+
1
));
CollectionCreateJob
*
collCreateJob
=
new
CollectionCreateJob
(
mailCollection
);
auto
*
collCreateJob
=
new
CollectionCreateJob
(
mailCollection
);
AKVERIFYEXEC
(
collCreateJob
);
currentColl
=
collCreateJob
->
collection
();
}
...
...
@@ -198,7 +198,7 @@ private Q_SLOTS:
QTest
::
qWait
(
100
);
// #### akonadi bug? Without this, a warning "Only resources can modify remote identifiers" appears
// When moving the source folder (sub2) to the dest folder
CollectionMoveJob
*
collMoveJob
=
new
CollectionMoveJob
(
currentColl
,
newParentCollection
);
auto
*
collMoveJob
=
new
CollectionMoveJob
(
currentColl
,
newParentCollection
);
AKVERIFYEXEC
(
collMoveJob
);
// wait for Akonadi::Monitor::collectionMoved
...
...
src/collectionpage/attributes/expirecollectionattribute.cpp
View file @
8a857804
...
...
@@ -25,7 +25,7 @@ QByteArray ExpireCollectionAttribute::type() const
ExpireCollectionAttribute
*
ExpireCollectionAttribute
::
clone
()
const
{
ExpireCollectionAttribute
*
expireAttr
=
new
ExpireCollectionAttribute
();
auto
*
expireAttr
=
new
ExpireCollectionAttribute
();
expireAttr
->
setAutoExpire
(
mExpireMessages
);
expireAttr
->
setUnreadExpireAge
(
mUnreadExpireAge
);
expireAttr
->
setUnreadExpireUnits
(
mUnreadExpireUnits
);
...
...
src/collectionpage/collectionexpiryjob.cpp
View file @
8a857804
...
...
@@ -24,7 +24,7 @@ CollectionExpiryJob::~CollectionExpiryJob()
void
CollectionExpiryJob
::
start
()
{
if
(
mCollection
.
isValid
())
{
Akonadi
::
CollectionModifyJob
*
job
=
new
Akonadi
::
CollectionModifyJob
(
mCollection
,
this
);
auto
*
job
=
new
Akonadi
::
CollectionModifyJob
(
mCollection
,
this
);
connect
(
job
,
&
Akonadi
::
CollectionModifyJob
::
result
,
this
,
&
CollectionExpiryJob
::
slotCollectionModified
);
}
else
{
qCWarning
(
MAILCOMMON_LOG
)
<<
"Collection is not valid"
;
...
...
@@ -52,7 +52,7 @@ void CollectionExpiryJob::slotCollectionModified(KJob *job)
// trigger immediate expiry if there is something to do
if
(
mExpireNow
)
{
Akonadi
::
CollectionModifyJob
*
modifiedJob
=
qobject_cast
<
Akonadi
::
CollectionModifyJob
*>
(
job
);
auto
*
modifiedJob
=
qobject_cast
<
Akonadi
::
CollectionModifyJob
*>
(
job
);
if
(
modifiedJob
)
{
MailCommon
::
Util
::
expireOldMessages
(
modifiedJob
->
collection
(),
true
/*immediate*/
);
}
else
{
...
...
src/collectionpage/collectionexpirypage.cpp
View file @
8a857804
...
...
@@ -38,7 +38,7 @@ bool CollectionExpiryPage::canHandle(const Akonadi::Collection &col) const
void
CollectionExpiryPage
::
init
()
{
QVBoxLayo
ut
*
globalVBox
=
new
QVBoxLayout
(
this
);
a
ut
o
*
globalVBox
=
new
QVBoxLayout
(
this
);
mCollectionExpiryWidget
=
new
CollectionExpiryWidget
(
this
);
connect
(
mCollectionExpiryWidget
,
&
CollectionExpiryWidget
::
saveAndExpireRequested
,
this
,
&
CollectionExpiryPage
::
slotSaveAndExpire
);
connect
(
mCollectionExpiryWidget
,
&
CollectionExpiryWidget
::
configChanged
,
this
,
&
CollectionExpiryPage
::
slotConfigChanged
);
...
...
@@ -56,7 +56,7 @@ void CollectionExpiryPage::load(const Akonadi::Collection &collection)
{
mCollection
=
collection
;
init
();
const
MailCommon
::
ExpireCollectionAttribute
*
attr
=
collection
.
attribute
<
MailCommon
::
ExpireCollectionAttribute
>
();
const
auto
*
attr
=
collection
.
attribute
<
MailCommon
::
ExpireCollectionAttribute
>
();
if
(
attr
)
{
int
daysToExpireRead
,
daysToExpireUnread
;
attr
->
daysToExpire
(
daysToExpireUnread
,
daysToExpireRead
);
...
...
src/collectionpage/collectionexpirywidget.cpp
View file @
8a857804
...
...
@@ -28,10 +28,10 @@ using namespace MailCommon;
CollectionExpiryWidget
::
CollectionExpiryWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
QVBoxLayo
ut
*
globalVBox
=
new
QVBoxLayout
(
this
);
a
ut
o
*
globalVBox
=
new
QVBoxLayout
(
this
);
globalVBox
->
setContentsMargins
({});
QGridLayo
ut
*
daysBox
=
new
QGridLayout
;
a
ut
o
*
daysBox
=
new
QGridLayout
;
mExpireReadMailCB
=
new
QCheckBox
(
i18n
(
"Expire read messages after"
),
this
);
connect
(
mExpireReadMailCB
,
&
QCheckBox
::
toggled
,
this
,
&
CollectionExpiryWidget
::
slotUpdateControls
);
...
...
@@ -64,11 +64,11 @@ CollectionExpiryWidget::CollectionExpiryWidget(QWidget *parent)
globalVBox
->
addSpacing
(
30
);
QGroupBox
*
actionsGroup
=
new
QGroupBox
(
this
);
auto
*
actionsGroup
=
new
QGroupBox
(
this
);
actionsGroup
->
setFlat
(
true
);
// for mutual exclusion of the radio buttons
globalVBox
->
addWidget
(
actionsGroup
);
QHBoxLayo
ut
*
moveToHBox
=
new
QHBoxLayout
();
a
ut
o
*
moveToHBox
=
new
QHBoxLayout
();
moveToHBox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
moveToHBox
->
setSpacing
(
6
);
...
...
@@ -233,7 +233,7 @@ void CollectionExpiryWidget::save(const CollectionExpirySettings &collectionExpi
attribute
->
setExpireAction
(
collectionExpirySettings
.
mExpireAction
);
if
(
saveSettings
)
{
CollectionExpiryJob
*
job
=
new
CollectionExpiryJob
;
auto
*
job
=
new
CollectionExpiryJob
;
job
->
setExpireNow
(
expireNow
);
job
->
setCollection
(
collection
);
job
->
start
();
...
...
src/collectionpage/collectiongeneralpage.cpp
View file @
8a857804
...
...
@@ -58,12 +58,12 @@ void CollectionGeneralPage::init(const Akonadi::Collection &collection)
mIsResourceFolder
=
(
collection
.
parentCollection
()
==
Akonadi
::
Collection
::
root
());
QLabel
*
label
=
nullptr
;
QVBoxLayo
ut
*
topLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
topLayout
=
new
QVBoxLayout
(
this
);
// Musn't be able to edit details for a non-resource, system folder.
if
((
!
mIsLocalSystemFolder
||
mIsResourceFolder
)
&&
!
mFolderCollection
->
isReadOnly
())
{
QHBoxLayo
ut
*
hl
=
new
QHBoxLayout
();
a
ut
o
*
hl
=
new
QHBoxLayout
();
topLayout
->
addItem
(
hl
);
label
=
new
QLabel
(
i18nc
(
"@label:textbox Name of the folder."
,
"&Name:"
),
this
);
hl
->
addWidget
(
label
);
...
...
@@ -84,7 +84,7 @@ void CollectionGeneralPage::init(const Akonadi::Collection &collection)
if
(
CommonKernel
->
imapResourceManager
()
->
hasAnnotationSupport
(
collectionResource
))
{
PimCommon
::
CollectionTypeUtil
::
FolderContentsType
contentsType
=
PimCommon
::
CollectionTypeUtil
::
ContentsTypeMail
;
const
PimCommon
::
CollectionAnnotationsAttribute
*
annotationAttribute
const
auto
*
annotationAttribute
=
collection
.
attribute
<
PimCommon
::
CollectionAnnotationsAttribute
>
();
const
QMap
<
QByteArray
,
QByteArray
>
annotations
...
...
@@ -101,7 +101,7 @@ void CollectionGeneralPage::init(const Akonadi::Collection &collection)
const
PimCommon
::
CollectionTypeUtil
::
FolderContentsType
folderType
=
collectionUtil
.
typeFromKolabName
(
annotations
.
value
(
PimCommon
::
CollectionTypeUtil
::
kolabFolderType
()));
int
row
=
0
;
QGridLayo
ut
*
gl
=
new
QGridLayout
();
a
ut
o
*
gl
=
new
QGridLayout
();
topLayout
->
addItem
(
gl
);
mContentsComboBox
=
new
PimCommon
::
ContentTypeWidget
(
this
);
gl
->
addWidget
(
mContentsComboBox
,
row
,
0
,
1
,
2
);
...
...
@@ -154,7 +154,7 @@ void CollectionGeneralPage::load(const Akonadi::Collection &collection)
}
if
(
mContentsComboBox
)
{
const
PimCommon
::
CollectionAnnotationsAttribute
*
annotationsAttribute
const
auto
*
annotationsAttribute
=
collection
.
attribute
<
PimCommon
::
CollectionAnnotationsAttribute
>
();
if
(
annotationsAttribute
)
{
...
...
@@ -196,7 +196,7 @@ void CollectionGeneralPage::save(Collection &collection)
}
mCollectionGeneralWidget
->
save
(
collection
);
PimCommon
::
CollectionAnnotationsAttribute
*
annotationsAttribute
auto
*
annotationsAttribute
=
collection
.
attribute
<
PimCommon
::
CollectionAnnotationsAttribute
>
(
Collection
::
AddIfMissing
);
QMap
<
QByteArray
,
QByteArray
>
annotations
=
annotationsAttribute
->
annotations
();
...
...
@@ -218,7 +218,7 @@ void CollectionGeneralPage::save(Collection &collection)
const
QByteArray
kolabName
=
collectionUtil
.
kolabNameFromType
(
type
);
if
(
!
kolabName
.
isEmpty
())
{
const
QString
iconName
=
collectionUtil
.
iconNameFromContentsType
(
type
);
Akonadi
::
EntityDisplayAttrib
ut
e
*
attribute
a
ut
o
*
attribute
=
collection
.
attribute
<
Akonadi
::
EntityDisplayAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
attribute
->
setIconName
(
iconName
);
new
Akonadi
::
CollectionModifyJob
(
collection
);
...
...
src/collectionpage/collectiongeneralwidget.cpp
View file @
8a857804
...
...
@@ -20,11 +20,11 @@ using namespace MailCommon;
CollectionGeneralWidget
::
CollectionGeneralWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
QVBoxLayo
ut
*
topLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
topLayout
=
new
QVBoxLayout
(
this
);
topLayout
->
setObjectName
(
QStringLiteral
(
"topLayout"
));
topLayout
->
setContentsMargins
({});
// should new mail in this folder be ignored?
QHBoxLayo
ut
*
hbl
=
new
QHBoxLayout
();
a
ut
o
*
hbl
=
new
QHBoxLayout
();
topLayout
->
addItem
(
hbl
);
mNotifyOnNewMailCheckBox
=
new
QCheckBox
(
i18n
(
"Act on new/unread mail in this folder"
),
this
);
...
...
@@ -65,7 +65,7 @@ CollectionGeneralWidget::CollectionGeneralWidget(QWidget *parent)
addLine
(
this
,
topLayout
);
// use grid layout for the following combobox settings
QGridLayo
ut
*
gl
=
new
QGridLayout
();
a
ut
o
*
gl
=
new
QGridLayout
();
topLayout
->
addItem
(
gl
);
gl
->
setColumnStretch
(
1
,
100
);
// make the second column use all available space
int
row
=
-
1
;
...
...
@@ -118,7 +118,7 @@ void CollectionGeneralWidget::save(Akonadi::Collection &collection)
mFolderCollection
=
FolderSettings
::
forCollection
(
collection
);
}
if
(
!
mNotifyOnNewMailCheckBox
->
isChecked
())
{
Akonadi
::
NewMailNotifierAttrib
ut
e
*
newMailNotifierAttr
=
collection
.
attribute
<
Akonadi
::
NewMailNotifierAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
a
ut
o
*
newMailNotifierAttr
=
collection
.
attribute
<
Akonadi
::
NewMailNotifierAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
newMailNotifierAttr
->
setIgnoreNewMail
(
true
);
}
else
{
collection
.
removeAttribute
<
Akonadi
::
NewMailNotifierAttribute
>
();
...
...
src/collectionpage/collectiontemplateswidget.cpp
View file @
8a857804
...
...
@@ -18,8 +18,8 @@ using namespace MailCommon;
CollectionTemplatesWidget
::
CollectionTemplatesWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
QVBoxLayo
ut
*
topLayout
=
new
QVBoxLayout
(
this
);
QHBoxLayo
ut
*
topItems
=
new
QHBoxLayout
;
a
ut
o
*
topLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
topItems
=
new
QHBoxLayout
;
topItems
->
setContentsMargins
(
0
,
0
,
0
,
0
);
topLayout
->
addLayout
(
topItems
);
...
...
@@ -38,7 +38,7 @@ CollectionTemplatesWidget::CollectionTemplatesWidget(QWidget *parent)
topLayout
->
addWidget
(
mWidget
);
QHBoxLayo
ut
*
btns
=
new
QHBoxLayout
();
a
ut
o
*
btns
=
new
QHBoxLayout
();
QPushButton
*
copyGlobal
=
new
QPushButton
(
i18n
(
"&Copy Global Templates"
),
this
);
copyGlobal
->
setEnabled
(
false
);
btns
->
addWidget
(
copyGlobal
);
...
...
src/collectionpage/collectionviewwidget.cpp
View file @
8a857804
...
...
@@ -26,7 +26,7 @@ using namespace MailCommon;
CollectionViewWidget
::
CollectionViewWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
{
QVBoxLayo
ut
*
topLayout
=
new
QVBoxLayout
(
this
);
a
ut
o
*
topLayout
=
new
QVBoxLayout
(
this
);
topLayout
->
setObjectName
(
QStringLiteral
(
"topLayout"
));
topLayout
->
setContentsMargins
({});
...
...
@@ -41,14 +41,14 @@ CollectionViewWidget::CollectionViewWidget(QWidget *parent)
mShowSenderReceiverComboBox
->
insertItem
(
1
,
i18nc
(
"@item:inlistbox Show sender."
,
"Sender"
));
mShowSenderReceiverComboBox
->
insertItem
(
2
,
i18nc
(
"@item:inlistbox Show receiver."
,
"Receiver"
));
QHBoxLayo
ut
*
senderReceiverColumnHLayout
=
new
QHBoxLayout
();
a
ut
o
*
senderReceiverColumnHLayout
=
new
QHBoxLayout
();
senderReceiverColumnHLayout
->
addWidget
(
senderReceiverColumnLabel
);
senderReceiverColumnHLayout
->
addWidget
(
mShowSenderReceiverComboBox
);
topLayout
->
addLayout
(
senderReceiverColumnHLayout
);
// message list
QGroupBox
*
messageListGroup
=
new
QGroupBox
(
i18n
(
"Message List"
),
this
);
QVBoxLayo
ut
*
messageListGroupLayout
=
new
QVBoxLayout
(
messageListGroup
);
a
ut
o
*
messageListGroupLayout
=
new
QVBoxLayout
(
messageListGroup
);
topLayout
->
addWidget
(
messageListGroup
);
// message list aggregation
...
...
@@ -62,11 +62,11 @@ CollectionViewWidget::CollectionViewWidget(QWidget *parent)
aggregationLabel
->
setBuddy
(
mAggregationComboBox
);
using
MessageList
::
Utils
::
AggregationConfigButton
;
AggregationConfigButton
*
aggregationConfigButton
=
new
AggregationConfigButton
(
messageListGroup
,
mAggregationComboBox
);
auto
*
aggregationConfigButton
=
new
AggregationConfigButton
(
messageListGroup
,
mAggregationComboBox
);
// Make sure any changes made in the aggregations configure dialog are reflected in the combo.
connect
(
aggregationConfigButton
,
&
AggregationConfigButton
::
configureDialogCompleted
,
this
,
&
CollectionViewWidget
::
slotSelectFolderAggregation
);
QHBoxLayo
ut
*
aggregationLayout
=
new
QHBoxLayout
();
a
ut
o
*
aggregationLayout
=
new
QHBoxLayout
();
aggregationLayout
->
addWidget
(
aggregationLabel
,
1
);
aggregationLayout
->
addWidget
(
mAggregationComboBox
,
1
);
aggregationLayout
->
addWidget
(
aggregationConfigButton
,
0
);
...
...
@@ -83,11 +83,11 @@ CollectionViewWidget::CollectionViewWidget(QWidget *parent)
themeLabel
->
setBuddy
(
mThemeComboBox
);
using
MessageList
::
Utils
::
ThemeConfigButton
;
ThemeConfigBut
to
n
*
themeConfigButton
=
new
ThemeConfigButton
(
messageListGroup
,
mThemeComboBox
);
au
to
*
themeConfigButton
=
new
ThemeConfigButton
(
messageListGroup
,
mThemeComboBox
);
// Make sure any changes made in the themes configure dialog are reflected in the combo.
connect
(
themeConfigButton
,
&
ThemeConfigButton
::
configureDialogCompleted
,
this
,
&
CollectionViewWidget
::
slotSelectFolderTheme
);
QHBoxLayo
ut
*
themeLayout
=
new
QHBoxLayout
();
a
ut
o
*
themeLayout
=
new
QHBoxLayout
();
themeLayout
->
addWidget
(
themeLabel
,
1
);
themeLayout
->
addWidget
(
mThemeComboBox
,
1
);
themeLayout
->
addWidget
(
themeConfigButton
,
0
);
...
...
@@ -95,7 +95,7 @@ CollectionViewWidget::CollectionViewWidget(QWidget *parent)
// Message Default Format
QGroupBox
*
messageFormatGroup
=
new
QGroupBox
(
i18n
(
"Message Default Format"
),
this
);
QVBoxLayo
ut
*
messageFormatGroupLayout
=
new
QVBoxLayout
(
messageFormatGroup
);
a
ut
o
*
messageFormatGroupLayout
=
new
QVBoxLayout
(
messageFormatGroup
);
mPreferHtmlToText
=
new
QRadioButton
(
i18n
(
"Prefer HTML to text"
),
this
);
messageFormatGroupLayout
->
addWidget
(
mPreferHtmlToText
);
mPreferTextToHtml
=
new
QRadioButton
(
i18n
(
"Prefer text to HTML"
),
this
);
...
...
@@ -158,10 +158,10 @@ void CollectionViewWidget::save(Akonadi::Collection &col)
const
int
currentIndex
=
mShowSenderReceiverComboBox
->
currentIndex
();
if
(
mShowSenderReceiverValue
!=
currentIndex
)
{
if
(
currentIndex
==
1
)
{
Akonadi
::
MessageFolderAttrib
ut
e
*
messageFolder
=
col
.
attribute
<
Akonadi
::
MessageFolderAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
a
ut
o
*
messageFolder
=
col
.
attribute
<
Akonadi
::
MessageFolderAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
messageFolder
->
setOutboundFolder
(
false
);
}
else
if
(
currentIndex
==
2
)
{
Akonadi
::
MessageFolderAttrib
ut
e
*
messageFolder
=
col
.
attribute
<
Akonadi
::
MessageFolderAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
a
ut
o
*
messageFolder
=
col
.
attribute
<
Akonadi
::
MessageFolderAttribute
>
(
Akonadi
::
Collection
::
AddIfMissing
);
messageFolder
->
setOutboundFolder
(
true
);
}
else
{
col
.
removeAttribute
<
Akonadi
::
MessageFolderAttribute
>
();
...
...
src/filter/autotests/filteractionaddheadertest.cpp
View file @
8a857804
...
...
@@ -30,9 +30,9 @@ void FilterActionAddHeaderTest::shouldCreateWidget()
auto
comboBox
=
widget
->
findChild
<
QComboBox
*>
(
QStringLiteral
(
"combo"
));
QVERIFY
(
comboBox
);
QVERIFY
(
comboBox
->
isEditable
());
QLabel
*
label
=
widget
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"label_value"
));
auto
*
label
=
widget
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"label_value"
));
QVERIFY
(
label
);
KLineEdit
*
lineEdit
=
widget
->
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"ledit"
));
auto
*
lineEdit
=
widget
->
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"ledit"
));
QVERIFY
(
lineEdit
);
QVERIFY
(
lineEdit
->
text
().
isEmpty
());
}
...
...
@@ -52,7 +52,7 @@ void FilterActionAddHeaderTest::shouldClearWidget()
MailCommon
::
FilterActionAddHeader
filter
;
QWidget
*
widget
=
filter
.
createParamWidget
(
nullptr
);
auto
comboBox
=
widget
->
findChild
<
QComboBox
*>
(
QStringLiteral
(
"combo"
));
KLineEdit
*
lineEdit
=
widget
->
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"ledit"
));
auto
*
lineEdit
=
widget
->
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"ledit"
));
comboBox
->
lineEdit
()
->
setText
(
QStringLiteral
(
"test"
));
lineEdit
->
setText
(
QStringLiteral
(
"blo"
));
filter
.
clearParamWidget
(
widget
);
...
...
@@ -188,7 +188,7 @@ void FilterActionAddHeaderTest::shouldAddValue()
filter
.
argsFromString
(
argsinput
);
filter
.
setParamWidgetValue
(
widget
);
auto
comboBox
=
widget
->
findChild
<
QComboBox
*>
(
QStringLiteral
(
"combo"
));
KLineEdit
*
lineEdit
=
widget
->
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"ledit"
));
auto
*
lineEdit
=
widget
->
findChild
<
KLineEdit
*>
(
QStringLiteral
(
"ledit"
));
QCOMPARE
(
comboBox
->
lineEdit
()
->
text
(),
resultheader
);
QCOMPARE
(
lineEdit
->
text
(),
resultvalue
);
}
...
...
src/filter/autotests/filteractionaddtoaddressbooktest.cpp
View file @
8a857804
...
...
@@ -31,7 +31,7 @@ void FilterActionAddToAddressBookTest::shouldHaveDefaultValue()
auto
headerCombo
=
w
->
findChild
<
QComboBox
*>
(
QStringLiteral
(
"HeaderComboBox"
));
QVERIFY
(
headerCombo
);
QLabel
*
label
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"label_with_category"
));
auto
*
label
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"label_with_category"
));
QVERIFY
(
label
);
auto
categoryEdit
=
w
->
findChild
<
Akonadi
::
TagWidget
*>
(
QStringLiteral
(
"CategoryEdit"
));
...
...
@@ -40,7 +40,7 @@ void FilterActionAddToAddressBookTest::shouldHaveDefaultValue()
label
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"label_in_addressbook"
));
QVERIFY
(
label
);
Akonadi
::
CollectionComboBox
*
collectionComboBox
=
w
->
findChild
<
Akonadi
::
CollectionComboBox
*>
(
QStringLiteral
(
"AddressBookComboBox"
));
auto
*
collectionComboBox
=
w
->
findChild
<
Akonadi
::
CollectionComboBox
*>
(
QStringLiteral
(
"AddressBookComboBox"
));
QVERIFY
(
collectionComboBox
);
}
...
...
src/filter/autotests/filteractiondeletetest.cpp
View file @
8a857804
...
...
@@ -23,7 +23,7 @@ void FilterActionDeleteTest::shouldHaveDefaultValue()
QWidget
*
w
=
filter
.
createParamWidget
(
nullptr
);
QVERIFY
(
w
);
QLabel
*
lab
=
dynamic_cast
<
QLabel
*>
(
w
);
auto
*
lab
=
dynamic_cast
<
QLabel
*>
(
w
);
QVERIFY
(
lab
);
QCOMPARE
(
lab
->
objectName
(),
QStringLiteral
(
"label_delete"
));
}
...
...
src/filter/autotests/filteractionexectest.cpp
View file @
8a857804
...
...
@@ -24,10 +24,10 @@ void FilterActionExecTest::shouldHaveDefaultValue()
{
MailCommon
::
FilterActionExec
filter
;
QWidget
*
w
=
filter
.
createParamWidget
(
nullptr
);
KUrlRequester
*
requester
=
w
->
findChild
<
KUrlRequester
*>
(
QStringLiteral
(
"requester"
));
auto
*
requester
=
w
->
findChild
<
KUrlRequester
*>
(
QStringLiteral
(
"requester"
));
QVERIFY
(
requester
);
MailCommon
::
FilterActionWithUrlHelpButton
*
helpButton
=
w
->
findChild
<
MailCommon
::
FilterActionWithUrlHelpButton
*>
(
QStringLiteral
(
"helpbutton"
));
auto
*
helpButton
=
w
->
findChild
<
MailCommon
::
FilterActionWithUrlHelpButton
*>
(
QStringLiteral
(
"helpbutton"
));
QVERIFY
(
helpButton
);
}
...
...
src/filter/autotests/filteractionmissingaccountdialogtest.cpp
View file @
8a857804
...
...
@@ -28,14 +28,14 @@ void FilterActionMissingAccountDialogTest::shouldHaveDefaultValue()
QVERIFY
(
!
dlg
.
windowTitle
().
isEmpty
());
QVERIFY
(
dlg
.
isModal
());
QDialogButtonBox
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QLabel
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
auto
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
MailCommon
::
KMFilterAccountList
*
mAccountList
=
dlg
.
findChild
<
MailCommon
::
KMFilterAccountList
*>
(
QStringLiteral
(
"accountlist"
));
auto
*
mAccountList
=
dlg
.
findChild
<
MailCommon
::
KMFilterAccountList
*>
(
QStringLiteral
(
"accountlist"
));
QVERIFY
(
mAccountList
);
}
...
...
src/filter/autotests/filteractionmissingidentitydialogtest.cpp
View file @
8a857804
...
...
@@ -26,7 +26,7 @@ FilterActionMissingIdentityDialogTest::~FilterActionMissingIdentityDialogTest()
void
FilterActionMissingIdentityDialogTest
::
initTestCase
()
{
DummyKernel
*
kernel
=
new
DummyKernel
(
nullptr
);
auto
*
kernel
=
new
DummyKernel
(
nullptr
);
CommonKernel
->
registerKernelIf
(
kernel
);
//register KernelIf early, it is used by the Filter classes
CommonKernel
->
registerSettingsIf
(
kernel
);
//SettingsIf is used in FolderTreeWidget
}
...
...
@@ -37,14 +37,14 @@ void FilterActionMissingIdentityDialogTest::shouldHaveDefaultValue()
QVERIFY
(
dlg
.
isModal
());
QVERIFY
(
!
dlg
.
windowTitle
().
isEmpty
());
QLabel
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
auto
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
KIdentityManagement
::
IdentityComb
o
*
mComboBoxIdentity
=
dlg
.
findChild
<
KIdentityManagement
::
IdentityCombo
*>
(
QStringLiteral
(
"comboboxidentity"
));
aut
o
*
mComboBoxIdentity
=
dlg
.
findChild
<
KIdentityManagement
::
IdentityCombo
*>
(
QStringLiteral
(
"comboboxidentity"
));
QVERIFY
(
mComboBoxIdentity
);
QDialogButtonBox
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
}
...
...
src/filter/autotests/filteractionmissingsoundurldialogtest.cpp
View file @
8a857804
...
...
@@ -27,10 +27,10 @@ void FilterActionMissingSoundUrlDialogTest::shouldHaveDefaultValue()
MailCommon
::
FilterActionMissingSoundUrlDialog
dlg
(
QStringLiteral
(
"filename"
),
QStringLiteral
(
"arg"
));
QVERIFY
(
!
dlg
.
windowTitle
().
isEmpty
());
QDialogButtonBox
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QLabel
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"oldlabel"
));
auto
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"oldlabel"
));
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
...
...
@@ -38,7 +38,7 @@ void FilterActionMissingSoundUrlDialogTest::shouldHaveDefaultValue()
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
KUrlRequester
*
mUrlWidget
=
dlg
.
findChild
<
KUrlRequester
*>
(
QStringLiteral
(
"urlwidget"
));
auto
*
mUrlWidget
=
dlg
.
findChild
<
KUrlRequester
*>
(
QStringLiteral
(
"urlwidget"
));
QVERIFY
(
mUrlWidget
);
}
...
...
src/filter/autotests/filteractionmissingtagdialogtest.cpp
View file @
8a857804
...
...
@@ -30,7 +30,7 @@ void FilterActionMissingTagDialogTest::shouldHaveDefaultValue()
QVERIFY
(
dlg
.
isModal
());
QVERIFY
(
!
dlg
.
windowTitle
().
isEmpty
());
QLabel
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"tagnamelabel"
));
auto
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"tagnamelabel"
));
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
...
...
@@ -38,13 +38,13 @@ void FilterActionMissingTagDialogTest::shouldHaveDefaultValue()
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
QListWidget
*
mTagList
=
dlg
.
findChild
<
QListWidget
*>
(
QStringLiteral
(
"taglist"
));
auto
*
mTagList
=
dlg
.
findChild
<
QListWidget
*>
(
QStringLiteral
(
"taglist"
));
QVERIFY
(
mTagList
);
QDialogButtonBox
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QPushBut
to
n
*
user1Button
=
dlg
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"addtag"
));
au
to
*
user1Button
=
dlg
.
findChild
<
QPushButton
*>
(
QStringLiteral
(
"addtag"
));
QVERIFY
(
user1Button
);
QVERIFY
(
!
user1Button
->
text
().
isEmpty
());
}
...
...
src/filter/autotests/filteractionmissingtemplatedialogtest.cpp
View file @
8a857804
...
...
@@ -27,14 +27,14 @@ void FilterActionMissingTemplateDialogTest::shouldHaveDefaultValue()
MailCommon
::
FilterActionMissingTemplateDialog
dlg
(
QStringList
(),
QStringLiteral
(
"filename"
));
QVERIFY
(
!
dlg
.
windowTitle
().
isEmpty
());
QDialogButtonBox
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
auto
*
buttonBox
=
dlg
.
findChild
<
QDialogButtonBox
*>
(
QStringLiteral
(
"buttonbox"
));
QVERIFY
(
buttonBox
);
QLabel
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
auto
*
label
=
dlg
.
findChild
<
QLabel
*>
(
QStringLiteral
(
"label"
));
QVERIFY
(
label
);
QVERIFY
(
!
label
->
text
().
isEmpty
());
QComboBox
*
mComboBoxTemplate
=
dlg
.
findChild
<
QComboBox
*>
(
QStringLiteral
(
"comboboxtemplate"
));
auto
*
mComboBoxTemplate
=
dlg
.
findChild
<
QComboBox
*>
(
QStringLiteral
(
"comboboxtemplate"
));
QVERIFY
(
mComboBoxTemplate
);
}
...
...
src/filter/autotests/filteractionmissingtransportdialogtest.cpp