Commit 2bff6bfe authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Optimization

parent bc550a78
Pipeline #42004 passed with stage
in 10 minutes and 37 seconds
...@@ -417,8 +417,10 @@ void TransportManagerPrivate::readConfig() ...@@ -417,8 +417,10 @@ void TransportManagerPrivate::readConfig()
} }
Transport *t = nullptr; Transport *t = nullptr;
// see if we happen to have that one already // see if we happen to have that one already
const QString capturedString = match.captured(1);
const QString checkString = QLatin1String("Transport ") + capturedString;
for (Transport *old : oldTransports) { for (Transport *old : oldTransports) {
if (old->currentGroup() == QLatin1String("Transport ") + match.captured(1)) { if (old->currentGroup() == checkString) {
qCDebug(MAILTRANSPORT_LOG) << "reloading existing transport:" << s; qCDebug(MAILTRANSPORT_LOG) << "reloading existing transport:" << s;
t = old; t = old;
t->load(); t->load();
...@@ -428,7 +430,7 @@ void TransportManagerPrivate::readConfig() ...@@ -428,7 +430,7 @@ void TransportManagerPrivate::readConfig()
} }
if (!t) { if (!t) {
t = new Transport(match.captured(1)); t = new Transport(capturedString);
} }
if (t->id() <= 0) { if (t->id() <= 0) {
t->setId(createId()); t->setId(createId());
......
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