46 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
48 request.setRawHeader( ite.key().toUtf8(), ite.value().toString().toUtf8() );
55 QString keyFixed = key;
56 if ( !keyFixed.isEmpty() && !keyFixed.endsWith(
"/" ) )
57 keyFixed = keyFixed +
"/";
59 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
61 settings.
setValue( keyHH + ite.key(), ite.value() );
64 if ( !mHeaders[
"referer"].toString().isEmpty() && settings.
contains( keyFixed +
"referer" ) )
66 settings.
setValue( keyFixed +
"referer", mHeaders[
"referer"].toString() );
72 QString keyFixed = key;
73 if ( !keyFixed.isEmpty() && !keyFixed.endsWith(
"/" ) )
74 keyFixed = keyFixed +
"/";
77 for (
auto ite =
keys.cbegin(); ite !=
keys.cend(); ++ite )
79 if ( ite->startsWith( keyHH ) )
81 QString name = ite->right( ite->size() - keyHH.size() );
82 mHeaders.insert( name, settings.
value( *ite ).toString() );
85 if ( mHeaders[
"referer"].toString().isEmpty() )
87 mHeaders[
"referer"] = settings.
value( keyFixed +
"referer" ).toString();
110 return mHeaders.keys();
This class is a composition of two QSettings instances:
QVariant value(const QString &key, const QVariant &defaultValue=QVariant(), Section section=NoSection) const
Returns the value for setting key.
bool contains(const QString &key, QgsSettings::Section section=QgsSettings::NoSection) const
Returns true if there exists a setting called key; returns false otherwise.
void setValue(const QString &key, const QVariant &value, QgsSettings::Section section=QgsSettings::NoSection)
Sets the value of setting key to value.
QStringList allKeys() const
Returns a list of all keys, including subkeys, that can be read using the QSettings object.