summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/src/ipc.qdoc12
-rw-r--r--doc/src/porting4-overview.qdoc6
-rw-r--r--doc/src/porting4.qdoc20
-rw-r--r--doc/src/qt4-network.qdoc10
-rw-r--r--doc/src/qtnetwork.qdoc18
-rw-r--r--doc/src/threads.qdoc13
-rw-r--r--src/corelib/xml/qxmlstream.cpp17
-rw-r--r--src/gui/widgets/qprogressbar.cpp9
-rw-r--r--src/network/access/qftp.cpp6
-rw-r--r--src/network/kernel/qauthenticator.cpp4
-rw-r--r--src/network/kernel/qnetworkproxy.cpp11
-rw-r--r--src/network/socket/qabstractsocket.cpp2
-rw-r--r--src/network/socket/qtcpsocket.cpp8
-rw-r--r--src/xml/sax/qxml.cpp18
-rw-r--r--tools/qdoc3/htmlgenerator.cpp14
15 files changed, 87 insertions, 81 deletions
diff --git a/doc/src/ipc.qdoc b/doc/src/ipc.qdoc
index 1349fde..1f9d36d 100644
--- a/doc/src/ipc.qdoc
+++ b/doc/src/ipc.qdoc
@@ -61,12 +61,12 @@
\section1 TCP/IP
- The cross-platform \l{QtNetwork} module
- provides classes that make network programming portable and
- easy. It offers high-level classes (e.g., QHttp, QFtp) that
- communicate using specific application-level protocols, and
- lower-level classes (e.g., QTcpSocket, QTcpServer, QSslSocket) for
- implementing protocols.
+ The cross-platform \l{QtNetwork} module provides classes that make
+ network programming portable and easy. It offers high-level
+ classes (e.g., QNetworkAccessManager, QFtp) that communicate using
+ specific application-level protocols, and lower-level classes
+ (e.g., QTcpSocket, QTcpServer, QSslSocket) for implementing
+ protocols.
\section1 Shared Memory
diff --git a/doc/src/porting4-overview.qdoc b/doc/src/porting4-overview.qdoc
index 3494c6d..3c3c085 100644
--- a/doc/src/porting4-overview.qdoc
+++ b/doc/src/porting4-overview.qdoc
@@ -195,9 +195,9 @@
QNetworkRequest, QNetworkReply, and QNetworkAccessManager documentation
for further details.
- It is also possible to perform operations on remote files
- through the QHttp and QFtp classes, and on local files with
- the QFile class.
+ It is also possible to perform operations on remote files through
+ the QNetworkAccessManager and QFtp classes, and on local files
+ with the QFile class.
\section2 SQL Cursors (QSqlCursor)
diff --git a/doc/src/porting4.qdoc b/doc/src/porting4.qdoc
index 2414c4d..963b918 100644
--- a/doc/src/porting4.qdoc
+++ b/doc/src/porting4.qdoc
@@ -1977,7 +1977,7 @@
\table
\header \o Qt 3 function \o Qt 4 equivalents
- \row \o QImageIO::description() \o QImageWriter::description()
+ \row \o QImageIO::description() \o QImageWriter::text()
\row \o QImageIO::fileName() \o QImageReader::fileName() and QImageWriter::fileName()
\row \o QImageIO::format() \o QImageReader::format() and QImageWriter::format()
\row \o QImageIO::gamma() \o QImageWriter::gamma()
@@ -1988,7 +1988,7 @@
\row \o QImageIO::parameters() \o N/A
\row \o QImageIO::quality() \o QImageWriter::quality()
\row \o QImageIO::read() \o QImageReader::read()
- \row \o QImageIO::setDescription() \o QImageWriter::setDescription()
+ \row \o QImageIO::setDescription() \o QImageWriter::setText()
\row \o QImageIO::setFileName() \o QImageReader::setFileName() and QImageWriter::setFileName()
\row \o QImageIO::setFormat() \o QImageReader::setFormat() and QImageWriter::setFormat()
\row \o QImageIO::setGamma() \o QImageWriter::setGamma()
@@ -2350,8 +2350,9 @@
Q3NetworkProtocolFactory<T>, and Q3NetworkOperation and have been
moved to the Qt3Support library.
- In Qt 4 applications, you can use classes like QFtp and QHttp
- directly to perform file-related actions on a remote host.
+ In Qt 4 applications, you can use classes like QFtp and
+ QNetworkAccessManager directly to perform file-related actions on
+ a remote host.
\section1 QObject
@@ -3241,12 +3242,11 @@
moved to the Qt3Support library. In Qt 4, there is no
direct equivalent to Q3SocketDevice:
- \list
- \o If you use Q3SocketDevice in a thread to perform blocking network
- I/O (a technique encouraged by the \e{Qt Quarterly} article
- \l{http://doc.trolltech.com/qq/qq09-networkthread.html}{Unblocking Networking}),
- you can now use QTcpSocket, QFtp, or QHttp instead, which can now be used from
- non-GUI threads.
+ \list \o If you use Q3SocketDevice in a thread to perform blocking
+ network I/O (a technique encouraged by the \e{Qt Quarterly}
+ article \l{http://doc.trolltech.com/qq/qq09-networkthread.html}
+ {Unblocking Networking}), you can now use QTcpSocket, QFtp, or
+ QNetworkAccessManager, which can be used from non-GUI threads.
\o If you use Q3SocketDevice for UDP, you can now use QUdpSocket instead.
diff --git a/doc/src/qt4-network.qdoc b/doc/src/qt4-network.qdoc
index 3b3091e..5e1999e 100644
--- a/doc/src/qt4-network.qdoc
+++ b/doc/src/qt4-network.qdoc
@@ -109,9 +109,10 @@
of programming, with the networking logic concentrated in one or
two functions instead of spread across multiple slots.
- QFtp and QHttp use QTcpSocket internally to implement the FTP and
- HTTP protocols. Both classes work asynchronously and can schedule
- (i.e., queue) requests.
+ QFtp and QNetworkAccessManager and its associated classes use
+ QTcpSocket internally to implement the FTP and HTTP protocols. The
+ classes work asynchronously and can schedule (i.e., queue)
+ requests.
The network module contains four helper classes: QHostAddress,
QHostInfo, QUrl, and QUrlInfo. QHostAddress stores an IPv4 or IPv6
@@ -198,8 +199,7 @@
level QNetworkProtocol and QUrlOperator abstraction has been
eliminated. These classes attempted the impossible (unify FTP and
HTTP under one roof), and unsurprisingly failed at that. Qt 4
- still provides QFtp and QHttp classes, but only with the more
- mature API that appeared in Qt 3.1.
+ still provides QFtp, and it also proveds the QNetworkAccessManager.
The QSocket class in Qt 3 has been renamed QTcpSocket. The new
class is reentrant and supports blocking. It's also easier to
diff --git a/doc/src/qtnetwork.qdoc b/doc/src/qtnetwork.qdoc
index 0443f0f..3802273 100644
--- a/doc/src/qtnetwork.qdoc
+++ b/doc/src/qtnetwork.qdoc
@@ -145,11 +145,11 @@
\l{QFtp::commandFinished()}{commandFinished()} signal with the
command ID for each command that is executed.
- \o \e{Data transfer progress indicators.} QFtp emits
- signals whenever data is transferred
- (QFtp::dataTransferProgress(), QHttp::dataReadProgress(), and
- QHttp::dataSendProgress()). You could connect these signals to
- QProgressBar::setProgress() or QProgressDialog::setProgress(),
+ \o \e{Data transfer progress indicators.} QFtp emits signals
+ whenever data is transferred (QFtp::dataTransferProgress(),
+ QNetworkReply::downloadProgress(), and
+ QNetworkReply::uploadProgress()). You could connect these signals
+ to QProgressBar::setProgress() or QProgressDialog::setProgress(),
for example.
\o \e{QIODevice support.} The class supports convenient
@@ -196,10 +196,10 @@
will then stop immediately.
QTcpSocket works asynchronously and emits signals to report status
- changes and errors, just like QHttp and QFtp. It relies on the
- event loop to detect incoming data and to automatically flush
- outgoing data. You can write data to the socket using
- QTcpSocket::write(), and read data using
+ changes and errors, just like QNetworkAccessManager and QFtp. It
+ relies on the event loop to detect incoming data and to
+ automatically flush outgoing data. You can write data to the
+ socket using QTcpSocket::write(), and read data using
QTcpSocket::read(). QTcpSocket represents two independent streams
of data: one for reading and one for writing.
diff --git a/doc/src/threads.qdoc b/doc/src/threads.qdoc
index 8469f51..067de5f 100644
--- a/doc/src/threads.qdoc
+++ b/doc/src/threads.qdoc
@@ -362,13 +362,12 @@
\section2 QObject Reentrancy
QObject is reentrant. Most of its non-GUI subclasses, such as
- QTimer, QTcpSocket, QUdpSocket, QHttp, QFtp, and QProcess, are
- also reentrant, making it possible to use these classes from
- multiple threads simultaneously. Note that these classes are
- designed to be created and used from within a single thread;
- creating an object in one thread and calling its functions from
- another thread is not guaranteed to work. There are three
- constraints to be aware of:
+ QTimer, QTcpSocket, QUdpSocket, QFtp, and QProcess, are also
+ reentrant, making it possible to use these classes from multiple
+ threads simultaneously. Note that these classes are designed to be
+ created and used from within a single thread; creating an object
+ in one thread and calling its functions from another thread is not
+ guaranteed to work. There are three constraints to be aware of:
\list
\o \e{The child of a QObject must always be created in the thread
diff --git a/src/corelib/xml/qxmlstream.cpp b/src/corelib/xml/qxmlstream.cpp
index 42ed04e..3e8f73e 100644
--- a/src/corelib/xml/qxmlstream.cpp
+++ b/src/corelib/xml/qxmlstream.cpp
@@ -334,12 +334,17 @@ QXmlStreamEntityResolver *QXmlStreamReader::entityResolver() const
from the PrematureEndOfDocumentError error and continues parsing the
new data with the next call to readNext().
- For example, if you read data from the network using QHttp, you
- would connect its \l{QHttp::readyRead()}{readyRead()} signal to a
- custom slot. In this slot, you read all available data with
- \l{QHttp::readAll()}{readAll()} and pass it to the XML stream reader
- using addData(). Then you call your custom parsing function that
- reads the XML events from the reader.
+ For example, if your application reads data from the network using a
+ \l{QNetworkAccessManager} {network access manager}, you would issue
+ a \l{QNetworkRequest} {network request} to the manager and receive a
+ \l{QNetworkReply} {network reply} in return. Since a QNetworkReply
+ is a QIODevice, you connect its \l{QNetworkReply::readyRead()}
+ {readyRead()} signal to a custom slot, e.g. \c{slotReadyRead()} in
+ the code snippet shown in the discussion for QNetworkAccessManager.
+ In this slot, you read all available data with
+ \l{QNetworkReply::readAll()} {readAll()} and pass it to the XML
+ stream reader using addData(). Then you call your custom parsing
+ function that reads the XML events from the reader.
\section1 Performance and memory consumption
diff --git a/src/gui/widgets/qprogressbar.cpp b/src/gui/widgets/qprogressbar.cpp
index 6593cd6..7e40c0d 100644
--- a/src/gui/widgets/qprogressbar.cpp
+++ b/src/gui/widgets/qprogressbar.cpp
@@ -190,10 +190,11 @@ bool QProgressBarPrivate::repaintRequired() const
with setValue(). The progress bar can be rewound to the
beginning with reset().
- If minimum and maximum both are set to 0, the bar shows a busy indicator
- instead of a percentage of steps. This is useful, for example, when using
- QFtp or QHttp to download items when they are unable to determine the
- size of the item being downloaded.
+ If minimum and maximum both are set to 0, the bar shows a busy
+ indicator instead of a percentage of steps. This is useful, for
+ example, when using QFtp or QNetworkAccessManager to download
+ items when they are unable to determine the size of the item being
+ downloaded.
\table
\row \o \inlineimage macintosh-progressbar.png Screenshot of a Macintosh style progress bar
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index 421e671..b00f4a4 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -1388,7 +1388,7 @@ int QFtpPrivate::addCommand(QFtpCommand *cmd)
\warning The current version of QFtp doesn't fully support
non-Unix FTP servers.
- \sa QHttp, QNetworkAccessManager, QNetworkRequest, QNetworkReply,
+ \sa QNetworkAccessManager, QNetworkRequest, QNetworkReply,
{FTP Example}
*/
@@ -1733,8 +1733,8 @@ int QFtp::setTransferMode(TransferMode mode)
Enables use of the FTP proxy on host \a host and port \a
port. Calling this function with \a host empty disables proxying.
- QFtp does not support FTP-over-HTTP proxy servers. Use QHttp for
- this.
+ QFtp does not support FTP-over-HTTP proxy servers. Use
+ QNetworkAccessManager for this.
*/
int QFtp::setProxy(const QString &host, quint16 port)
{
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index a26a1fc..8bad6d3 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -68,8 +68,8 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
\inmodule QtNetwork
The QAuthenticator class is usually used in the
- \l{QHttp::}{authenticationRequired()} and
- \l{QHttp::}{proxyAuthenticationRequired()} signals of QHttp and
+ \l{QNetworkAccessManager::}{authenticationRequired()} and
+ \l{QNetworkAccessManager::}{proxyAuthenticationRequired()} signals of QNetworkAccessManager and
QAbstractSocket. The class provides a way to pass back the required
authentication information to the socket when accessing services that
require authentication.
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 608db65..df478fd 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -54,10 +54,10 @@
QNetworkProxy provides the method for configuring network layer
proxy support to the Qt network classes. The currently supported
classes are QAbstractSocket, QTcpSocket, QUdpSocket, QTcpServer,
- QHttp and QFtp. The proxy support is designed to be as transparent
- as possible. This means that existing network-enabled applications
- that you have written should automatically support network proxy
- using the following code.
+ QNetworkAccessManager and QFtp. The proxy support is designed to
+ be as transparent as possible. This means that existing
+ 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
@@ -160,8 +160,7 @@
\row
\o Caching-only HTTP
\o Implemented using normal HTTP commands, it is useful only
- in the context of HTTP requests (see QHttp,
- QNetworkAccessManager)
+ in the context of HTTP requests (see QNetworkAccessManager)
\o CachingCapability, HostNameLookupCapability
\row
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 290522c..c8ddce0 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -160,7 +160,7 @@
issue to be aware of, though: You must make sure that enough data
is available before attempting to read it using operator>>().
- \sa QFtp, QHttp, QTcpServer
+ \sa QFtp, QNetworkAccessManager, QTcpServer
*/
/*!
diff --git a/src/network/socket/qtcpsocket.cpp b/src/network/socket/qtcpsocket.cpp
index dc0439d..60722cc 100644
--- a/src/network/socket/qtcpsocket.cpp
+++ b/src/network/socket/qtcpsocket.cpp
@@ -60,10 +60,10 @@
\bold{Note:} TCP sockets cannot be opened in QIODevice::Unbuffered mode.
- \sa QTcpServer, QUdpSocket, QFtp, QHttp, {Fortune Server Example},
- {Fortune Client Example}, {Threaded Fortune Server Example},
- {Blocking Fortune Client Example}, {Loopback Example},
- {Torrent Example}
+ \sa QTcpServer, QUdpSocket, QFtp, QNetworkAccessManager,
+ {Fortune Server Example}, {Fortune Client Example},
+ {Threaded Fortune Server Example}, {Blocking Fortune Client Example},
+ {Loopback Example}, {Torrent Example}
*/
#include "qlist.h"
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index 6be6988..fe1e740 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -3012,19 +3012,13 @@ void QXmlSimpleReaderPrivate::initIncrementalParsing()
parse() to work incrementally, and making subsequent calls to the
parseContinue() function, until all the data has been processed.
- A common way to perform incremental parsing is to connect the
- \c readyRead() signal of the input source to a slot, and handle the
- incoming data there. For example, the following code shows how a
- parser for \l{http://web.resource.org/rss/1.0/}{RSS feeds} can be
- used to incrementally parse data that it receives from a QHttp
- object:
-
- \snippet doc/src/snippets/xml/rsslisting/rsslisting.cpp 1
-
+ A common way to perform incremental parsing is to connect the \c
+ readyRead() signal of a \l{QNetworkReply} {network reply} a slot,
+ and handle the incoming data there. See QNetworkAccessManager.
+
Aspects of the parsing behavior can be adapted using setFeature()
- and setProperty(). For example, the following code could be used
- to enable reporting of namespace prefixes to the content handler:
-
+ and setProperty().
+
QXmlSimpleReader is not reentrant. If you want to use the class
in threaded code, lock the code using QXmlSimpleReader with a
locking mechanism, such as a QMutex.
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index d82e9f8..ab74f13 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -3523,9 +3523,17 @@ QString HtmlGenerator::getLink(const Atom *atom,
if (relative) {
if (relative->parent() != *node) {
if (relative->status() != Node::Obsolete) {
- relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
- .arg(atom->string())
- .arg(marker->plainFullName(relative)));
+ bool porting = false;
+ if (relative->type() == Node::Fake) {
+ const FakeNode* fake = static_cast<const FakeNode*>(relative);
+ if (fake->title().startsWith("Porting"))
+ porting = true;
+ }
+ QString name = marker->plainFullName(relative);
+ if (!porting && !name.startsWith("Q3"))
+ relative->doc().location().warning(tr("Link to obsolete item '%1' in %2")
+ .arg(atom->string())
+ .arg(name));
#if 0
qDebug() << "Link to Obsolete entity"
<< (*node)->name();