24 #include <QNetworkRequest>
26 #include <QDomElement>
63 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
65 request.setRawHeader( ite.key().toUtf8(), ite.value().toString().toUtf8() );
72 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
82 if ( !keyFixed.isEmpty() )
83 keyFixed = keyFixed +
"/";
87 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
89 settings.
setValue( keyHH + ite.key(), ite.value() );
100 for (
auto k : settings.
allKeys() )
101 if ( k.startsWith( keyFixed ) )
102 QgsLogger::debug( QString(
"updateSettings in settings: %1=%2" ).arg( k, settings.
value( k ).toString() ) );
109 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
124 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
143 if ( !keyFixed.isEmpty() )
144 keyFixed = keyFixed +
"/";
149 for (
auto k : settings.
allKeys() )
150 if ( k.startsWith( keyFixed ) )
151 QgsLogger::debug( QString(
"setFromSettings called: %1=%2" ).arg( k, settings.
value( k ).toString() ) );
156 for (
auto ite =
keys.cbegin(); ite !=
keys.cend(); ++ite )
158 if ( ite->startsWith( keyHH ) )
160 QString name = ite->right( ite->size() - keyHH.size() );
161 mHeaders.insert( name, settings.
value( *ite ).toString() );
171 for (
auto k : mHeaders.keys() )
172 QgsLogger::debug( QString(
"setFromSettings mHeaders[%1]=%2" ).arg( k, mHeaders[k].toString() ) );
178 const auto constQueryItems = uri.queryItems( QUrl::ComponentFormattingOption::FullyDecoded );
179 for (
const QPair<QString, QString> &item : constQueryItems )
181 const QString &key = item.first;
192 for (
auto ite = map.keyBegin(); ite != map.keyEnd(); ++ite )
198 mHeaders[
sanitizeKey( name )] = map [key].toString();
211 QDomNamedNodeMap attribs = el.attributes();
213 for (
int i = 0; i < attribs.length(); i++ )
215 QDomNode item = attribs.item( i );
216 QString key = item.nodeName();
234 for (
auto ite = mHeaders.constBegin(); ite != mHeaders.constEnd(); ++ite )
250 QString out = QDir::cleanPath( key );
273 return mHeaders.keys();