From 7eca53b51a2c7cae0b39fedb0b78205504bfd64b Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Mon, 7 May 2012 11:10:29 +0200 Subject: Doc: Modularize QtNetwork documentation. This change moves the snippets and imagesto the modularized directories. Change-Id: If14912692a7f72d7de345eaf88d9ec9752310fca Reviewed-by: Marius Storm-Olsen --- src/network/kernel/qdnslookup.cpp | 4 ++-- src/network/kernel/qhostaddress.cpp | 2 +- src/network/kernel/qhostinfo.cpp | 12 ++++++------ src/network/kernel/qnetworkproxy.cpp | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/network/kernel') diff --git a/src/network/kernel/qdnslookup.cpp b/src/network/kernel/qdnslookup.cpp index 7a1d4e45de..a826422978 100644 --- a/src/network/kernel/qdnslookup.cpp +++ b/src/network/kernel/qdnslookup.cpp @@ -171,11 +171,11 @@ static void qt_qdnsservicerecord_sort(QList &records) For example, you can determine which servers an XMPP chat client should connect to for a given domain with: - \snippet doc/src/snippets/code/src_network_kernel_qdnslookup.cpp 0 + \snippet code/src_network_kernel_qdnslookup.cpp 0 Once the request finishes you can handle the results with: - \snippet doc/src/snippets/code/src_network_kernel_qdnslookup.cpp 1 + \snippet code/src_network_kernel_qdnslookup.cpp 1 \note If you simply want to find the IP address(es) associated with a host name, or the host name associated with an IP address you should use diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp index 56473e2982..3ca0f84c39 100644 --- a/src/network/kernel/qhostaddress.cpp +++ b/src/network/kernel/qhostaddress.cpp @@ -644,7 +644,7 @@ QAbstractSocket::NetworkLayerProtocol QHostAddress::protocol() const Returns the IPv6 address as a Q_IPV6ADDR structure. The structure consists of 16 unsigned characters. - \snippet doc/src/snippets/code/src_network_kernel_qhostaddress.cpp 0 + \snippet code/src_network_kernel_qhostaddress.cpp 0 This value is valid if the protocol() is \l{QAbstractSocket::}{IPv6Protocol}. diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index 085f2f6651..32cf90145c 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -83,7 +83,7 @@ Q_GLOBAL_STATIC(QHostInfoLookupManager, theHostInfoLookupManager) Example: - \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 0 + \snippet code/src_network_kernel_qhostinfo.cpp 0 The slot is invoked when the results are ready. The results are @@ -97,7 +97,7 @@ Q_GLOBAL_STATIC(QHostInfoLookupManager, theHostInfoLookupManager) If you want a blocking lookup, use the QHostInfo::fromName() function: - \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 1 + \snippet code/src_network_kernel_qhostinfo.cpp 1 QHostInfo supports Internationalized Domain Names (IDNs) through the IDNA and Punycode standards. @@ -126,12 +126,12 @@ static QBasicAtomicInt theIdCounter = Q_BASIC_ATOMIC_INITIALIZER(1); The lookup is performed by a single function call, for example: - \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 2 + \snippet code/src_network_kernel_qhostinfo.cpp 2 The implementation of the slot prints basic information about the addresses returned by the lookup, or reports an error if it failed: - \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 3 + \snippet code/src_network_kernel_qhostinfo.cpp 3 If you pass a literal IP address to \a name instead of a host name, QHostInfo will search for the domain name for the IP (i.e., QHostInfo will @@ -139,7 +139,7 @@ static QBasicAtomicInt theIdCounter = Q_BASIC_ATOMIC_INITIALIZER(1); contain both the resolved domain name and IP addresses for the host name. Example: - \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 4 + \snippet code/src_network_kernel_qhostinfo.cpp 4 \note There is no guarantee on the order the signals will be emitted if you start multiple requests with lookupHost(). @@ -311,7 +311,7 @@ QHostInfo::~QHostInfo() Example: - \snippet doc/src/snippets/code/src_network_kernel_qhostinfo.cpp 5 + \snippet code/src_network_kernel_qhostinfo.cpp 5 \sa hostName(), error() */ diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp index 6c1ee0ef42..50bf670e7e 100644 --- a/src/network/kernel/qnetworkproxy.cpp +++ b/src/network/kernel/qnetworkproxy.cpp @@ -59,14 +59,14 @@ network-enabled applications that you have written should automatically support network proxy using the following code. - \snippet doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp 0 + \snippet code/src_network_kernel_qnetworkproxy.cpp 0 An alternative to setting an application wide proxy is to specify the proxy for individual sockets using QAbstractSocket::setProxy() and QTcpServer::setProxy(). In this way, it is possible to disable the use of a proxy for specific sockets using the following code: - \snippet doc/src/snippets/code/src_network_kernel_qnetworkproxy.cpp 1 + \snippet code/src_network_kernel_qnetworkproxy.cpp 1 Network proxy is not used if the address used in \l {QAbstractSocket::connectToHost()}{connectToHost()}, \l @@ -800,7 +800,7 @@ QList QNetworkProxy::rawHeaderList() const the corresponding "cooked" header will be set as well. For example: - \snippet doc/src/snippets/code/src_network_access_qnetworkrequest.cpp 0 + \snippet code/src_network_access_qnetworkrequest.cpp 0 will also set the known header LastModifiedHeader to be the QDateTime object of the parsed date. -- cgit v1.2.3