Commit 4eb42a2b authored by Laurent Montel's avatar Laurent Montel 😁

Port some code to for(...:...)

parent c9c9f79f
......@@ -78,7 +78,7 @@ TransportMgr::TransportMgr()
void TransportMgr::removeAllBtnClicked()
{
MailTransport::TransportManager *manager = MailTransport::TransportManager::self();
QList<Transport *> transports = manager->transports();
const QList<Transport *> transports = manager->transports();
for (int i = 0; i < transports.count(); i++) {
MailTransport::Transport *transport = transports.at(i);
qDebug() << transport->host();
......
......@@ -35,12 +35,12 @@ public:
{
}
Transport *transport;
QString sender;
QStringList to;
QStringList cc;
QStringList bcc;
QByteArray data;
Transport *transport;
QBuffer *buffer;
};
......
......@@ -583,7 +583,7 @@ void TransportManagerPrivate::prepareWallet()
void TransportManager::loadPasswords()
{
foreach (Transport *t, d->transports) {
for (Transport *t : qAsConst(d->transports)) {
t->readPassword();
}
......@@ -603,7 +603,7 @@ void TransportManager::loadPasswordsAsync()
// check if there is anything to do at all
bool found = false;
foreach (Transport *t, d->transports) {
for (Transport *t : qAsConst(d->transports)) {
if (!t->isComplete()) {
found = true;
break;
......@@ -706,7 +706,7 @@ void TransportManagerPrivate::migrateToWallet()
}
// perform migration
foreach (Transport *t, transports) {
for (Transport *t : qAsConst(transports)) {
if (t->needsWalletMigration()) {
t->migrateToWallet();
}
......
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