58 if (deserializePolicy(
key, restoredPolicy)) {
60 policies.
push_back(std::move(restoredPolicy));
81 if (observedPolicies.
size()) {
89 observedPolicies.
clear();
105 return dir.absoluteFilePath(
"hstsstore"_L1);
108void QHstsStore::beginHstsGroups()
110 store.
beginGroup(
"StrictTransportSecurity"_L1);
114void QHstsStore::endHstsGroups()
131 streamer >> expiryInMS;
134 bool includesSubDomains =
false;
135 streamer >> includesSubDomains;
140 policy.setIncludesSubDomains(includesSubDomains);
151 streamer <<
policy.expiry().toMSecsSinceEpoch();
152 streamer <<
policy.includesSubDomains();
161void QHstsStore::evictPolicy(
const QString &
key)
static QByteArray fromHex(const QByteArray &hexEncoded)
Returns a decoded copy of the hex encoded array hexEncoded.
QByteArray toHex(char separator='\0') const
Returns a hex encoded copy of the byte array.
\inmodule QtCore\reentrant
static QDateTime fromMSecsSinceEpoch(qint64 msecs, const QTimeZone &timeZone)
The QHstsPolicy class specifies that a host supports HTTP Strict Transport Security policy (HSTS).
void setHost(const QString &host, QUrl::ParsingMode mode=QUrl::DecodedMode)
Sets a host, host data is interpreted according to mode parameter.
QHstsStore(const QString &dirName)
void addToObserved(const QHstsPolicy &policy)
QList< QHstsPolicy > readPolicies()
static QString absoluteFilePath(const QString &dirName)
qsizetype size() const noexcept
void push_back(parameter_type t)
void endGroup()
Resets the group to what it was before the corresponding beginGroup() call.
bool contains(QAnyStringView key) const
Returns true if there exists a setting called key; returns false otherwise.
void setValue(QAnyStringView key, const QVariant &value)
Sets the value of setting key to value.
void remove(QAnyStringView key)
Removes the setting key and any sub-settings of key.
QVariant value(QAnyStringView key, const QVariant &defaultValue) const
Returns the value for setting key.
QStringList childKeys() const
Returns a list of all top-level keys that can be read using the QSettings object.
void sync()
Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in t...
bool isWritable() const
Returns true if settings can be written using this QSettings object; returns false otherwise.
void beginGroup(QAnyStringView prefix)
Appends prefix to the current group.
void setFallbacksEnabled(bool b)
Sets whether fallbacks are enabled to b.
static QString writableLocation(StandardLocation type)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
QByteArray toUtf8() const &
Combined button and popup list for selecting options.
static QString settings_key_to_host_name(const QString &key)
static QString host_name_to_settings_key(const QString &hostName)
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static QString absoluteFilePath(const Options *options, const QString &relativeFileName)