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
76e0975f
Commit
76e0975f
authored
Nov 09, 2020
by
Laurent Montel
😁
Browse files
Use more auto
parent
01bed868
Pipeline
#40230
failed with stage
in 7 minutes and 55 seconds
Changes
16
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/archivemailagent/addarchivemaildialog.cpp
View file @
76e0975f
...
...
@@ -42,7 +42,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
int
row
=
0
;
QLabel
*
folderLabel
=
new
QLabel
(
i18n
(
"&Folder:"
),
this
);
auto
*
folderLabel
=
new
QLabel
(
i18n
(
"&Folder:"
),
this
);
mainLayout
->
addWidget
(
folderLabel
,
row
,
0
);
mFolderRequester
=
new
MailCommon
::
FolderRequester
(
this
);
mFolderRequester
->
setObjectName
(
QStringLiteral
(
"folder_requester"
));
...
...
@@ -110,7 +110,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
mainLayout
->
setColumnStretch
(
1
,
1
);
mainLayout
->
addItem
(
new
QSpacerItem
(
1
,
1
,
QSizePolicy
::
Expanding
,
QSizePolicy
::
Expanding
),
row
,
0
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
mOkButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
mOkButton
->
setDefault
(
true
);
mOkButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
agents/followupreminderagent/followupremindernoanswerdialog.cpp
View file @
76e0975f
...
...
@@ -42,7 +42,7 @@ FollowUpReminderNoAnswerDialog::FollowUpReminderNoAnswerDialog(QWidget *parent)
mWidget
->
setObjectName
(
QStringLiteral
(
"FollowUpReminderInfoWidget"
));
mainLayout
->
addWidget
(
mWidget
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
agents/mailfilteragent/filterlogdialog.cpp
View file @
76e0975f
...
...
@@ -42,7 +42,7 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Filter Log Viewer"
));
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
this
);
mUser1Button
=
new
QPushButton
(
this
);
buttonBox
->
addButton
(
mUser1Button
,
QDialogButtonBox
::
ActionRole
);
mUser2Button
=
new
QPushButton
(
this
);
...
...
agents/sendlateragent/sendlaterconfiguredialog.cpp
View file @
76e0975f
...
...
@@ -25,7 +25,7 @@ SendLaterConfigureDialog::SendLaterConfigureDialog(QWidget *parent)
setWindowTitle
(
i18nc
(
"@title:window"
,
"Configure"
));
setWindowIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"kmail"
)));
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
ktnef/src/attachpropertydialog.cpp
View file @
76e0975f
...
...
@@ -42,11 +42,11 @@ AttachPropertyDialog::AttachPropertyDialog(QWidget *parent)
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
auto
*
mainWidget
=
new
QWidget
(
this
);
mUI
.
setupUi
(
mainWidget
);
mUI
.
mProperties
->
setHeaderHidden
(
true
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Close
,
this
);
auto
*
user1Button
=
new
QPushButton
;
buttonBox
->
addButton
(
user1Button
,
QDialogButtonBox
::
ActionRole
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
AttachPropertyDialog
::
reject
);
...
...
ktnef/src/messagepropertydialog.cpp
View file @
76e0975f
...
...
@@ -36,7 +36,7 @@ MessagePropertyDialog::MessagePropertyDialog(QWidget *parent, KTNEFMessage *msg)
setWindowTitle
(
i18nc
(
"@title:window"
,
"Message Properties"
));
mListView
=
new
QTreeWidget
(
this
);
mainLayout
->
addWidget
(
mListView
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
src/configuredialog/configureaccountpage.cpp
View file @
76e0975f
...
...
@@ -347,7 +347,7 @@ void AccountsPageReceivingTab::slotIncludeInCheckChanged(bool checked)
void
AccountsPageReceivingTab
::
slotOfflineOnShutdownChanged
(
bool
checked
)
{
auto
*
action
=
qobject_cast
<
QAction
*
>
(
sender
());
QString
ident
=
action
->
data
().
toString
();
const
QString
ident
=
action
->
data
().
toString
();
QSharedPointer
<
RetrievalOptions
>
opts
=
mRetrievalHash
.
value
(
ident
);
opts
->
OfflineOnShutdown
=
checked
;
...
...
@@ -410,8 +410,7 @@ LdapCompetionTab::LdapCompetionTab(QWidget *parent)
connect
(
mLdapConfigureWidget
,
&
KLDAP
::
LdapConfigureWidget
::
changed
,
this
,
qOverload
<
bool
>
(
&
LdapCompetionTab
::
changed
));
}
LdapCompetionTab
::~
LdapCompetionTab
()
=
default
;
LdapCompetionTab
::~
LdapCompetionTab
()
=
default
;
QString
LdapCompetionTab
::
helpAnchor
()
const
{
...
...
src/dialog/addemailtoexistingcontactdialog.cpp
View file @
76e0975f
...
...
@@ -53,7 +53,7 @@ AddEmailToExistingContactDialog::AddEmailToExistingContactDialog(QWidget *parent
readConfig
();
connect
(
mEmailSelectionWidget
->
view
()
->
selectionModel
(),
&
QItemSelectionModel
::
selectionChanged
,
this
,
&
AddEmailToExistingContactDialog
::
slotSelectionChanged
);
connect
(
mEmailSelectionWidget
->
view
(),
&
QTreeView
::
doubleClicked
,
this
,
&
AddEmailToExistingContactDialog
::
slotDoubleClicked
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
mOkButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
mOkButton
->
setDefault
(
true
);
mOkButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
src/dialog/archivefolderdialog.cpp
View file @
76e0975f
...
...
@@ -52,7 +52,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
setObjectName
(
QStringLiteral
(
"archive_folder_dialog"
));
setWindowTitle
(
i18nc
(
"@title:window for archiving a folder"
,
"Archive Folder"
));
auto
*
topLayout
=
new
QVBoxLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
mOkButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
mOkButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
ArchiveFolderDialog
::
slotAccepted
);
...
...
@@ -60,7 +60,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
mOkButton
->
setDefault
(
true
);
mOkButton
->
setText
(
i18nc
(
"@action"
,
"Archive"
));
setModal
(
true
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
auto
*
mainWidget
=
new
QWidget
(
this
);
topLayout
->
addWidget
(
mainWidget
);
topLayout
->
addWidget
(
buttonBox
);
auto
*
mainLayout
=
new
QGridLayout
(
mainWidget
);
...
...
@@ -70,7 +70,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
// TODO: Explanation label
QLabel
*
folderLabel
=
new
QLabel
(
i18n
(
"&Folder:"
),
mainWidget
);
auto
*
folderLabel
=
new
QLabel
(
i18n
(
"&Folder:"
),
mainWidget
);
mainLayout
->
addWidget
(
folderLabel
,
row
,
0
);
mFolderRequester
=
new
FolderRequester
(
mainWidget
);
mFolderRequester
->
setMustBeReadWrite
(
false
);
...
...
src/dialog/kmknotify.cpp
View file @
76e0975f
...
...
@@ -36,7 +36,7 @@ KMKnotify::KMKnotify(QWidget *parent)
mainLayout
->
addWidget
(
new
KSeparator
(
this
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
src/editor/potentialphishingemail/potentialphishingdetaildialog.cpp
View file @
76e0975f
...
...
@@ -24,7 +24,7 @@ PotentialPhishingDetailDialog::PotentialPhishingDetailDialog(QWidget *parent)
mPotentialPhishingDetailWidget
=
new
PotentialPhishingDetailWidget
(
this
);
mPotentialPhishingDetailWidget
->
setObjectName
(
QStringLiteral
(
"potentialphising_widget"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
src/identity/identityaddvcarddialog.cpp
View file @
76e0975f
...
...
@@ -22,7 +22,7 @@ IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentiti
:
QDialog
(
parent
)
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Create own vCard"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
...
...
@@ -31,7 +31,7 @@ IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentiti
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
IdentityAddVcardDialog
::
reject
);
setModal
(
true
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
auto
*
mainWidget
=
new
QWidget
(
this
);
mainLayout
->
addWidget
(
mainWidget
);
mainLayout
->
addWidget
(
buttonBox
);
...
...
src/identity/identitydialog.cpp
View file @
76e0975f
...
...
@@ -249,7 +249,7 @@ IdentityDialog::IdentityDialog(QWidget *parent)
setWindowTitle
(
i18nc
(
"@title:window"
,
"Edit Identity"
));
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
,
this
);
connect
(
buttonBox
->
button
(
QDialogButtonBox
::
Help
),
&
QPushButton
::
clicked
,
this
,
&
IdentityDialog
::
slotHelp
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
...
...
src/identity/identityeditvcarddialog.cpp
View file @
76e0975f
...
...
@@ -26,7 +26,7 @@ IdentityEditVcardDialog::IdentityEditVcardDialog(const QString &fileName, QWidge
mContactEditor
=
new
Akonadi
::
AkonadiContactEditor
(
Akonadi
::
AkonadiContactEditor
::
CreateMode
,
Akonadi
::
AkonadiContactEditor
::
VCardMode
,
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
okButton
->
setShortcut
(
Qt
::
CTRL
|
Qt
::
Key_Return
);
...
...
src/identity/newidentitydialog.cpp
View file @
76e0975f
...
...
@@ -36,7 +36,7 @@ NewIdentityDialog::NewIdentityDialog(KIdentityManagement::IdentityManager *manag
,
mIdentityManager
(
manager
)
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"New Identity"
));
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
|
QDialogButtonBox
::
Help
,
this
);
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
mOkButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
mOkButton
->
setDefault
(
true
);
...
...
src/tag/tagselectdialog.cpp
View file @
76e0975f
...
...
@@ -35,7 +35,7 @@ TagSelectDialog::TagSelectDialog(QWidget *parent, int numberOfSelectedMessages,
{
setWindowTitle
(
i18nc
(
"@title:window"
,
"Select Tags"
));
auto
*
mainLayout
=
new
QVBoxLayout
(
this
);
QDialogButtonBox
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
auto
*
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
QPushButton
*
okButton
=
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
okButton
->
setDefault
(
true
);
...
...
@@ -47,7 +47,7 @@ TagSelectDialog::TagSelectDialog(QWidget *parent, int numberOfSelectedMessages,
user1Button
->
setText
(
i18n
(
"Add New Tag..."
));
setModal
(
true
);
QWidget
*
mainWidget
=
new
QWidget
(
this
);
auto
*
mainWidget
=
new
QWidget
(
this
);
mainLayout
->
addWidget
(
mainWidget
);
mainLayout
->
addWidget
(
buttonBox
);
...
...
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