Results 1 to 4 of 4

Thread: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguration()

  1. #1
    Join Date
    Jun 2006
    Posts
    81
    Thanks
    6
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguration()

    Consider the following code fragment:
    Qt Code:
    1. QNetworkProxyFactory::setUseSystemConfiguration(true);
    2.  
    3. QNetworkAccessManager manager;
    4. QNetworkProxy::ProxyType type = manager.proxy().type(); //DefaultProxy
    5. QNetworkProxyFactory *factory = manager.proxyFactory(); //0x0
    To copy to clipboard, switch view to plain text mode 
    I'd expect QNetworkAccessManager to obey the internal global QNetworkProxyFactory created by QNetworkProxyFactory::setUseSystemConfiguration(true), but it doesn't.
    (Observed on Windows - don't know if that matters.)

    Is this a bug or a feature? If a feature, what might be the reasoning?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguratio

    How have you verified that it does not use the global default proxy provided by QNetworkProxyFactory? All you have verified there is that there has been no specific proxy set on the QNetworkAccessManager, and it even tells you that it is using the default proxy.

  3. #3
    Join Date
    Jun 2006
    Posts
    81
    Thanks
    6
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguratio

    I thought I have, first by assessing the application's reaction to various proxy settings, then by peeking QtNetwork sources and debugging into. I probably wasn't sufficiently thorough, though. I'll make up leeway, then return here.

  4. #4
    Join Date
    Jun 2006
    Posts
    81
    Thanks
    6
    Thanked 5 Times in 4 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QNetworkAccessManager doesn't obey QNetworkProxyFactory::setUseSystemConfiguratio

    Hmm, looks like I was rash.
    Qt Code:
    1. QNetworkProxyFactory::setUseSystemConfiguration(true);
    To copy to clipboard, switch view to plain text mode 
    indeed seems to work as expected.

    Thx for making me backpedal and reassess.

    (I'll content myself with empiricism for now...)

Similar Threads

  1. Query : QNetworkProxyFactory::systemProxyForQuery()
    By Viraj Bhatt in forum Qt Programming
    Replies: 0
    Last Post: 12th December 2012, 09:30
  2. Replies: 4
    Last Post: 29th April 2011, 14:44
  3. Replies: 0
    Last Post: 7th August 2010, 10:55
  4. QNetworkAccessManager and QHttp doesn't sends anything
    By corrado in forum Qt Programming
    Replies: 2
    Last Post: 29th May 2010, 23:20
  5. QNetworkAccessManager doesn't work
    By Floppy in forum Newbie
    Replies: 7
    Last Post: 14th November 2009, 17:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.