Commit 01085615 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

All is async now. Need to fix kmail now

parent ae6e9993
Pipeline #41469 failed with stage
in 12 minutes and 20 seconds
......@@ -13,6 +13,7 @@
#include <kmanagesieve/sievejob.h>
#include "libksieve_debug.h"
#include "searchserverwithvacationsupportjob.h"
using namespace KSieveUi;
MultiImapVacationManager::MultiImapVacationManager(SieveImapPasswordProvider *passwordProvider, QObject *parent)
......@@ -71,7 +72,15 @@ void MultiImapVacationManager::checkVacation()
mNumberOfJobs = 0;
mCheckInProgress = true;
QMapIterator<QString, KSieveUi::Util::AccountInfo> i(serverList());
auto *job = new SearchServerWithVacationSupportJob(this);
job->setPasswordProvider(passwordProvider());
connect(job, &SearchServerWithVacationSupportJob::searchServerWithVacationSupportFinished, this, &MultiImapVacationManager::slotSearchServerWithVacationSupportFinished);
job->start();
}
void MultiImapVacationManager::slotSearchServerWithVacationSupportFinished(const QMap<QString, KSieveUi::Util::AccountInfo> &list)
{
QMapIterator<QString, KSieveUi::Util::AccountInfo> i(list);
while (i.hasNext()) {
i.next();
checkVacation(i.key(), i.value().sieveUrl);
......
......@@ -46,6 +46,7 @@ private Q_SLOTS:
private:
Q_DISABLE_COPY(MultiImapVacationManager)
void slotSearchServerWithVacationSupportFinished(const QMap<QString, KSieveUi::Util::AccountInfo> &list);
SieveImapPasswordProvider *const mPasswordProvider;
int mNumberOfJobs = 0;
bool mCheckInProgress = false;
......
Markdown is supported
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