Previously the cache was not enabled if the request had AlwaysNetwork
set. This removes the check for the CacheLoadControlAttribute when
checking if the cache should be enabled.
Task-number: QTBUG-15805
Change-Id: I3d0722fbc1e6c77c5b947a2af0a09e2de8f4f9df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
{
// check if we can save and if we're allowed to
if (!managerPrivate->networkCache
- || !request.attribute(QNetworkRequest::CacheSaveControlAttribute, true).toBool()
- || request.attribute(QNetworkRequest::CacheLoadControlAttribute,
- QNetworkRequest::PreferNetwork).toInt()
- == QNetworkRequest::AlwaysNetwork)
+ || !request.attribute(QNetworkRequest::CacheSaveControlAttribute, true).toBool())
return;
cacheEnabled = true;
}
{
// check if we can save and if we're allowed to
if (!networkCache()
- || !request.attribute(QNetworkRequest::CacheSaveControlAttribute, true).toBool()
- || request.attribute(QNetworkRequest::CacheLoadControlAttribute,
- QNetworkRequest::PreferNetwork).toInt()
- == QNetworkRequest::AlwaysNetwork)
+ || !request.attribute(QNetworkRequest::CacheSaveControlAttribute, true).toBool())
return;
cacheEnabled = true;
}