×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    How to set proxy for Nokia Qt SDK Simulator

    How to set proxy for Nokia Qt SDK Simulator?

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: How to set proxy for Nokia Qt SDK Simulator

    Quote Originally Posted by kamalakshan View Post
    How to set proxy for Nokia Qt SDK Simulator?
    As far as I know there is no way.
    So you coulld set an application proxy using http://doc.qt.nokia.com/4.6/qnetwork...plicationProxy
    Last edited by gnuton; 2010-06-30 at 14:03.

  3. #3
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to set proxy for Nokia Qt SDK Simulator

    Wonder how come they missed such an important feature.

  4. #4
    Registered User
    Join Date
    Mar 2009
    Posts
    16

    Re: How to set proxy for Nokia Qt SDK Simulator

    The simulator accepts the system proxy settings just like any other application. What is your use case for separate proxy settings in the simulator?

    PS: Note that in order to make use of proxys in Qt applications (no matter the platform, i.e. wether on the device or in the simulator) with QNetworkAccessManager, you need to set

    Code:
    QNetworkProxyFactory::setUseSystemConfiguration(true);
    in the main() function before using any networking functionality.
    Last edited by danimo; 2010-06-30 at 13:48.

  5. #5
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to set proxy for Nokia Qt SDK Simulator

    In my case the simulator is not accepting system proxy settings. Is there any example with which I can test it.

  6. #6
    Super Contributor
    Join Date
    Dec 2005
    Location
    England,UK
    Posts
    1,600

    Re: How to set proxy for Nokia Qt SDK Simulator

    Quote Originally Posted by kamalakshan View Post
    In my case the simulator is not accepting system proxy settings. Is there any example with which I can test it.
    The example you need to use is Google Chat it in the Nokia Qt SDK examples at path C:\NokiaQtSDK\Examples\4.6\webkit\googlechat

    in main.cpp the code is

    Code:
    #include <QtGui>
    #include <QNetworkProxyFactory>
    #include "googlechat.h"
    
    int main(int argc, char * argv[])
    {
        QApplication app(argc, argv);
    
        QNetworkProxyFactory::setUseSystemConfiguration(true);
    
        GoogleChat chat;
        chat.show();
        return app.exec();
    }
    Thanks

    Jim

  7. #7
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: How to set proxy for Nokia Qt SDK Simulator

    So won't it work with out the line

    QNetworkProxyFactory::setUseSystemConfiguration(true);

    Is it always required.

  8. #8
    Super Contributor
    Join Date
    Dec 2005
    Location
    England,UK
    Posts
    1,600

    Re: How to set proxy for Nokia Qt SDK Simulator

    Quote Originally Posted by kamalakshan View Post
    So won't it work with out the line

    QNetworkProxyFactory::setUseSystemConfiguration(true);

    Is it always required.
    Reading the manual/docs seems so see http://doc.qt.nokia.com/4.6-snapshot...xyfactory.html
    void QNetworkProxyFactory::setUseSystemConfiguration ( bool enable ) [static]

    If you remove this line in the example this fails.

    Enables the use of the platform-specific proxy settings, and only those. See systemProxyForQuery() for more information.

    Internally, this method (when called with enable set to true) sets an application-wide proxy factory. For this reason, this method is mutually exclusive with setApplicationProxyFactory: calling setApplicationProxyFactory overrides the use of the system-wide proxy, and calling setUseSystemConfiguration overrides any application proxy or proxy factory that was previously set.

    This function was introduced in Qt 4.6.
    as you will see this is new for Qt 4.6 so old code will need converting this would seem

    From the source code for Qt 4.5 you can see this did not exist in Qt 4.5. Qt 4.5 chose to implement transparent "basic" proxy.
    Code:
       \since 4.4
    
        Returns true if this proxy supports transparent tunneling of TCP
        connections. This matches the QNetworkProxy::TunnelingCapability
        capability.
    
        In Qt 4.4, the capability was tied to the proxy type, but since Qt
        4.5 it is possible to remove the capability of caching from a
        proxy by calling setCapabilities().
    
        \sa capabilities(), type(), isCachingProxy()
    */
    00566 bool QNetworkProxy::isTransparentProxy() const
    {
        return capabilities() & TunnelingCapability;
    To add to the problems Microsoft changed the way product Proxy server worked therefore causing Qt to fail and this is most likely why changes were made
    Jim

Similar Threads

  1. Replies: 3
    Last Post: 2010-06-30, 01:17
  2. Nokia Qt SDK, QT Simulator and virtual keyboards
    By donald@anasim.com in forum [Archived] Qt SDKs and Tools
    Replies: 0
    Last Post: 2010-05-29, 09:33
  3. [Nokia Qt SDK] Qt Simulator does not update UI
    By pixsta in forum [Archived] Qt SDKs and Tools
    Replies: 10
    Last Post: 2010-05-19, 21:54
  4. Nokia Qt SDK Simulator and maemo5 Hildon style
    By petriku in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-05-06, 21:09
  5. How to set http proxy in emulator? My sdk is Gadget
    By bellshine in forum PC Suite API and PC Connectivity SDK
    Replies: 0
    Last Post: 2008-12-05, 07:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •