diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-22 12:25:41 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-06-26 14:42:43 +0200 |
commit | 0e6f6507d5920e2566f790007b97bda6441ec577 (patch) | |
tree | 6b857694bbf1cce37dba4aec3f0267135cc480a4 /src/network/access/qhsts.cpp | |
parent | db61e43c81f4b5ed8c36365f63c2e2fb81e2a1e7 (diff) |
Use QList instead of QVector in network
Task-number: QTBUG-84469
Change-Id: I7827da68e73ca8ff1e599c836f2157894c452b63
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qhsts.cpp')
-rw-r--r-- | src/network/access/qhsts.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/network/access/qhsts.cpp b/src/network/access/qhsts.cpp index e473008305..99c4c605dd 100644 --- a/src/network/access/qhsts.cpp +++ b/src/network/access/qhsts.cpp @@ -40,7 +40,6 @@ #include "qhsts_p.h" #include "QtCore/private/qipaddress_p.h" -#include "QtCore/qvector.h" #include "QtCore/qlist.h" #if QT_CONFIG(settings) @@ -93,7 +92,7 @@ void QHstsCache::updateFromHeaders(const QList<QPair<QByteArray, QByteArray>> &h } } -void QHstsCache::updateFromPolicies(const QVector<QHstsPolicy> &policies) +void QHstsCache::updateFromPolicies(const QList<QHstsPolicy> &policies) { for (const auto &policy : policies) updateKnownHost(policy.host(), policy.expiry(), policy.includesSubDomains()); @@ -227,9 +226,9 @@ void QHstsCache::clear() knownHosts.clear(); } -QVector<QHstsPolicy> QHstsCache::policies() const +QList<QHstsPolicy> QHstsCache::policies() const { - QVector<QHstsPolicy> values; + QList<QHstsPolicy> values; values.reserve(int(knownHosts.size())); for (const auto &host : knownHosts) values << host.second; @@ -250,7 +249,7 @@ void QHstsCache::setStore(QHstsStore *store) // (and thus the cached policy takes priority over whatever policy we // had in the store for the same host, if any). if (knownHosts.size()) { - const QVector<QHstsPolicy> observed(policies()); + const QList<QHstsPolicy> observed(policies()); for (const auto &policy : observed) hstsStore->addToObserved(policy); hstsStore->synchronize(); @@ -260,7 +259,7 @@ void QHstsCache::setStore(QHstsStore *store) // the store knows about (well, it can happen we synchronize again as a // result if some policies managed to expire or if we add a new one // from the store to cache): - const QVector<QHstsPolicy> restored(store->readPolicies()); + const QList<QHstsPolicy> restored(store->readPolicies()); updateFromPolicies(restored); } } |