On this page

QNetworkReplyWrapper Class

A wrapper around QNetworkReply and QNetworkAccessManager. More...

Header: #include <qnetworkwrappertask.h>
Inherits: QObject

Note: All functions in this class are reentrant.

Signals

void done(QtTaskTree::DoneResult result)
void downloadProgress(qint64 bytesReceived, qint64 bytesTotal)
void sslErrors(const QList<QSslError> &errors)
void started()

Detailed Description

QNetworkReplyWrapper is a convenient class combining QNetworkAccessManager and QNetworkReply.

The mandatory configuration is to call setNetworkAccessManager() and setRequest(). By default the QNetworkReplyWrapper is configured with QNetworkAccessManager::GetOperation. Use setOperation() to perform other operations. Use setData() when the configured operation is Put, Post or Custom. Use setVerb() when the configured operation is Custom.

The associated QNetworkReply may be accessed via reply() method. The QNetworkReply is created dynamically by the start() method and managed by QNetworkReplyWrapper. It is deleted just after emitting done() signal.

Member Function Documentation

[signal] void QNetworkReplyWrapper::done(QtTaskTree::DoneResult result)

This signal is emitted after the associated QNetworkReply finished. The passed result indicates whether it has finished with success or an error.

See also reply().

[signal] void QNetworkReplyWrapper::downloadProgress(qint64 bytesReceived, qint64 bytesTotal)

This signal re-emitted from the running QNetworkReply, passing bytesReceived and bytesTotal.

See also reply().

[signal] void QNetworkReplyWrapper::sslErrors(const QList<QSslError> &errors)

This signal re-emitted from the running QNetworkReply, passing a list of ssl errors.

See also reply().

[signal] void QNetworkReplyWrapper::started()

This signal is emitted after successful start of the managed QNetworkReply.

See also start().

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.