Commit 3ecd783f authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to restart akonadi server

parent 6de26a63
Pipeline #202257 passed with stage
in 4 minutes and 47 seconds
......@@ -4924,6 +4924,14 @@ void KMMainWidget::slotClearCacheDone()
if (akonadictlPath.isEmpty()) {
qCWarning(KMAIL_LOG) << "Impossible to find akonadictl apps";
} else {
if (KMessageBox::questionYesNo(this, i18n("Do you want to restart Akonadi?"), i18n("Restart Akonadi")) == KMessageBox::Yes) {
auto process = new QProcess(this);
process->setProgram(QStandardPaths::findExecutable(QStringLiteral("akonadictl")));
process->setArguments(QStringList() << QStringLiteral("restart"));
connect(process, &QProcess::finished, this, [this, process]() {
KMessageBox::information(this, i18n("Akonadi restarted."));
process->deleteLater();
});
}
}
// TODO
}
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