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
KDE PIM Add-ons
Commits
84be68b3
Commit
84be68b3
authored
Aug 09, 2022
by
Laurent Montel
Browse files
Add question dialog box
parent
ab7191c0
Pipeline
#215191
passed with stage
in 55 minutes and 4 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kmail/plugins/akonadidatabasetools/akonadidatabasetoolsplugininterface.cpp
View file @
84be68b3
...
...
@@ -26,8 +26,10 @@ void AkonadiDatabaseToolsPluginInterface::createAction(KActionCollection *ac)
auto
action
=
new
QAction
(
i18n
(
"&Akonadi Vacuum..."
),
this
);
ac
->
addAction
(
QStringLiteral
(
"akonadivacuum"
),
action
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
this
]()
{
mTool
=
AkonadiDatabaseToolsUtils
::
AkonadiDatabaseTool
::
Vacuum
;
slotActivated
();
if
(
KMessageBox
::
questionYesNo
(
parentWidget
(),
i18n
(
"Do you want to vacuum akonadi database?"
),
i18n
(
"Akonadi Vacuum"
))
==
KMessageBox
::
Yes
)
{
mTool
=
AkonadiDatabaseToolsUtils
::
AkonadiDatabaseTool
::
Vacuum
;
slotActivated
();
}
});
PimCommon
::
ActionType
type
(
action
,
PimCommon
::
ActionType
::
Tools
);
...
...
@@ -37,8 +39,10 @@ void AkonadiDatabaseToolsPluginInterface::createAction(KActionCollection *ac)
auto
action
=
new
QAction
(
i18n
(
"&Akonadi Fsck..."
),
this
);
ac
->
addAction
(
QStringLiteral
(
"akonadifsck"
),
action
);
connect
(
action
,
&
QAction
::
triggered
,
this
,
[
this
]()
{
mTool
=
AkonadiDatabaseToolsUtils
::
AkonadiDatabaseTool
::
Fsck
;
slotActivated
();
if
(
KMessageBox
::
questionYesNo
(
parentWidget
(),
i18n
(
"Do you want to fsck akonadi database?"
),
i18n
(
"Akonadi Fsck"
))
==
KMessageBox
::
Yes
)
{
mTool
=
AkonadiDatabaseToolsUtils
::
AkonadiDatabaseTool
::
Fsck
;
slotActivated
();
}
});
PimCommon
::
ActionType
type
(
action
,
PimCommon
::
ActionType
::
Tools
);
...
...
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