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
KDE PIM Add-ons
Commits
7cd42f68
Commit
7cd42f68
authored
Jul 05, 2021
by
Laurent Montel
😁
Browse files
Improve confirmbeforedeleting dialog
parent
b1441ca6
Changes
3
Hide whitespace changes
Inline
Side-by-side
kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingdialog.cpp
View file @
7cd42f68
...
...
@@ -30,7 +30,7 @@ ConfirmBeforeDeletingDialog::ConfirmBeforeDeletingDialog(QWidget *parent)
auto
buttonBox
=
new
QDialogButtonBox
(
QDialogButtonBox
::
Ok
|
QDialogButtonBox
::
Cancel
,
this
);
buttonBox
->
setObjectName
(
QStringLiteral
(
"buttonBox"
));
mainLayout
->
addWidget
(
buttonBox
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
ConfirmBeforeDeletingDialog
::
accept
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
accepted
,
this
,
&
ConfirmBeforeDeletingDialog
::
slotSave
);
connect
(
buttonBox
,
&
QDialogButtonBox
::
rejected
,
this
,
&
ConfirmBeforeDeletingDialog
::
reject
);
readConfig
();
}
...
...
@@ -40,6 +40,12 @@ ConfirmBeforeDeletingDialog::~ConfirmBeforeDeletingDialog()
writeConfig
();
}
void
ConfirmBeforeDeletingDialog
::
slotSave
()
{
// TODO
accept
();
}
void
ConfirmBeforeDeletingDialog
::
writeConfig
()
{
KConfigGroup
group
(
KSharedConfig
::
openStateConfig
(),
myConfirmBeforeDeletingConfigGroupName
);
...
...
kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingdialog.h
View file @
7cd42f68
...
...
@@ -16,6 +16,7 @@ public:
~
ConfirmBeforeDeletingDialog
()
override
;
private:
void
slotSave
();
void
writeConfig
();
void
readConfig
();
ConfirmBeforeDeletingWidget
*
const
mConfirmBeforeDeletingWidget
;
...
...
kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingmanager.cpp
View file @
7cd42f68
...
...
@@ -68,7 +68,7 @@ void ConfirmBeforeDeletingManager::saveRules()
const
QString
groupName
=
defaultGroupName
()
+
QStringLiteral
(
" #%1"
).
arg
(
i
);
KConfigGroup
group
=
config
->
group
(
groupName
);
const
ConfirmBeforeDeletingRule
&
rule
=
mRules
.
at
(
i
);
rule
.
save
(
group
);
// TODO
rule
.
save
(
group
);
}
}
...
...
Write
Preview
Markdown
is supported
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