summaryrefslogtreecommitdiffstats
path: root/src/network/access/qhsts_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-05-25 13:12:51 +0200
committerLars Knoll <lars.knoll@qt.io>2020-06-10 09:09:36 +0200
commit122d66f69fa44e11202fccdab076fe1ec368f971 (patch)
tree07d6c3bca6a3be5f246fef74c9efd61e2fe18d8e /src/network/access/qhsts_p.h
parent4ab3089a2cbcc3b0656a36e9c22ca2d72e150c7e (diff)
Port QtNetwork from QStringRef to QStringView
Task-number: QTBUG-84319 Change-Id: I0f4e83c282b58ab4cc5e397b21981978f79d92cf Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network/access/qhsts_p.h')
-rw-r--r--src/network/access/qhsts_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/access/qhsts_p.h b/src/network/access/qhsts_p.h
index b5be4ff455..8ebf7294dd 100644
--- a/src/network/access/qhsts_p.h
+++ b/src/network/access/qhsts_p.h
@@ -94,18 +94,18 @@ private:
struct HostName
{
explicit HostName(const QString &n) : name(n) { }
- explicit HostName(const QStringRef &r) : fragment(r) { }
+ explicit HostName(QStringView r) : fragment(r) { }
bool operator < (const HostName &rhs) const
{
if (fragment.size()) {
if (rhs.fragment.size())
return fragment < rhs.fragment;
- return fragment < QStringRef(&rhs.name);
+ return fragment < QStringView{rhs.name};
}
if (rhs.fragment.size())
- return QStringRef(&name) < rhs.fragment;
+ return QStringView{name} < rhs.fragment;
return name < rhs.name;
}
@@ -114,7 +114,7 @@ private:
// name, removing subdomain names (such HostName object is 'transient', it
// must not outlive the original QString object.
QString name;
- QStringRef fragment;
+ QStringView fragment;
};
mutable std::map<HostName, QHstsPolicy> knownHosts;