44 #include "QtCore/qdatetime.h" 45 #include <QtCore/QCoreApplication> 46 #include <QtCore/QFileInfo> 75 #if !defined(Q_OS_WIN) 158 if (!
d->realFile.isOpen())
171 return d->realFileSize;
180 if (!
d->realFile.isOpen())
182 qint64 ret =
d->realFile.read(data, maxlen);
194 #include "moc_qnetworkreplyfileimpl_p.cpp"
QString fileName() const
Returns the name set by setFileName() or to the QFile constructors.
#define QT_END_NAMESPACE
This macro expands to.
void setUrl(const QUrl &url)
Sets the URL being processed to be url.
QString toString(FormattingOptions options=None) const
Returns the human-displayable string representation of the URL.
void setError(NetworkError errorCode, const QString &errorString)
Sets the error condition to be errorCode.
bool open(OpenMode flags)
Opens the file using OpenMode mode, returning true if successful; otherwise false.
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
QString errorString() const
Returns a human-readable description of the last device error that occurred.
NetworkError
Indicates all possible error conditions found during the processing of the request.
Operation
Indicates the operation this reply is processing.
void setPath(const QString &path)
Sets the path of the URL to path.
#define Q_ARG(type, data)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
QString host() const
Returns the host of the URL if it is defined; otherwise an empty string is returned.
The QObject class is the base class of all Qt objects.
void setHost(const QString &host)
Sets the host of the URL to host.
QString path() const
Returns the path of the URL.
QUrl url() const
Returns the URL this network request is referring to.
static QString translate(const char *context, const char *key, const char *disambiguation=0, Encoding encoding=CodecForTr)
void setOperation(QNetworkAccessManager::Operation operation)
Sets the associated operation for this object to be operation.
bool exists() const
Returns true if the file specified by fileName() exists; otherwise returns false. ...
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual void close()
Closes this device for reading.
bool isDir() const
Returns true if this object points to a directory or to a symbolic link to a directory; otherwise ret...
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static const char * data(const QByteArray &arr)
virtual void close()
Closes this device for reading.
void setHeader(QNetworkRequest::KnownHeaders header, const QVariant &value)
Sets the known header header to be of value value.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
virtual qint64 readData(char *data, qint64 maxlen)
QString toLocalFile() const
Returns the path of this URL formatted as a local file path.
void setRequest(const QNetworkRequest &request)
Sets the associated request for this object to be request.
virtual bool isSequential() const
qint64 size() const
For open random-access devices, this function returns the size of the device.
QString scheme() const
Returns the scheme of the URL.
QString arg(qlonglong a, int fieldwidth=0, int base=10, const QChar &fillChar=QLatin1Char(' ')) const Q_REQUIRED_RESULT
qint64 size() const
Returns the file size in bytes.
void setFinished(bool)
Sets the reply as finished.
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
virtual bool open(OpenMode mode)
Opens the device and sets its OpenMode to mode.
QNetworkReplyFileImplPrivate()
virtual qint64 bytesAvailable() const
Returns the number of bytes that are available for reading.
QUrl url() const
Returns the URL of the content downloaded or uploaded.
The QFileInfo class provides system-independent file information.
QNetworkReplyFileImpl(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op)
static QString fileName(const QString &fileUrl)
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
void setFileName(const QString &name)
Sets the name of the file.
virtual void abort()
Aborts the operation immediately and close down any network connections still open.
QDateTime lastModified() const
Returns the date and time when the file was last modified.