Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KMail
Commits
797ae67f
Commit
797ae67f
authored
Jan 24, 2021
by
Laurent Montel
😁
Browse files
Modernize code
parent
952309e8
Pipeline
#48555
failed with stage
in 17 minutes and 54 seconds
Changes
66
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/archivemailagent/addarchivemaildialog.cpp
View file @
797ae67f
...
...
@@ -56,7 +56,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mainLayout
->
addWidget
(
mFolderRequester
,
row
,
1
);
++
row
;
QLabel
*
formatLabel
=
new
QLabel
(
i18n
(
"Format:"
),
this
);
auto
formatLabel
=
new
QLabel
(
i18n
(
"Format:"
),
this
);
formatLabel
->
setObjectName
(
QStringLiteral
(
"label_format"
));
mainLayout
->
addWidget
(
formatLabel
,
row
,
0
);
...
...
@@ -70,7 +70,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mRecursiveCheckBox
->
setChecked
(
true
);
++
row
;
QLabel
*
pathLabel
=
new
QLabel
(
i18n
(
"Path:"
),
this
);
auto
pathLabel
=
new
QLabel
(
i18n
(
"Path:"
),
this
);
mainLayout
->
addWidget
(
pathLabel
,
row
,
0
);
pathLabel
->
setObjectName
(
QStringLiteral
(
"path_label"
));
mPath
=
new
KUrlRequester
(
this
);
...
...
@@ -80,7 +80,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mainLayout
->
addWidget
(
mPath
);
++
row
;
QLabel
*
dateLabel
=
new
QLabel
(
i18n
(
"Backup each:"
),
this
);
auto
dateLabel
=
new
QLabel
(
i18n
(
"Backup each:"
),
this
);
dateLabel
->
setObjectName
(
QStringLiteral
(
"date_label"
));
mainLayout
->
addWidget
(
dateLabel
,
row
,
0
);
...
...
@@ -96,7 +96,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mainLayout
->
addLayout
(
hlayout
,
row
,
1
);
++
row
;
QLabel
*
maxCountlabel
=
new
QLabel
(
i18n
(
"Maximum number of archive:"
),
this
);
auto
maxCountlabel
=
new
QLabel
(
i18n
(
"Maximum number of archive:"
),
this
);
mainLayout
->
addWidget
(
maxCountlabel
,
row
,
0
);
mMaximumArchive
=
new
QSpinBox
(
this
);
mMaximumArchive
->
setMinimum
(
0
);
...
...
agents/archivemailagent/archivemailkernel.cpp
View file @
797ae67f
...
...
@@ -19,7 +19,7 @@ ArchiveMailKernel::ArchiveMailKernel(QObject *parent)
:
QObject
(
parent
)
{
mIdentityManager
=
new
KIdentityManagement
::
IdentityManager
(
true
,
this
);
Akonadi
::
Session
*
session
=
new
Akonadi
::
Session
(
"Archive Mail Kernel ETM"
,
this
);
auto
session
=
new
Akonadi
::
Session
(
"Archive Mail Kernel ETM"
,
this
);
mFolderCollectionMonitor
=
new
MailCommon
::
FolderCollectionMonitor
(
session
,
this
);
mFolderCollectionMonitor
->
monitor
()
->
setChangeRecordingEnabled
(
false
);
...
...
agents/archivemailagent/archivemailmanager.cpp
View file @
797ae67f
...
...
@@ -57,7 +57,7 @@ void ArchiveMailManager::load()
if
(
info
)
{
//Store task started
mListArchiveInfo
.
append
(
info
);
ScheduledArchiveTask
*
task
=
new
ScheduledArchiveTask
(
this
,
info
,
Akonadi
::
Collection
(
info
->
saveCollectionId
()),
/*immediate*/
false
);
auto
task
=
new
ScheduledArchiveTask
(
this
,
info
,
Akonadi
::
Collection
(
info
->
saveCollectionId
()),
/*immediate*/
false
);
mArchiveMailKernel
->
jobScheduler
()
->
registerTask
(
task
);
}
}
else
{
...
...
@@ -184,6 +184,6 @@ void ArchiveMailManager::archiveFolder(const QString &path, Akonadi::Collection:
info
->
setSaveCollectionId
(
collectionId
);
info
->
setUrl
(
QUrl
::
fromLocalFile
(
path
));
mListArchiveInfo
.
append
(
info
);
ScheduledArchiveTask
*
task
=
new
ScheduledArchiveTask
(
this
,
info
,
Akonadi
::
Collection
(
info
->
saveCollectionId
()),
true
/*immediat*/
);
auto
task
=
new
ScheduledArchiveTask
(
this
,
info
,
Akonadi
::
Collection
(
info
->
saveCollectionId
()),
true
/*immediat*/
);
mArchiveMailKernel
->
jobScheduler
()
->
registerTask
(
task
);
}
agents/archivemailagent/archivemailwidget.cpp
View file @
797ae67f
...
...
@@ -61,7 +61,7 @@ ArchiveMailWidget::ArchiveMailWidget(const KSharedConfigPtr &config, QWidget *pa
CommonKernel
->
registerKernelIf
(
archiveMailKernel
);
//register KernelIf early, it is used by the Filter classes
CommonKernel
->
registerSettingsIf
(
archiveMailKernel
);
//SettingsIf is used in FolderTreeWidget
QWidget
*
w
=
new
QWidget
(
parent
);
auto
w
=
new
QWidget
(
parent
);
mWidget
.
setupUi
(
w
);
parent
->
layout
()
->
addWidget
(
w
);
...
...
agents/followupreminderagent/followupremindernoanswerdialog.cpp
View file @
797ae67f
...
...
@@ -36,7 +36,7 @@ FollowUpReminderNoAnswerDialog::FollowUpReminderNoAnswerDialog(QWidget *parent)
auto
mainLayout
=
new
QVBoxLayout
(
this
);
QLabel
*
lab
=
new
QLabel
(
i18n
(
"You still wait an answer about this mail:"
),
this
);
auto
lab
=
new
QLabel
(
i18n
(
"You still wait an answer about this mail:"
),
this
);
mainLayout
->
addWidget
(
lab
);
mWidget
=
new
FollowUpReminderInfoWidget
(
this
);
mWidget
->
setObjectName
(
QStringLiteral
(
"FollowUpReminderInfoWidget"
));
...
...
@@ -54,7 +54,7 @@ FollowUpReminderNoAnswerDialog::FollowUpReminderNoAnswerDialog(QWidget *parent)
readConfig
();
QDBusConnection
dbusConn
=
QDBusConnection
::
sessionBus
();
if
(
dbusConn
.
interface
()
->
isServiceRegistered
(
QString
::
fromLatin1
(
s_fdo_notifications_service
)))
{
OrgFreedesktopDBusPropertiesInterface
*
propsIface
=
new
OrgFreedesktopDBusPropertiesInterface
(
auto
propsIface
=
new
OrgFreedesktopDBusPropertiesInterface
(
QString
::
fromLatin1
(
s_fdo_notifications_service
),
QString
::
fromLatin1
(
s_fdo_notifications_path
),
dbusConn
,
this
);
...
...
agents/mailfilteragent/dummykernel.cpp
View file @
797ae67f
...
...
@@ -14,7 +14,7 @@ DummyKernel::DummyKernel(QObject *parent)
{
mMessageSender
=
new
MessageComposer
::
AkonadiSender
(
this
);
mIdentityManager
=
new
KIdentityManagement
::
IdentityManager
(
true
,
this
);
Akonadi
::
Session
*
session
=
new
Akonadi
::
Session
(
"MailFilter Kernel ETM"
,
this
);
auto
session
=
new
Akonadi
::
Session
(
"MailFilter Kernel ETM"
,
this
);
mFolderCollectionMonitor
=
new
MailCommon
::
FolderCollectionMonitor
(
session
,
this
);
...
...
agents/mailfilteragent/filterlogdialog.cpp
View file @
797ae67f
...
...
@@ -54,7 +54,7 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
buttonBox
->
button
(
QDialogButtonBox
::
Close
)
->
setDefault
(
true
);
KGuiItem
::
assign
(
mUser1Button
,
KStandardGuiItem
::
clear
());
KGuiItem
::
assign
(
mUser2Button
,
KStandardGuiItem
::
saveAs
());
QFrame
*
page
=
new
QFrame
(
this
);
auto
page
=
new
QFrame
(
this
);
auto
pageVBoxLayout
=
new
QVBoxLayout
;
page
->
setLayout
(
pageVBoxLayout
);
...
...
@@ -74,7 +74,7 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
}
auto
purposeMenu
=
new
MailfilterPurposeMenuWidget
(
this
,
this
);
QPushButton
*
mShareButton
=
new
QPushButton
(
i18n
(
"Share..."
),
this
);
auto
mShareButton
=
new
QPushButton
(
i18n
(
"Share..."
),
this
);
mShareButton
->
setMenu
(
purposeMenu
->
menu
());
mShareButton
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"document-share"
)));
purposeMenu
->
setEditorWidget
(
mTextEdit
->
editor
());
...
...
@@ -133,12 +133,12 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
//QWhatsThis::add( mLogFilterActionBox,
// i18n( "" ) );
QWidget
*
hbox
=
new
QWidget
(
page
);
auto
hbox
=
new
QWidget
(
page
);
auto
hboxHBoxLayout
=
new
QHBoxLayout
;
hbox
->
setLayout
(
hboxHBoxLayout
);
hboxHBoxLayout
->
setContentsMargins
({});
pageVBoxLayout
->
addWidget
(
hbox
);
QLabel
*
logSizeLab
=
new
QLabel
(
i18n
(
"Log size limit:"
),
hbox
);
auto
logSizeLab
=
new
QLabel
(
i18n
(
"Log size limit:"
),
hbox
);
hboxHBoxLayout
->
addWidget
(
logSizeLab
);
mLogMemLimitSpin
=
new
QSpinBox
(
hbox
);
hboxHBoxLayout
->
addWidget
(
mLogMemLimitSpin
);
...
...
agents/mailfilteragent/filtermanager.cpp
View file @
797ae67f
...
...
@@ -208,7 +208,7 @@ void FilterManager::Private::modifyJobResult(KJob *job)
void
FilterManager
::
Private
::
showNotification
(
const
QString
&
errorMsg
,
const
QString
&
jobErrorString
)
{
KNotification
*
notify
=
new
KNotification
(
QStringLiteral
(
"mailfilterjoberror"
));
auto
notify
=
new
KNotification
(
QStringLiteral
(
"mailfilterjoberror"
));
notify
->
setComponentName
(
QStringLiteral
(
"akonadi_mailfilter_agent"
));
notify
->
setIconName
(
QStringLiteral
(
"view-filter"
));
notify
->
setText
(
errorMsg
+
QLatin1Char
(
'\n'
)
+
jobErrorString
);
...
...
@@ -453,7 +453,7 @@ bool FilterManager::processContextItem(ItemContext context)
}
else
{
if
(
context
.
moveTargetCollection
().
isValid
()
&&
context
.
item
().
storageCollectionId
()
!=
context
.
moveTargetCollection
().
id
())
{
if
(
itemCanDelete
)
{
Akonadi
::
ItemMoveJob
*
moveJob
=
new
Akonadi
::
ItemMoveJob
(
context
.
item
(),
context
.
moveTargetCollection
(),
this
);
auto
moveJob
=
new
Akonadi
::
ItemMoveJob
(
context
.
item
(),
context
.
moveTargetCollection
(),
this
);
connect
(
moveJob
,
&
Akonadi
::
ItemMoveJob
::
result
,
this
,
[
this
](
KJob
*
job
)
{
d
->
moveJobResult
(
job
);
});
...
...
agents/mailfilteragent/mailfilteragent.cpp
View file @
797ae67f
...
...
@@ -96,7 +96,7 @@ MailFilterAgent::MailFilterAgent(const QString &id)
if
(
config
->
hasGroup
(
"FilterLog"
))
{
KConfigGroup
group
(
config
,
"FilterLog"
);
if
(
group
.
readEntry
(
"Enabled"
,
false
))
{
KNotification
*
notify
=
new
KNotification
(
QStringLiteral
(
"mailfilterlogenabled"
));
auto
notify
=
new
KNotification
(
QStringLiteral
(
"mailfilterlogenabled"
));
notify
->
setComponentName
(
QApplication
::
applicationDisplayName
());
notify
->
setIconName
(
QStringLiteral
(
"view-filter"
));
notify
->
setText
(
i18nc
(
"Notification when the filter log was enabled"
,
"Mail Filter Log Enabled"
));
...
...
@@ -136,7 +136,7 @@ void MailFilterAgent::initializeCollections()
{
m_filterManager
->
readConfig
();
Akonadi
::
CollectionFetchJob
*
job
=
new
Akonadi
::
CollectionFetchJob
(
Akonadi
::
Collection
::
root
(),
auto
job
=
new
Akonadi
::
CollectionFetchJob
(
Akonadi
::
Collection
::
root
(),
Akonadi
::
CollectionFetchJob
::
Recursive
,
this
);
job
->
fetchScope
().
setContentMimeTypes
({
KMime
::
Message
::
mimeType
()
});
...
...
agents/sendlateragent/sendlaterremovemessagejob.cpp
View file @
797ae67f
...
...
@@ -25,7 +25,7 @@ void SendLaterRemoveMessageJob::start()
void
SendLaterRemoveMessageJob
::
deleteItem
()
{
if
(
mIndex
<
mListItems
.
count
())
{
Akonadi
::
ItemDeleteJob
*
job
=
new
Akonadi
::
ItemDeleteJob
(
Akonadi
::
Item
(
mListItems
.
at
(
mIndex
)),
this
);
auto
job
=
new
Akonadi
::
ItemDeleteJob
(
Akonadi
::
Item
(
mListItems
.
at
(
mIndex
)),
this
);
connect
(
job
,
&
Akonadi
::
ItemDeleteJob
::
result
,
this
,
&
SendLaterRemoveMessageJob
::
slotItemDeleteDone
);
}
else
{
deleteLater
();
...
...
agents/unifiedmailboxagent/mailkernel.cpp
View file @
797ae67f
...
...
@@ -22,7 +22,7 @@ MailKernel::MailKernel(const KSharedConfigPtr &config, QObject *parent)
{
mMessageSender
=
new
MessageComposer
::
AkonadiSender
(
this
);
mIdentityManager
=
new
KIdentityManagement
::
IdentityManager
(
true
,
this
);
Akonadi
::
Session
*
session
=
new
Akonadi
::
Session
(
"UnifiedMailbox Kernel ETM"
,
this
);
auto
session
=
new
Akonadi
::
Session
(
"UnifiedMailbox Kernel ETM"
,
this
);
mFolderCollectionMonitor
=
new
MailCommon
::
FolderCollectionMonitor
(
session
,
this
);
...
...
kmail-refresh-settings/refreshsettingsassistant.cpp
View file @
797ae67f
...
...
@@ -24,7 +24,7 @@ RefreshSettingsAssistant::RefreshSettingsAssistant(QWidget *parent)
resize
(
640
,
480
);
Akonadi
::
ControlGui
::
widgetNeedsAkonadi
(
this
);
initializePages
();
KHelpMenu
*
helpMenu
=
new
KHelpMenu
(
this
,
KAboutData
::
applicationData
(),
true
);
auto
helpMenu
=
new
KHelpMenu
(
this
,
KAboutData
::
applicationData
(),
true
);
//Initialize menu
QMenu
*
menu
=
helpMenu
->
menu
();
helpMenu
->
action
(
KHelpMenu
::
menuAboutApp
)
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"kmail"
)));
...
...
kmail-refresh-settings/refreshsettingscleanuppage.cpp
View file @
797ae67f
...
...
@@ -17,7 +17,7 @@ RefreshSettingsCleanupPage::RefreshSettingsCleanupPage(QWidget *parent)
auto
mainLayout
=
new
QHBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mainLayout
->
setContentsMargins
({});
QPushButton
*
button
=
new
QPushButton
(
i18n
(
"Clean"
),
this
);
auto
button
=
new
QPushButton
(
i18n
(
"Clean"
),
this
);
button
->
setObjectName
(
QStringLiteral
(
"button"
));
mainLayout
->
addWidget
(
button
);
connect
(
button
,
&
QPushButton
::
clicked
,
this
,
&
RefreshSettingsCleanupPage
::
cleanSettings
);
...
...
kmail-refresh-settings/refreshsettingsfirstpage.cpp
View file @
797ae67f
...
...
@@ -15,7 +15,7 @@ RefreshSettingsFirstPage::RefreshSettingsFirstPage(QWidget *parent)
auto
mainLayout
=
new
QHBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mainLayout
->
setContentsMargins
({});
QLabel
*
label
=
new
QLabel
(
i18n
(
"Please close KMail/Kontact before using it."
));
auto
label
=
new
QLabel
(
i18n
(
"Please close KMail/Kontact before using it."
));
QFont
f
=
label
->
font
();
f
.
setBold
(
true
);
f
.
setPointSize
(
22
);
...
...
ktnef/src/attachpropertydialog.cpp
View file @
797ae67f
...
...
@@ -156,7 +156,7 @@ void AttachPropertyDialog::formatProperties(const QMap<int, KTNEFProperty *> &pr
void
AttachPropertyDialog
::
formatPropertySet
(
KTNEFPropertySet
*
pSet
,
QTreeWidget
*
lv
)
{
formatProperties
(
pSet
->
properties
(),
lv
,
nullptr
,
QStringLiteral
(
"prop"
));
QTreeWidgetItem
*
item
auto
*
item
=
new
QTreeWidgetItem
(
lv
,
QStringList
(
i18nc
(
"@label"
,
"TNEF Attributes"
)));
item
->
setExpanded
(
true
);
...
...
ktnef/src/ktnefmain.cpp
View file @
797ae67f
...
...
@@ -500,13 +500,13 @@ void KTNEFMain::slotShowMessageText()
QString
rtf
=
mParser
->
message
()
->
rtfString
();
if
(
!
rtf
.
isEmpty
())
{
QTemporaryFile
*
tmpFile
=
new
QTemporaryFile
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
TempLocation
)
+
QLatin1String
(
"/ktnef/"
)
+
QLatin1String
(
"ktnef_XXXXXX.rtf"
));
auto
tmpFile
=
new
QTemporaryFile
(
QStandardPaths
::
writableLocation
(
QStandardPaths
::
TempLocation
)
+
QLatin1String
(
"/ktnef/"
)
+
QLatin1String
(
"ktnef_XXXXXX.rtf"
));
tmpFile
->
setAutoRemove
(
false
);
tmpFile
->
open
();
tmpFile
->
setPermissions
(
QFile
::
ReadUser
);
tmpFile
->
write
(
rtf
.
toLocal8Bit
());
tmpFile
->
close
();
KIO
::
OpenUrlJob
*
job
=
new
KIO
::
OpenUrlJob
(
QUrl
::
fromLocalFile
(
tmpFile
->
fileName
()),
QStringLiteral
(
"text/rtf"
));
auto
job
=
new
KIO
::
OpenUrlJob
(
QUrl
::
fromLocalFile
(
tmpFile
->
fileName
()),
QStringLiteral
(
"text/rtf"
));
job
->
setUiDelegate
(
new
KIO
::
JobUiDelegate
(
KJobUiDelegate
::
AutoHandlingEnabled
,
this
));
job
->
setDeleteTemporaryFile
(
true
);
job
->
start
();
...
...
ktnef/src/qwmf.cpp
View file @
797ae67f
...
...
@@ -1208,13 +1208,13 @@ QPainter::CompositionMode QWinMetaFile::winToQtComposition(long parm) const
//-----------------------------------------------------------------------------
bool
QWinMetaFile
::
dibToBmp
(
QImage
&
bmp
,
const
char
*
dib
,
long
size
)
{
typedef
struct
_BMPFILEHEADER
{
using
BMPFILEHEADER
=
struct
_BMPFILEHEADER
{
WORD
bmType
;
DWORD
bmSize
;
WORD
bmReserved1
;
WORD
bmReserved2
;
DWORD
bmOffBits
;
}
BMPFILEHEADER
;
};
int
sizeBmp
=
size
+
14
;
QByteArray
pattern
;
// BMP header and DIB data
...
...
ktnef/src/wmfstruct.h
View file @
797ae67f
...
...
@@ -11,29 +11,29 @@ using DWORD = int;
using
LONG
=
qint32
;
using
_HANDLE
=
void
*
;
typedef
struct
_RECT
{
using
RECT
=
struct
_RECT
{
WORD
left
;
WORD
top
;
WORD
right
;
WORD
bottom
;
}
RECT
;
};
typedef
struct
_RECTL
{
using
RECTL
=
struct
_RECTL
{
LONG
left
;
LONG
top
;
LONG
right
;
LONG
bottom
;
}
RECTL
;
};
typedef
struct
_SIZE
{
using
SIZE
=
struct
_SIZE
{
WORD
width
;
WORD
height
;
}
SIZE
;
};
typedef
struct
_SIZEL
{
using
SIZEL
=
struct
_SIZEL
{
LONG
width
;
LONG
height
;
}
SIZEL
;
};
struct
WmfEnhMetaHeader
{
DWORD
iType
;
// Record type EMR_HEADER
...
...
src/autotests/kmcommandstest.cpp
View file @
797ae67f
...
...
@@ -92,7 +92,7 @@ void KMCommandsTest::resetIdentities()
void
KMCommandsTest
::
verifyEncryption
(
bool
encrypt
)
{
const
KMainWindow
*
w
=
mKernel
->
mainWin
();
QLabel
*
encryption
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"encryptionindicator"
));
auto
*
encryption
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"encryptionindicator"
));
QVERIFY
(
encryption
);
QCOMPARE
(
encryption
->
isVisible
(),
encrypt
);
}
...
...
@@ -100,7 +100,7 @@ void KMCommandsTest::verifyEncryption(bool encrypt)
void
KMCommandsTest
::
verifySignature
(
bool
sign
)
{
const
KMainWindow
*
w
=
mKernel
->
mainWin
();
QLabel
*
signature
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"signatureindicator"
));
auto
*
signature
=
w
->
findChild
<
QLabel
*>
(
QStringLiteral
(
"signatureindicator"
));
QVERIFY
(
signature
);
QCOMPARE
(
signature
->
isVisible
(),
sign
);
}
...
...
@@ -113,7 +113,7 @@ void KMCommandsTest::testMailtoReply()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
defaultIdentity
();
Akonadi
::
Item
item
(
createItem
(
ident
));
KMMailtoReplyCommand
*
cmd
(
new
KMMailtoReplyCommand
(
nullptr
,
QUrl
(
QStringLiteral
(
"mailto:test@example.com"
)),
item
,
QString
()));
auto
*
cmd
(
new
KMMailtoReplyCommand
(
nullptr
,
QUrl
(
QStringLiteral
(
"mailto:test@example.com"
)),
item
,
QString
()));
cmd
->
start
();
verifySignature
(
true
);
waitForMainWindowToClose
();
...
...
@@ -123,7 +123,7 @@ void KMCommandsTest::testMailtoReply()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
identityForAddress
(
QStringLiteral
(
"secundus@example.com"
));
Akonadi
::
Item
item
(
createItem
(
ident
));
KMMailtoReplyCommand
*
cmd
(
new
KMMailtoReplyCommand
(
nullptr
,
QUrl
(
QStringLiteral
(
"mailto:test@example.com"
)),
item
,
QString
()));
auto
*
cmd
(
new
KMMailtoReplyCommand
(
nullptr
,
QUrl
(
QStringLiteral
(
"mailto:test@example.com"
)),
item
,
QString
()));
cmd
->
start
();
verifySignature
(
false
);
waitForMainWindowToClose
();
...
...
@@ -133,7 +133,7 @@ void KMCommandsTest::testMailtoReply()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
identityForAddress
(
QStringLiteral
(
"drei@example.com"
));
Akonadi
::
Item
item
(
createItem
(
ident
));
KMMailtoReplyCommand
*
cmd
(
new
KMMailtoReplyCommand
(
nullptr
,
QUrl
(
QStringLiteral
(
"mailto:test@example.com"
)),
item
,
QString
()));
auto
*
cmd
(
new
KMMailtoReplyCommand
(
nullptr
,
QUrl
(
QStringLiteral
(
"mailto:test@example.com"
)),
item
,
QString
()));
cmd
->
start
();
verifySignature
(
true
);
waitForMainWindowToClose
();
...
...
@@ -148,7 +148,7 @@ void KMCommandsTest::testReply()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
defaultIdentity
();
Akonadi
::
Item
item
(
createItem
(
ident
));
KMReplyCommand
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
auto
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
cmd
->
start
();
verifySignature
(
true
);
waitForMainWindowToClose
();
...
...
@@ -158,7 +158,7 @@ void KMCommandsTest::testReply()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
identityForAddress
(
QStringLiteral
(
"secundus@example.com"
));
Akonadi
::
Item
item
(
createItem
(
ident
));
KMReplyCommand
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
auto
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
cmd
->
start
();
verifySignature
(
false
);
waitForMainWindowToClose
();
...
...
@@ -168,7 +168,7 @@ void KMCommandsTest::testReply()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
identityForAddress
(
QStringLiteral
(
"drei@example.com"
));
Akonadi
::
Item
item
(
createItem
(
ident
));
KMReplyCommand
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
auto
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
cmd
->
start
();
verifySignature
(
true
);
waitForMainWindowToClose
();
...
...
@@ -187,7 +187,7 @@ void KMCommandsTest::testReplyWithoutDefaultGPGSign()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
defaultIdentity
();
Akonadi
::
Item
item
(
createItem
(
ident
));
KMReplyCommand
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
auto
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
cmd
->
start
();
verifySignature
(
false
);
waitForMainWindowToClose
();
...
...
@@ -197,7 +197,7 @@ void KMCommandsTest::testReplyWithoutDefaultGPGSign()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
identityForAddress
(
QStringLiteral
(
"secundus@example.com"
));
Akonadi
::
Item
item
(
createItem
(
ident
));
KMReplyCommand
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
auto
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
cmd
->
start
();
verifySignature
(
false
);
waitForMainWindowToClose
();
...
...
@@ -207,7 +207,7 @@ void KMCommandsTest::testReplyWithoutDefaultGPGSign()
const
KIdentityManagement
::
Identity
&
ident
=
mKernel
->
identityManager
()
->
identityForAddress
(
QStringLiteral
(
"drei@example.com"
));
Akonadi
::
Item
item
(
createItem
(
ident
));
KMReplyCommand
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
auto
*
cmd
(
new
KMReplyCommand
(
nullptr
,
item
,
MessageComposer
::
ReplyAll
));
cmd
->
start
();
verifySignature
(
true
);
waitForMainWindowToClose
();
...
...
src/autotests/tagselectdialogtest.cpp
View file @
797ae67f
...
...
@@ -28,10 +28,10 @@ void TagSelectDialogTest::initTestCase()
void
TagSelectDialogTest
::
shouldHaveDefaultValue
()
{
TagSelectDialog
dlg
(
nullptr
,
1
,
Akonadi
::
Item
());
QListWidget
*
listWidget
=
dlg
.
findChild
<
QListWidget
*>
(
QStringLiteral
(
"listtag"
));
auto
*
listWidget
=
dlg
.
findChild
<
QListWidget
*>
(
QStringLiteral
(
"listtag"
));
QVERIFY
(
listWidget
);
KListWidgetSearchLine
*
listWidgetSearchLine
=
dlg
.
findChild
<
KListWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
auto
*
listWidgetSearchLine
=
dlg
.
findChild
<
KListWidgetSearchLine
*>
(
QStringLiteral
(
"searchline"
));
QVERIFY
(
listWidgetSearchLine
);
QVERIFY
(
listWidgetSearchLine
->
isClearButtonEnabled
());
}
...
...
Prev
1
2
3
4
Next
Write
Preview
Supports
Markdown
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