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

Port some foreach

parent d7561188
Pipeline #42885 passed with stage
in 13 minutes and 12 seconds
......@@ -33,7 +33,7 @@ void ConfigFile::create()
{
Q_EMIT info(i18n("Writing config file for %1...", m_name));
foreach (const Config &c, m_configData) {
for (const Config &c : qAsConst(m_configData)) {
KConfigGroup grp = m_config->group(c.group);
if (c.obscure) {
grp.writeEntry(c.key, KStringHandler::obscure(c.value));
......
......@@ -101,7 +101,8 @@ int main(int argc, char **argv)
qCDebug(ACCOUNTWIZARD_LOG) << "Domains" << ispdb.relevantDomains();
qCDebug(ACCOUNTWIZARD_LOG) << "Name" << ispdb.name(Ispdb::Long) << "(" << ispdb.name(Ispdb::Short) << ")";
qCDebug(ACCOUNTWIZARD_LOG) << "Imap servers:";
foreach (const Server &s, ispdb.imapServers()) {
const auto imapServers = ispdb.imapServers();
for (const Server &s : imapServers) {
qCDebug(ACCOUNTWIZARD_LOG) << "\thostname:" << s.hostname
<< "- port:" << s.port
<< "- encryption:" << socketTypeToStr(s.socketType)
......@@ -109,7 +110,8 @@ int main(int argc, char **argv)
<< "- authentication:" << authTypeToStr(s.authentication);
}
qCDebug(ACCOUNTWIZARD_LOG) << "pop3 servers:";
foreach (const Server &s, ispdb.pop3Servers()) {
const auto pop3Servers = ispdb.pop3Servers();
for (const Server &s : pop3Servers) {
qCDebug(ACCOUNTWIZARD_LOG) << "\thostname:" << s.hostname
<< "- port:" << s.port
<< "- encryption:" << socketTypeToStr(s.socketType)
......@@ -117,7 +119,8 @@ int main(int argc, char **argv)
<< "- authentication:" << authTypeToStr(s.authentication);
}
qCDebug(ACCOUNTWIZARD_LOG) << "smtp servers:";
foreach (const Server &s, ispdb.smtpServers()) {
const auto smtpServers = ispdb.smtpServers();
for (const Server &s : smtpServers) {
qCDebug(ACCOUNTWIZARD_LOG) << "\thostname:" << s.hostname
<< "- port:" << s.port
<< "- encryption:" << socketTypeToStr(s.socketType)
......
......@@ -97,7 +97,7 @@ void ProviderPage::leavePageNext()
qCDebug(ACCOUNTWIZARD_LOG) << "Item selected:" << item->text();
// download and execute it...
foreach (const KNSCore::EntryInternal &e, m_providerEntries) {
for (const KNSCore::EntryInternal &e : qAsConst(m_providerEntries)) {
if (e.uniqueId() == item->data(Qt::UserRole)
&& e.providerId() == item->data(Qt::UserRole + 1)) {
m_wantedProvider.entryId = e.uniqueId();
......
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