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

Modernize code

parent 26c50673
Pipeline #60362 passed with stage
in 15 minutes and 32 seconds
......@@ -46,7 +46,7 @@ void FindAccountInfoJobTest::shouldReturnEmptyInfo()
job->start();
spy.wait(1000);
QCOMPARE(spy.count(), 1);
const KSieveUi::Util::AccountInfo info = spy.at(0).at(0).value<KSieveUi::Util::AccountInfo>();
const auto info = spy.at(0).at(0).value<KSieveUi::Util::AccountInfo>();
QVERIFY(!info.sieveImapAccountSettings.isValid());
}
......@@ -545,7 +545,7 @@ void FindAccountInfoJobTest::shouldAssignValue()
job->start();
spy.wait(1000);
QCOMPARE(spy.count(), 1);
const KSieveUi::Util::AccountInfo info = spy.at(0).at(0).value<KSieveUi::Util::AccountInfo>();
const auto info = spy.at(0).at(0).value<KSieveUi::Util::AccountInfo>();
QCOMPARE(info.sieveImapAccountSettings.isValid(), sieveImapAccountValid);
const bool equal = (info == accountInfo);
if (!equal) {
......
......@@ -257,8 +257,7 @@ void ManageSieveWidget::slotNewScript()
}
const QStringList currentCapabilities = currentItem->data(0, SIEVE_SERVER_CAPABILITIES).toStringList();
const KSieveUi::SieveImapAccountSettings sieveimapaccountsettings =
currentItem->data(0, SIEVE_SERVER_IMAP_SETTINGS).value<KSieveUi::SieveImapAccountSettings>();
const auto sieveimapaccountsettings = currentItem->data(0, SIEVE_SERVER_IMAP_SETTINGS).value<KSieveUi::SieveImapAccountSettings>();
const QStringList listscript = currentItem->data(0, SIEVE_SERVER_LIST_SCRIPT).toStringList();
d->mBlockSignal = true;
......@@ -293,7 +292,7 @@ void ManageSieveWidget::slotEditScript()
}
url = url.adjusted(QUrl::RemoveFilename);
url.setPath(url.path() + QLatin1Char('/') + currentItem->text(0));
const KSieveUi::SieveImapAccountSettings sieveimapaccountsettings = parent->data(0, SIEVE_SERVER_IMAP_SETTINGS).value<KSieveUi::SieveImapAccountSettings>();
const auto sieveimapaccountsettings = parent->data(0, SIEVE_SERVER_IMAP_SETTINGS).value<KSieveUi::SieveImapAccountSettings>();
const QStringList currentCapabilities = parent->data(0, SIEVE_SERVER_CAPABILITIES).toStringList();
const QStringList listscript = parent->data(0, SIEVE_SERVER_LIST_SCRIPT).toStringList();
......
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