diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-07-01 17:24:01 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-07-01 17:24:01 (GMT) |
commit | 745ecfd8925716d962c97a4415881377faf6bdd5 (patch) | |
tree | c4f78b3bd143af52372064cd3ba5c0ae440813c5 /src/network/kernel | |
parent | bda164303570629e44185e8baa52908ced6da301 (diff) | |
parent | 8968c79c575755cdb52d5e615ed19e4529047464 (diff) | |
download | Qt-745ecfd8925716d962c97a4415881377faf6bdd5.zip Qt-745ecfd8925716d962c97a4415881377faf6bdd5.tar.gz Qt-745ecfd8925716d962c97a4415881377faf6bdd5.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
bin/syncqt
src/gui/text/qtextlayout.cpp
tools/assistant/tools/assistant/helpviewer_qwv.cpp
tools/assistant/tools/assistant/helpviewer_qwv.h
tools/configure/configureapp.cpp
Diffstat (limited to 'src/network/kernel')
-rw-r--r-- | src/network/kernel/qhostinfo_unix.cpp | 14 | ||||
-rw-r--r-- | src/network/kernel/qnetworkproxy.cpp | 32 |
2 files changed, 41 insertions, 5 deletions
diff --git a/src/network/kernel/qhostinfo_unix.cpp b/src/network/kernel/qhostinfo_unix.cpp index 0c8caa0..b641711 100644 --- a/src/network/kernel/qhostinfo_unix.cpp +++ b/src/network/kernel/qhostinfo_unix.cpp @@ -208,12 +208,23 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) #ifdef Q_ADDRCONFIG hints.ai_flags = Q_ADDRCONFIG; #endif +#ifdef Q_OS_SYMBIAN +# ifdef QHOSTINFO_DEBUG + qDebug() << "Setting flags: 'hints.ai_flags &= AI_V4MAPPED | AI_ALL'"; +# endif +#endif int result = getaddrinfo(aceHostname.constData(), 0, &hints, &res); # ifdef Q_ADDRCONFIG if (result == EAI_BADFLAGS) { // if the lookup failed with AI_ADDRCONFIG set, try again without it hints.ai_flags = 0; +#ifdef Q_OS_SYMBIAN +# ifdef QHOSTINFO_DEBUG + qDebug() << "Setting flags: 'hints.ai_flags &= AI_V4MAPPED | AI_ALL'"; +# endif + hints.ai_flags &= AI_V4MAPPED | AI_ALL; +#endif result = getaddrinfo(aceHostname.constData(), 0, &hints, &res); } # endif @@ -222,6 +233,9 @@ QHostInfo QHostInfoAgent::fromName(const QString &hostName) addrinfo *node = res; QList<QHostAddress> addresses; while (node) { +#ifdef QHOSTINFO_DEBUG + qDebug() << "getaddrinfo node: flags:" << node->ai_flags << "family:" << node->ai_family << "ai_socktype:" << node->ai_socktype << "ai_protocol:" << node->ai_protocol << "ai_addrlen:" << node->ai_addrlen; +#endif if (node->ai_family == AF_INET) { QHostAddress addr; addr.setAddress(ntohl(((sockaddr_in *) node->ai_addr)->sin_addr.s_addr)); diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index ada9381..bc5a025 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -1138,6 +1138,20 @@ void QNetworkProxyQuery::setUrl(const QUrl &url) multiple connections, such as QNetworkAccessManager. When set on such object, the factory will be queried for sockets created by that framework only. + + \section1 System Proxies + + You can configure a factory to use the system proxy's settings. + Call the setUseSystemConfiguration() function with true to enable + this behavior, or false to disable it. + + Similarly, you can use a factory to make queries directly to the + system proxy by calling its systemProxyForQuery() function. + + \warning Depending on the configuration of the user's system, the + use of system proxy features on certain platforms may be subject + to limitations. The systemProxyForQuery() documentation contains a + list of these limitations for those platforms that are affected. */ /*! @@ -1159,17 +1173,20 @@ QNetworkProxyFactory::~QNetworkProxyFactory() /*! + \since 4.6 + Enables the use of the platform-specific proxy settings, and only those. See systemProxyForQuery() for more information. Internally, this method (when called with \a 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 + 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. - \since 4.6 + \note See the systemProxyForQuery() documentation for a list of + limitations related to the use of system proxies. */ void QNetworkProxyFactory::setUseSystemConfiguration(bool enable) { @@ -1264,8 +1281,13 @@ void QNetworkProxyFactory::setApplicationProxyFactory(QNetworkProxyFactory *fact function. Future versions of Qt may lift some of the limitations listed here. - On MacOS X, this function will ignore the Proxy Auto Configuration + \list + \o On MacOS X, this function will ignore the Proxy Auto Configuration settings, since it cannot execute the associated ECMAScript code. + + \o On Windows platforms, this function may take several seconds to + execute depending on the configuration of the user's system. + \endlist */ /*! |