Skip to content
GitLab
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
d008de57
Commit
d008de57
authored
Nov 23, 2021
by
Laurent Montel
Browse files
Extract method
parent
26803c41
Pipeline
#100206
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/unifiedmailboxagent/settingsdialog.cpp
View file @
d008de57
...
...
@@ -85,7 +85,8 @@ SettingsDialog::SettingsDialog(const KSharedConfigPtr &config, UnifiedMailboxMan
auto
removeButton
=
new
QPushButton
(
QIcon
::
fromTheme
(
QStringLiteral
(
"list-remove-symbolic"
)),
i18n
(
"Remove"
));
removeButton
->
setEnabled
(
false
);
v
->
addWidget
(
removeButton
);
connect
(
removeButton
,
&
QPushButton
::
clicked
,
this
,
[
this
,
view
]()
{
const
auto
removeMailBox
=
[
this
,
view
]()
{
const
auto
indexes
=
view
->
selectionModel
()
->
selectedIndexes
();
if
(
!
indexes
.
isEmpty
())
{
auto
item
=
mBoxModel
->
itemFromIndex
(
indexes
[
0
]);
...
...
@@ -101,7 +102,8 @@ SettingsDialog::SettingsDialog(const KSharedConfigPtr &config, UnifiedMailboxMan
mBoxManager
.
saveBoxes
();
}
}
});
};
connect
(
removeButton
,
&
QPushButton
::
clicked
,
this
,
removeMailBox
);
v
->
addStretch
(
1
);
connect
(
view
->
selectionModel
(),
&
QItemSelectionModel
::
selectionChanged
,
this
,
[
view
,
editButton
,
removeButton
]()
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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