summaryrefslogtreecommitdiffstats
path: root/src/network/access
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2012-05-07 11:10:29 +0200
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2012-05-09 08:35:43 +0200
commit7eca53b51a2c7cae0b39fedb0b78205504bfd64b (patch)
tree61d62785fd0035af3b55ddc745b7d466125bda59 /src/network/access
parent9fde9ab167e52948d337de7fb7b871f7a1d75f43 (diff)
Doc: Modularize QtNetwork documentation.
This change moves the snippets and imagesto the modularized directories. Change-Id: If14912692a7f72d7de345eaf88d9ec9752310fca Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'src/network/access')
-rw-r--r--src/network/access/qftp.cpp8
-rw-r--r--src/network/access/qhttpmultipart.cpp8
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp12
-rw-r--r--src/network/access/qnetworkdiskcache.cpp6
-rw-r--r--src/network/access/qnetworkreply.cpp2
-rw-r--r--src/network/access/qnetworkrequest.cpp2
6 files changed, 19 insertions, 19 deletions
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index ba30ad08ba..324126baae 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1361,7 +1361,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
e.g. if you want to connect and login to a FTP server. This is
simply achieved:
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 0
+ \snippet code/src_network_access_qftp.cpp 0
In this case two FTP commands have been scheduled. When the last
scheduled command has finished, a done() signal is emitted with
@@ -1379,12 +1379,12 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
Example: If you want to download the INSTALL file from the Qt
FTP server, you would write this:
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 1
+ \snippet code/src_network_access_qftp.cpp 1
For this example the following sequence of signals is emitted
(with small variations, depending on network traffic, etc.):
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 2
+ \snippet code/src_network_access_qftp.cpp 2
The dataTransferProgress() signal in the above example is useful
if you want to show a \link QProgressBar progress bar \endlink to
@@ -1397,7 +1397,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
If the login fails for the above example, the signals would look
like this:
- \snippet doc/src/snippets/code/src_network_access_qftp.cpp 3
+ \snippet code/src_network_access_qftp.cpp 3
You can then get details about the error with the error() and
errorString() functions.
diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp
index 27164d69ae..ca7e2f6be8 100644
--- a/src/network/access/qhttpmultipart.cpp
+++ b/src/network/access/qhttpmultipart.cpp
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
and a data block, which are separated by each other by two
consecutive new lines. An example for one part would be:
- \snippet doc/src/snippets/code/src_network_access_qhttppart.cpp 0
+ \snippet code/src_network_access_qhttppart.cpp 0
For setting headers, use setHeader() and setRawHeader(), which behave
exactly like QNetworkRequest::setHeader() and QNetworkRequest::setRawHeader().
@@ -77,12 +77,12 @@ QT_BEGIN_NAMESPACE
To construct a QHttpPart with a small body, consider the following snippet
(this produces the data shown in the example above):
- \snippet doc/src/snippets/code/src_network_access_qhttppart.cpp 1
+ \snippet code/src_network_access_qhttppart.cpp 1
To construct a QHttpPart reading from a device (e.g. a file), the following
can be applied:
- \snippet doc/src/snippets/code/src_network_access_qhttppart.cpp 2
+ \snippet code/src_network_access_qhttppart.cpp 2
Be aware that QHttpPart does not take ownership of the device when set, so
it is the developer's responsibility to destroy it when it is not needed anymore.
@@ -226,7 +226,7 @@ void QHttpPart::setBodyDevice(QIODevice *device)
As an example, consider the following code snippet, which constructs a multipart
message containing a text part followed by an image part:
- \snippet doc/src/snippets/code/src_network_access_qhttpmultipart.cpp 0
+ \snippet code/src_network_access_qhttpmultipart.cpp 0
\sa QHttpPart, QNetworkAccessManager::post()
*/
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index b539ed4d9a..66d8a66b43 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -178,7 +178,7 @@ static void ensureInitialized()
returned in response to the corresponding request.
A simple download off the network could be accomplished with:
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 0
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 0
QNetworkAccessManager has an asynchronous API.
When the \tt replyFinished slot above is called, the parameter it
@@ -197,7 +197,7 @@ static void ensureInitialized()
A more involved example, assuming the manager is already existent,
can be:
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 1
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 1
\section1 Network and Roaming support
@@ -283,11 +283,11 @@ static void ensureInitialized()
By default the value of this property reflects the physical state of the device. Applications
may override it to disable all network requests via this network access manager by calling
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 4
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 4
Network requests can be reenabled again by calling
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 5
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 5
\note Calling setNetworkAccessible() does not change the network state.
*/
@@ -805,12 +805,12 @@ QNetworkReply *QNetworkAccessManager::deleteResource(const QNetworkRequest &requ
To restore the default network configuration set the network configuration to the value
returned from QNetworkConfigurationManager::defaultConfiguration().
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 2
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 2
If an invalid network configuration is set, a network session will not be created. In this
case network requests will be processed regardless, but may fail. For example:
- \snippet doc/src/snippets/code/src_network_access_qnetworkaccessmanager.cpp 3
+ \snippet code/src_network_access_qnetworkaccessmanager.cpp 3
\sa configuration(), QNetworkSession
*/
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index bcaf81a6a0..0a1d43f70f 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -88,17 +88,17 @@ QT_BEGIN_NAMESPACE
A network disk cache can be enabled by:
- \snippet doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp 0
+ \snippet code/src_network_access_qnetworkdiskcache.cpp 0
When sending requests, to control the preference of when to use the cache
and when to use the network, consider the following:
- \snippet doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp 1
+ \snippet code/src_network_access_qnetworkdiskcache.cpp 1
To check whether the response came from the cache or from the network, the
following can be applied:
- \snippet doc/src/snippets/code/src_network_access_qnetworkdiskcache.cpp 2
+ \snippet code/src_network_access_qnetworkdiskcache.cpp 2
*/
/*!
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index aefe07223f..3b6ec5d4b5 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -616,7 +616,7 @@ void QNetworkReply::setSslConfiguration(const QSslConfiguration &config)
If, for instance, you want to issue a request to a server that uses
a self-signed certificate, consider the following snippet:
- \snippet doc/src/snippets/code/src_network_access_qnetworkreply.cpp 0
+ \snippet code/src_network_access_qnetworkreply.cpp 0
Multiple calls to this function will replace the list of errors that
were passed in previous calls.
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index 1c8655e9ae..9df06328a1 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -487,7 +487,7 @@ QList<QByteArray> QNetworkRequest::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.