[Development] Need suggestion for a new API

Peter Hartmann phartmann at blackberry.com
Fri Jan 31 14:42:19 CET 2014


On 01/31/2014 01:47 PM, Mandeep Sandhu wrote:
> (...)
> The QNAM setting can be a simple bool which defaults to 'false' if not
> explicitly set by the user. However, the request level setting needs 3
> states - true (follow redirects), false (don't follow) and unset (use
> global setting).

How about enabling the setting on a per-request basis first? In that 
case, the normal way would be to add a new value to the 
QNetworkRequest::Attribute enum, and a boolean would be enough I think.

In general I also think it would be a good thing to have a way of 
setting such things globally in QNetworkAccessManager, but that would 
require some more API in that class then...

So maybe we could have 2 commits: One that enables redirect settings on 
a request first, and then introduce global QNetworkAccessManager 
settings (which might be some more work)...

Peter



More information about the Development mailing list