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
93ae6fe3
Commit
93ae6fe3
authored
Oct 12, 2020
by
Laurent Montel
😁
Browse files
Modernize code
parent
51ffea0c
Changes
29
Hide whitespace changes
Inline
Side-by-side
agents/archivemailagent/addarchivemaildialog.cpp
View file @
93ae6fe3
...
...
@@ -39,7 +39,7 @@ AddArchiveMailDialog::AddArchiveMailDialog(ArchiveMailInfo *info, QWidget *paren
QVBoxLayout
*
topLayout
=
new
QVBoxLayout
(
this
);
QGridLayout
*
mainLayout
=
new
QGridLayout
;
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
int
row
=
0
;
...
...
agents/followupreminderagent/followupreminderinfowidget.cpp
View file @
93ae6fe3
...
...
@@ -53,7 +53,7 @@ FollowUpReminderInfoWidget::FollowUpReminderInfoWidget(QWidget *parent)
{
setObjectName
(
QStringLiteral
(
"FollowUpReminderInfoWidget"
));
QHBoxLayout
*
hbox
=
new
QHBoxLayout
(
this
);
hbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hbox
->
setContentsMargins
(
{}
);
mTreeWidget
=
new
QTreeWidget
(
this
);
mTreeWidget
->
setObjectName
(
QStringLiteral
(
"treewidget"
));
QStringList
headers
;
...
...
agents/mailfilteragent/filterlogdialog.cpp
View file @
93ae6fe3
...
...
@@ -59,7 +59,7 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
QVBoxLayout
*
pageVBoxLayout
=
new
QVBoxLayout
;
page
->
setLayout
(
pageVBoxLayout
);
pageVBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
pageVBoxLayout
->
setContentsMargins
(
{}
);
mainLayout
->
addWidget
(
page
);
mTextEdit
=
new
KPIMTextEdit
::
PlainTextEditorWidget
(
new
FilterLogTextEdit
(
this
),
page
);
...
...
@@ -137,7 +137,7 @@ FilterLogDialog::FilterLogDialog(QWidget *parent)
QWidget
*
hbox
=
new
QWidget
(
page
);
QHBoxLayout
*
hboxHBoxLayout
=
new
QHBoxLayout
;
hbox
->
setLayout
(
hboxHBoxLayout
);
hboxHBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hboxHBoxLayout
->
setContentsMargins
(
{}
);
pageVBoxLayout
->
addWidget
(
hbox
);
QLabel
*
logSizeLab
=
new
QLabel
(
i18n
(
"Log size limit:"
),
hbox
);
hboxHBoxLayout
->
addWidget
(
logSizeLab
);
...
...
kmail-refresh-settings/refreshsettingscleanuppage.cpp
View file @
93ae6fe3
...
...
@@ -17,7 +17,7 @@ RefreshSettingsCleanupPage::RefreshSettingsCleanupPage(QWidget *parent)
{
QHBoxLayout
*
mainLayout
=
new
QHBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
QPushButton
*
button
=
new
QPushButton
(
i18n
(
"Clean"
),
this
);
button
->
setObjectName
(
QStringLiteral
(
"button"
));
mainLayout
->
addWidget
(
button
);
...
...
kmail-refresh-settings/refreshsettingsfirstpage.cpp
View file @
93ae6fe3
...
...
@@ -14,7 +14,7 @@ RefreshSettingsFirstPage::RefreshSettingsFirstPage(QWidget *parent)
{
QHBoxLayout
*
mainLayout
=
new
QHBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
QLabel
*
label
=
new
QLabel
(
i18n
(
"Please close KMail/Kontact before using it."
));
QFont
f
=
label
->
font
();
f
.
setBold
(
true
);
...
...
kmail-refresh-settings/refreshsettringsfinishpage.cpp
View file @
93ae6fe3
...
...
@@ -13,7 +13,7 @@ RefreshSettringsFinishPage::RefreshSettringsFinishPage(QWidget *parent)
{
QHBoxLayout
*
mainLayout
=
new
QHBoxLayout
(
this
);
mainLayout
->
setObjectName
(
QStringLiteral
(
"mainLayout"
));
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
mTextEdit
=
new
QPlainTextEdit
(
this
);
mTextEdit
->
setObjectName
(
QStringLiteral
(
"textedit"
));
...
...
src/configuredialog/configureaccountpage.cpp
View file @
93ae6fe3
...
...
@@ -94,7 +94,7 @@ AccountsPageSendingTab::AccountsPageSendingTab(QWidget *parent)
vlay
->
addWidget
(
new
QLabel
(
i18n
(
"Outgoing accounts (add at least one):"
),
this
));
TransportManagementWidget
*
tmw
=
new
TransportManagementWidget
(
this
);
tmw
->
layout
()
->
setContentsMargins
(
0
,
0
,
0
,
0
);
tmw
->
layout
()
->
setContentsMargins
(
{}
);
vlay
->
addWidget
(
tmw
);
// "Common options" groupbox:
...
...
@@ -404,7 +404,7 @@ LdapCompetionTab::LdapCompetionTab(QWidget *parent)
:
ConfigModuleTab
(
parent
)
{
QVBoxLayout
*
layout
=
new
QVBoxLayout
(
this
);
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
mLdapConfigureWidget
=
new
KLDAP
::
LdapConfigureWidget
(
this
);
layout
->
addWidget
(
mLdapConfigureWidget
);
...
...
src/configuredialog/configureappearancepage.cpp
View file @
93ae6fe3
...
...
@@ -663,7 +663,7 @@ AppearancePageHeadersTab::AppearancePageHeadersTab(QWidget *parent)
if
(
dateDisplayConfig
[
i
].
dateDisplay
==
DateFormatter
::
Custom
)
{
QWidget
*
hbox
=
new
QWidget
(
mDateDisplayBox
);
QHBoxLayout
*
hboxHBoxLayout
=
new
QHBoxLayout
(
hbox
);
hboxHBoxLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hboxHBoxLayout
->
setContentsMargins
(
{}
);
QRadioButton
*
radio
=
new
QRadioButton
(
buttonLabel
,
hbox
);
hboxHBoxLayout
->
addWidget
(
radio
);
mDateDisplay
->
addButton
(
radio
,
dateDisplayConfig
[
i
].
dateDisplay
);
...
...
src/configuredialog/configurecomposerpage.cpp
View file @
93ae6fe3
...
...
@@ -1206,7 +1206,7 @@ ComposerPageAutoCorrectionTab::ComposerPageAutoCorrectionTab(QWidget *parent)
{
QVBoxLayout
*
vlay
=
new
QVBoxLayout
(
this
);
vlay
->
setSpacing
(
0
);
vlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vlay
->
setContentsMargins
(
{}
);
autocorrectionWidget
=
new
PimCommon
::
AutoCorrectionWidget
(
this
);
if
(
KMKernel
::
self
())
{
autocorrectionWidget
->
setAutoCorrection
(
KMKernel
::
self
()
->
composerAutoCorrection
());
...
...
@@ -1240,7 +1240,7 @@ ComposerPageAutoImageResizeTab::ComposerPageAutoImageResizeTab(QWidget *parent)
{
QVBoxLayout
*
vlay
=
new
QVBoxLayout
(
this
);
vlay
->
setSpacing
(
0
);
vlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vlay
->
setContentsMargins
(
{}
);
autoResizeWidget
=
new
MessageComposer
::
ImageScalingWidget
(
this
);
vlay
->
addWidget
(
autoResizeWidget
);
connect
(
autoResizeWidget
,
&
MessageComposer
::
ImageScalingWidget
::
changed
,
this
,
&
ConfigModuleTab
::
slotEmitChanged
);
...
...
src/configuredialog/configuredialog_p.cpp
View file @
93ae6fe3
...
...
@@ -20,7 +20,7 @@ ConfigModuleWithTabs::ConfigModuleWithTabs(QWidget *parent)
:
ConfigModule
(
parent
)
{
QVBoxLayout
*
vlay
=
new
QVBoxLayout
(
this
);
vlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vlay
->
setContentsMargins
(
{}
);
mTabWidget
=
new
QTabWidget
(
this
);
vlay
->
addWidget
(
mTabWidget
);
}
...
...
src/configuredialog/configuremiscpage.cpp
View file @
93ae6fe3
...
...
@@ -55,7 +55,7 @@ MiscPageFolderTab::MiscPageFolderTab(QWidget *parent)
mMMTab
.
setupUi
(
this
);
//replace QWidget with FolderRequester. Promote to doesn't work due to the custom constructor
QHBoxLayout
*
layout
=
new
QHBoxLayout
;
layout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
layout
->
setContentsMargins
(
{}
);
mMMTab
.
mOnStartupOpenFolder
->
setLayout
(
layout
);
mOnStartupOpenFolder
=
new
FolderRequester
(
mMMTab
.
mOnStartupOpenFolder
);
layout
->
addWidget
(
mOnStartupOpenFolder
);
...
...
@@ -121,7 +121,7 @@ MiscPageInviteTab::MiscPageInviteTab(QWidget *parent)
{
mInvitationUi
=
new
MessageViewer
::
InvitationSettings
(
this
);
QHBoxLayout
*
l
=
new
QHBoxLayout
(
this
);
l
->
setContentsMargins
(
0
,
0
,
0
,
0
);
l
->
setContentsMargins
(
{}
);
l
->
addWidget
(
mInvitationUi
);
connect
(
mInvitationUi
,
&
MessageViewer
::
InvitationSettings
::
changed
,
this
,
&
MiscPageInviteTab
::
slotEmitChanged
);
}
...
...
@@ -146,7 +146,7 @@ MiscPagePrintingTab::MiscPagePrintingTab(QWidget *parent)
{
mPrintingUi
=
new
MessageViewer
::
PrintingSettings
(
this
);
QHBoxLayout
*
l
=
new
QHBoxLayout
(
this
);
l
->
setContentsMargins
(
0
,
0
,
0
,
0
);
l
->
setContentsMargins
(
{}
);
l
->
addWidget
(
mPrintingUi
);
connect
(
mPrintingUi
,
&
MessageViewer
::
PrintingSettings
::
changed
,
this
,
&
MiscPagePrintingTab
::
slotEmitChanged
);
}
...
...
@@ -172,7 +172,7 @@ KuserFeedBackPageTab::KuserFeedBackPageTab(QWidget *parent)
{
mUserFeedbackWidget
=
new
KUserFeedback
::
FeedbackConfigWidget
(
this
);
QHBoxLayout
*
l
=
new
QHBoxLayout
(
this
);
l
->
setContentsMargins
(
0
,
0
,
0
,
0
);
l
->
setContentsMargins
(
{}
);
l
->
addWidget
(
mUserFeedbackWidget
);
connect
(
mUserFeedbackWidget
,
&
KUserFeedback
::
FeedbackConfigWidget
::
configurationChanged
,
this
,
&
KuserFeedBackPageTab
::
slotEmitChanged
);
...
...
src/configuredialog/configurepluginpage.cpp
View file @
93ae6fe3
...
...
@@ -14,7 +14,7 @@ ConfigurePluginPage::ConfigurePluginPage(QWidget *parent)
:
ConfigModule
(
parent
)
{
QHBoxLayout
*
l
=
new
QHBoxLayout
(
this
);
l
->
setContentsMargins
(
0
,
0
,
0
,
0
);
l
->
setContentsMargins
(
{}
);
mConfigurePlugins
=
new
PimCommon
::
ConfigurePluginsWidget
(
new
ConfigurePluginsListWidget
(
this
),
this
);
l
->
addWidget
(
mConfigurePlugins
);
...
...
src/dialog/archivefolderdialog.cpp
View file @
93ae6fe3
...
...
@@ -64,7 +64,7 @@ ArchiveFolderDialog::ArchiveFolderDialog(QWidget *parent)
topLayout
->
addWidget
(
mainWidget
);
topLayout
->
addWidget
(
buttonBox
);
QGridLayout
*
mainLayout
=
new
QGridLayout
(
mainWidget
);
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
int
row
=
0
;
...
...
src/editor/attachment/attachmentview.cpp
View file @
93ae6fe3
...
...
@@ -42,7 +42,7 @@ AttachmentView::AttachmentView(MessageComposer::AttachmentModel *model, QWidget
{
mWidget
=
new
QWidget
();
QHBoxLayout
*
lay
=
new
QHBoxLayout
(
mWidget
);
lay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
lay
->
setContentsMargins
(
{}
);
mToolButton
=
new
QToolButton
;
connect
(
mToolButton
,
&
QAbstractButton
::
toggled
,
this
,
&
AttachmentView
::
slotShowHideAttchementList
);
mToolButton
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"mail-attachment"
)));
...
...
@@ -50,7 +50,7 @@ AttachmentView::AttachmentView(MessageComposer::AttachmentModel *model, QWidget
mToolButton
->
setCheckable
(
true
);
lay
->
addWidget
(
mToolButton
);
mInfoAttachment
=
new
QLabel
;
mInfoAttachment
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mInfoAttachment
->
setContentsMargins
(
{}
);
mInfoAttachment
->
setTextFormat
(
Qt
::
PlainText
);
lay
->
addWidget
(
mInfoAttachment
);
...
...
src/editor/kmcomposerwin.cpp
View file @
93ae6fe3
...
...
@@ -260,7 +260,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
mHeadersToEditorSplitter
->
setSizes
(
defaultSizes
);
QVBoxLayout
*
v
=
new
QVBoxLayout
(
mMainWidget
);
v
->
setContentsMargins
(
0
,
0
,
0
,
0
);
v
->
setContentsMargins
(
{}
);
v
->
addWidget
(
mHeadersToEditorSplitter
);
KIdentityManagement
::
IdentityCombo
*
identity
=
new
KIdentityManagement
::
IdentityCombo
(
kmkernel
->
identityManager
(),
mHeadersArea
);
...
...
@@ -326,7 +326,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
mCryptoStateIndicatorWidget
->
setShowAlwaysIndicator
(
KMailSettings
::
self
()
->
showCryptoLabelIndicator
());
QVBoxLayout
*
vbox
=
new
QVBoxLayout
(
editorAndCryptoStateIndicators
);
vbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vbox
->
setContentsMargins
(
{}
);
mPotentialPhishingEmailWarning
=
new
PotentialPhishingEmailWarning
(
this
);
connect
(
mPotentialPhishingEmailWarning
,
&
PotentialPhishingEmailWarning
::
sendNow
,
this
,
&
KMComposerWin
::
slotCheckSendNowStep2
);
...
...
src/editor/potentialphishingemail/potentialphishingdetailwidget.cpp
View file @
93ae6fe3
...
...
@@ -18,7 +18,7 @@ PotentialPhishingDetailWidget::PotentialPhishingDetailWidget(QWidget *parent)
,
mListWidget
(
new
QListWidget
(
this
))
{
QVBoxLayout
*
mainLayout
=
new
QVBoxLayout
(
this
);
mainLayout
->
setContentsMargins
(
0
,
0
,
0
,
0
);
mainLayout
->
setContentsMargins
(
{}
);
QLabel
*
lab
=
new
QLabel
(
i18n
(
"Select email to put in whitelist:"
),
this
);
lab
->
setObjectName
(
QStringLiteral
(
"label"
));
mainLayout
->
addWidget
(
lab
);
...
...
src/editor/widgets/cryptostateindicatorwidget.cpp
View file @
93ae6fe3
...
...
@@ -17,7 +17,7 @@ CryptoStateIndicatorWidget::CryptoStateIndicatorWidget(QWidget *parent)
:
QWidget
(
parent
)
{
QHBoxLayout
*
hbox
=
new
QHBoxLayout
(
this
);
hbox
->
setContentsMargins
(
0
,
0
,
0
,
0
);
hbox
->
setContentsMargins
(
{}
);
mSignatureStateIndicator
=
new
QLabel
(
this
);
mSignatureStateIndicator
->
setAlignment
(
Qt
::
AlignHCenter
);
mSignatureStateIndicator
->
setTextFormat
(
Qt
::
PlainText
);
...
...
src/identity/identityaddvcarddialog.cpp
View file @
93ae6fe3
...
...
@@ -36,7 +36,7 @@ IdentityAddVcardDialog::IdentityAddVcardDialog(const QStringList &shadowIdentiti
mainLayout
->
addWidget
(
buttonBox
);
QVBoxLayout
*
vlay
=
new
QVBoxLayout
(
mainWidget
);
vlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vlay
->
setContentsMargins
(
{}
);
mButtonGroup
=
new
QButtonGroup
(
this
);
mButtonGroup
->
setObjectName
(
QStringLiteral
(
"buttongroup"
));
...
...
src/identity/identitydialog.cpp
View file @
93ae6fe3
...
...
@@ -267,7 +267,7 @@ IdentityDialog::IdentityDialog(QWidget *parent)
mainLayout
->
addWidget
(
page
);
mainLayout
->
addWidget
(
buttonBox
);
QVBoxLayout
*
vlay
=
new
QVBoxLayout
(
page
);
vlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vlay
->
setContentsMargins
(
{}
);
mTabWidget
=
new
QTabWidget
(
page
);
mTabWidget
->
setObjectName
(
QStringLiteral
(
"config-identity-tab"
));
vlay
->
addWidget
(
mTabWidget
);
...
...
src/identity/newidentitydialog.cpp
View file @
93ae6fe3
...
...
@@ -49,7 +49,7 @@ NewIdentityDialog::NewIdentityDialog(KIdentityManagement::IdentityManager *manag
mainLayout
->
addWidget
(
page
);
mainLayout
->
addWidget
(
buttonBox
);
QVBoxLayout
*
vlay
=
new
QVBoxLayout
(
page
);
vlay
->
setContentsMargins
(
0
,
0
,
0
,
0
);
vlay
->
setContentsMargins
(
{}
);
// row 0: line edit with label
QHBoxLayout
*
hlay
=
new
QHBoxLayout
();
// inherits spacing
...
...
Prev
1
2
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