Commit c6847146 authored by Laurent Montel's avatar Laurent Montel
Browse files

Port deprecated methods

parent 16431c16
Pipeline #244532 failed with stage
in 8 minutes and 36 seconds
......@@ -44,7 +44,7 @@ private Q_SLOTS:
KIMAP::Session session(QStringLiteral("127.0.0.1"), 5989);
auto job = new KIMAP::ListJob(&session);
job->setIncludeUnsubscribed(true);
job->setOption(KIMAP::ListJob::IncludeUnsubscribed);
QVERIFY(job->exec());
fakeServer.quit();
......
......@@ -184,7 +184,7 @@ private Q_SLOTS:
KIMAP::Session session(QStringLiteral("127.0.0.1"), 5989);
auto job = new KIMAP::ListJob(&session);
job->setIncludeUnsubscribed(unsubscribed);
job->setOption(unsubscribed ? KIMAP::ListJob::IncludeUnsubscribed : KIMAP::ListJob::NoOption);
QSignalSpy spy(job, &KIMAP::ListJob::mailBoxesReceived);
......
......@@ -80,7 +80,7 @@ void dumpContentHelper(KMime::Content *part, const QString &partId = QString())
void listFolders(Session *session, bool includeUnsubscribed = false, const QString &nameFilter = QLatin1String(""))
{
auto list = new ListJob(session);
list->setIncludeUnsubscribed(includeUnsubscribed);
list->setOption(includeUnsubscribed ? KIMAP::ListJob::IncludeUnsubscribed : KIMAP::ListJob::NoOption);
list->exec();
Q_ASSERT_X(list->error() == 0, "ListJob", list->errorString().toLocal8Bit().constData());
int count = list->mailBoxes().size();
......
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