summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessmanager_p.h
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2018-09-13 12:59:59 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2018-09-24 11:49:05 +0000
commit4b7ff8e98c0208273a25d84e1f0322cad5bce2bf (patch)
treedeb2fa37984f56cc813ab7378185775eade6f5fa /src/network/access/qnetworkaccessmanager_p.h
parent4fc4f7b0ce0e6ee186a7d7fe9b5dd20e94efe432 (diff)
Protect HSTS code for no-feature-settings build
Under the hood we use QSettings to store HSTS policies. Qt configured with 'no feature settings' would fail to build then. For such builds, we fall back to in-memory only HSTS cache. Change-Id: I6df551d8c6c96d982080a51ce6b1bdce71d04b9f Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/access/qnetworkaccessmanager_p.h')
-rw-r--r--src/network/access/qnetworkaccessmanager_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/access/qnetworkaccessmanager_p.h b/src/network/access/qnetworkaccessmanager_p.h
index ffed24a314..5cab4928e4 100644
--- a/src/network/access/qnetworkaccessmanager_p.h
+++ b/src/network/access/qnetworkaccessmanager_p.h
@@ -56,7 +56,6 @@
#include "qnetworkaccesscache_p.h"
#include "qnetworkaccessbackend_p.h"
#include "qnetworkrequest.h"
-#include "qhstsstore_p.h"
#include "qhsts_p.h"
#include "private/qobject_p.h"
#include "QtNetwork/qnetworkproxy.h"
@@ -66,6 +65,10 @@
#include "QtNetwork/qnetworkconfigmanager.h"
#endif
+#if QT_CONFIG(settings)
+#include "qhstsstore_p.h"
+#endif // QT_CONFIG(settings)
+
QT_BEGIN_NAMESPACE
class QAuthenticator;
@@ -215,7 +218,9 @@ public:
Q_AUTOTEST_EXPORT static void clearConnectionCache(QNetworkAccessManager *manager);
QHstsCache stsCache;
+#if QT_CONFIG(settings)
QScopedPointer<QHstsStore> stsStore;
+#endif // QT_CONFIG(settings)
bool stsEnabled = false;
#ifndef QT_NO_BEARERMANAGEMENT