Commit 2366a812 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

GIT_SILENT: we depend against c++17

parent 5f549b46
Pipeline #68621 skipped
......@@ -148,7 +148,7 @@ bool FakeServer::isAllScenarioDone() const
{
QMutexLocker locker(&m_mutex);
for (const auto &scenario : qAsConst(m_scenarios)) {
for (const auto &scenario : std::as_const(m_scenarios)) {
if (!scenario.isEmpty()) {
qDebug() << scenario;
return false;
......
......@@ -78,7 +78,7 @@ public:
}
ui.authCombo->clear();
for (int authType : qAsConst(capa)) {
for (int authType : std::as_const(capa)) {
addAuthenticationItem(ui.authCombo, authType);
}
......
......@@ -113,7 +113,7 @@ void ServerTestPrivate::finalResult()
QVector<int> resultsAsVector;
resultsAsVector.reserve(connectionResults.size());
for (int res : qAsConst(connectionResults)) {
for (int res : std::as_const(connectionResults)) {
resultsAsVector.append(res);
}
......
......@@ -151,7 +151,7 @@ TransportManager *TransportManager::self()
Transport *TransportManager::transportById(int id, bool def) const
{
for (Transport *t : qAsConst(d->transports)) {
for (Transport *t : std::as_const(d->transports)) {
if (t->id() == id) {
return t;
}
......@@ -165,7 +165,7 @@ Transport *TransportManager::transportById(int id, bool def) const
Transport *TransportManager::transportByName(const QString &name, bool def) const
{
for (Transport *t : qAsConst(d->transports)) {
for (Transport *t : std::as_const(d->transports)) {
if (t->name() == name) {
return t;
}
......@@ -324,7 +324,7 @@ QVector<int> TransportManager::transportIds() const
{
QVector<int> rv;
rv.reserve(d->transports.count());
for (Transport *t : qAsConst(d->transports)) {
for (Transport *t : std::as_const(d->transports)) {
rv << t->id();
}
return rv;
......@@ -334,7 +334,7 @@ QStringList TransportManager::transportNames() const
{
QStringList rv;
rv.reserve(d->transports.count());
for (Transport *t : qAsConst(d->transports)) {
for (Transport *t : std::as_const(d->transports)) {
rv << t->name();
}
return rv;
......@@ -521,7 +521,7 @@ int TransportManagerPrivate::createId() const
{
QVector<int> usedIds;
usedIds.reserve(1 + transports.count());
for (Transport *t : qAsConst(transports)) {
for (Transport *t : std::as_const(transports)) {
usedIds << t->id();
}
usedIds << 0; // 0 is default for unknown
......@@ -574,7 +574,7 @@ void TransportManagerPrivate::prepareWallet()
void TransportManager::loadPasswords()
{
for (Transport *t : qAsConst(d->transports)) {
for (Transport *t : std::as_const(d->transports)) {
t->readPassword();
}
......@@ -594,7 +594,7 @@ void TransportManager::loadPasswordsAsync()
// check if there is anything to do at all
bool found = false;
for (Transport *t : qAsConst(d->transports)) {
for (Transport *t : std::as_const(d->transports)) {
if (!t->isComplete()) {
found = true;
break;
......@@ -673,7 +673,7 @@ void TransportManagerPrivate::migrateToWallet()
// check if migration is needed
QStringList names;
for (Transport *t : qAsConst(transports)) {
for (Transport *t : std::as_const(transports)) {
if (t->needsWalletMigration()) {
names << t->name();
}
......@@ -700,7 +700,7 @@ void TransportManagerPrivate::migrateToWallet()
}
// perform migration
for (Transport *t : qAsConst(transports)) {
for (Transport *t : std::as_const(transports)) {
if (t->needsWalletMigration()) {
t->migrateToWallet();
}
......
......@@ -57,7 +57,7 @@ void FilterActionJob::Private::traverseItems()
{
Q_ASSERT(functor);
qCDebug(MAILTRANSPORTAKONADI_LOG) << "Traversing" << items.count() << "items.";
for (const Item &item : qAsConst(items)) {
for (const Item &item : std::as_const(items)) {
if (functor->itemAccepted(item)) {
functor->itemAction(item, q);
qCDebug(MAILTRANSPORTAKONADI_LOG) << "Added subjob for item" << item.id();
......
......@@ -120,7 +120,7 @@ QByteArray SentActionAttribute::serialized() const
{
QVariantList list;
list.reserve(d->mActions.count());
for (const Action &action : qAsConst(d->mActions)) {
for (const Action &action : std::as_const(d->mActions)) {
QVariantMap map;
map.insert(QString::number(action.type()), action.value());
......@@ -145,7 +145,7 @@ void SentActionAttribute::deserialize(const QByteArray &data)
QVariantList list;
stream >> list;
for (const QVariant &variant : qAsConst(list)) {
for (const QVariant &variant : std::as_const(list)) {
const QVariantMap map = variant.toMap();
QMap<QString, QVariant>::const_iterator it = map.cbegin();
const QMap<QString, QVariant>::const_iterator itEnd = map.cend();
......
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