Commit 84be68b3 authored by Laurent Montel's avatar Laurent Montel
Browse files

Add question dialog box

parent ab7191c0
Pipeline #215191 passed with stage
in 55 minutes and 4 seconds
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment