summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2010-10-05 08:32:46 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2010-10-05 08:32:46 (GMT)
commitd9072d54d094ff844dd39801b1e388138b9c8f08 (patch)
treeec11662c1cfc2a2436f0c2866c72e908c1712de2 /src/network
parent892961bdb06199606ef92b3ab364175a1709c378 (diff)
downloadQt-d9072d54d094ff844dd39801b1e388138b9c8f08.zip
Qt-d9072d54d094ff844dd39801b1e388138b9c8f08.tar.gz
Qt-d9072d54d094ff844dd39801b1e388138b9c8f08.tar.bz2
QNAM: Rename QFileNetworkReply to QNetworkReplyFileImpl
This name is more intuitive since that class lives on the same level as QNetworkReplyImpl and not on the lower level like QHttpNetworkReply Reviewed-by: Peter Hartmann
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/access.pri4
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp4
-rw-r--r--src/network/access/qnetworkreplyfileimpl.cpp (renamed from src/network/access/qfilenetworkreply.cpp)38
-rw-r--r--src/network/access/qnetworkreplyfileimpl_p.h (renamed from src/network/access/qfilenetworkreply_p.h)24
4 files changed, 35 insertions, 35 deletions
diff --git a/src/network/access/access.pri b/src/network/access/access.pri
index 6a0cd32..e255a0d 100644
--- a/src/network/access/access.pri
+++ b/src/network/access/access.pri
@@ -8,7 +8,6 @@ HEADERS += \
access/qhttpnetworkreply_p.h \
access/qhttpnetworkconnection_p.h \
access/qhttpnetworkconnectionchannel_p.h \
- access/qfilenetworkreply_p.h \
access/qnetworkaccessmanager.h \
access/qnetworkaccessmanager_p.h \
access/qnetworkaccesscache_p.h \
@@ -28,6 +27,7 @@ HEADERS += \
access/qnetworkreply.h \
access/qnetworkreply_p.h \
access/qnetworkreplyimpl_p.h \
+ access/qnetworkreplyfileimpl_p.h \
access/qabstractnetworkcache_p.h \
access/qabstractnetworkcache.h \
access/qnetworkdiskcache_p.h \
@@ -41,7 +41,6 @@ SOURCES += \
access/qhttpnetworkreply.cpp \
access/qhttpnetworkconnection.cpp \
access/qhttpnetworkconnectionchannel.cpp \
- access/qfilenetworkreply.cpp \
access/qnetworkaccessmanager.cpp \
access/qnetworkaccesscache.cpp \
access/qnetworkaccessbackend.cpp \
@@ -56,6 +55,7 @@ SOURCES += \
access/qnetworkrequest.cpp \
access/qnetworkreply.cpp \
access/qnetworkreplyimpl.cpp \
+ access/qnetworkreplyfileimpl.cpp \
access/qabstractnetworkcache.cpp \
access/qnetworkdiskcache.cpp
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 86b1c66..9738a4f 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -54,7 +54,7 @@
#include "qnetworkaccessfilebackend_p.h"
#include "qnetworkaccessdatabackend_p.h"
#include "qnetworkaccessdebugpipebackend_p.h"
-#include "qfilenetworkreply_p.h"
+#include "qnetworkreplyfileimpl_p.h"
#include "QtCore/qbuffer.h"
#include "QtCore/qurl.h"
@@ -952,7 +952,7 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
// The QNetworkAccessFileBackend will right now only be used for PUT
if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation)
&& (isLocalFile || req.url().scheme() == QLatin1String("qrc"))) {
- return new QFileNetworkReply(this, req, op);
+ return new QNetworkReplyFileImpl(this, req, op);
}
#ifndef QT_NO_BEARERMANAGEMENT
diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qnetworkreplyfileimpl.cpp
index 73965f4..10fa97e 100644
--- a/src/network/access/qfilenetworkreply.cpp
+++ b/src/network/access/qnetworkreplyfileimpl.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include "qfilenetworkreply_p.h"
+#include "qnetworkreplyfileimpl_p.h"
#include "QtCore/qdatetime.h"
#include <QtCore/QCoreApplication>
@@ -48,22 +48,22 @@
QT_BEGIN_NAMESPACE
-QFileNetworkReplyPrivate::QFileNetworkReplyPrivate()
+QNetworkReplyFileImplPrivate::QNetworkReplyFileImplPrivate()
: QNetworkReplyPrivate(), fileEngine(0), fileSize(0), filePos(0)
{
}
-QFileNetworkReplyPrivate::~QFileNetworkReplyPrivate()
+QNetworkReplyFileImplPrivate::~QNetworkReplyFileImplPrivate()
{
delete fileEngine;
}
-QFileNetworkReply::~QFileNetworkReply()
+QNetworkReplyFileImpl::~QNetworkReplyFileImpl()
{
}
-QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op)
- : QNetworkReply(*new QFileNetworkReplyPrivate(), parent)
+QNetworkReplyFileImpl::QNetworkReplyFileImpl(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op)
+ : QNetworkReply(*new QNetworkReplyFileImplPrivate(), parent)
{
setRequest(req);
setUrl(req.url());
@@ -71,7 +71,7 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req
setFinished(true);
QNetworkReply::open(QIODevice::ReadOnly);
- QFileNetworkReplyPrivate *d = (QFileNetworkReplyPrivate*) d_func();
+ QNetworkReplyFileImplPrivate *d = (QNetworkReplyFileImplPrivate*) d_func();
QUrl url = req.url();
if (url.host() == QLatin1String("localhost"))
@@ -143,48 +143,48 @@ QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req
QMetaObject::invokeMethod(this, "readyRead", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
}
-void QFileNetworkReply::close()
+void QNetworkReplyFileImpl::close()
{
- Q_D(QFileNetworkReply);
+ Q_D(QNetworkReplyFileImpl);
QNetworkReply::close();
if (d->fileEngine)
d->fileEngine->close();
}
-void QFileNetworkReply::abort()
+void QNetworkReplyFileImpl::abort()
{
- Q_D(QFileNetworkReply);
+ Q_D(QNetworkReplyFileImpl);
QNetworkReply::close();
if (d->fileEngine)
d->fileEngine->close();
}
-qint64 QFileNetworkReply::bytesAvailable() const
+qint64 QNetworkReplyFileImpl::bytesAvailable() const
{
- Q_D(const QFileNetworkReply);
+ Q_D(const QNetworkReplyFileImpl);
if (!d->fileEngine)
return 0;
return QNetworkReply::bytesAvailable() + d->fileSize - d->filePos;
}
-bool QFileNetworkReply::isSequential () const
+bool QNetworkReplyFileImpl::isSequential () const
{
return true;
}
-qint64 QFileNetworkReply::size() const
+qint64 QNetworkReplyFileImpl::size() const
{
- Q_D(const QFileNetworkReply);
+ Q_D(const QNetworkReplyFileImpl);
return d->fileSize;
}
/*!
\internal
*/
-qint64 QFileNetworkReply::readData(char *data, qint64 maxlen)
+qint64 QNetworkReplyFileImpl::readData(char *data, qint64 maxlen)
{
- Q_D(QFileNetworkReply);
+ Q_D(QNetworkReplyFileImpl);
if (!d->fileEngine)
return -1;
@@ -201,5 +201,5 @@ qint64 QFileNetworkReply::readData(char *data, qint64 maxlen)
QT_END_NAMESPACE
-#include "moc_qfilenetworkreply_p.cpp"
+#include "moc_qnetworkreplyfileimpl_p.cpp"
diff --git a/src/network/access/qfilenetworkreply_p.h b/src/network/access/qnetworkreplyfileimpl_p.h
index 227c775..627363f 100644
--- a/src/network/access/qfilenetworkreply_p.h
+++ b/src/network/access/qnetworkreplyfileimpl_p.h
@@ -39,8 +39,8 @@
**
****************************************************************************/
-#ifndef QFILENETWORKREPLY_P_H
-#define QFILENETWORKREPLY_P_H
+#ifndef QNETWORKREPLYFILEIMPL_H
+#define QNETWORKREPLYFILEIMPL_H
//
// W A R N I N G
@@ -62,13 +62,13 @@
QT_BEGIN_NAMESPACE
-class QFileNetworkReplyPrivate;
-class QFileNetworkReply: public QNetworkReply
+class QNetworkReplyFileImplPrivate;
+class QNetworkReplyFileImpl: public QNetworkReply
{
Q_OBJECT
public:
- QFileNetworkReply(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op);
- ~QFileNetworkReply();
+ QNetworkReplyFileImpl(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op);
+ ~QNetworkReplyFileImpl();
virtual void abort();
// reimplemented from QNetworkReply
@@ -79,22 +79,22 @@ public:
virtual qint64 readData(char *data, qint64 maxlen);
- Q_DECLARE_PRIVATE(QFileNetworkReply)
+ Q_DECLARE_PRIVATE(QNetworkReplyFileImpl)
};
-class QFileNetworkReplyPrivate: public QNetworkReplyPrivate
+class QNetworkReplyFileImplPrivate: public QNetworkReplyPrivate
{
public:
- QFileNetworkReplyPrivate();
- ~QFileNetworkReplyPrivate();
+ QNetworkReplyFileImplPrivate();
+ ~QNetworkReplyFileImplPrivate();
QAbstractFileEngine *fileEngine;
qint64 fileSize;
qint64 filePos;
- Q_DECLARE_PUBLIC(QFileNetworkReply)
+ Q_DECLARE_PUBLIC(QNetworkReplyFileImpl)
};
QT_END_NAMESPACE
-#endif // QFILENETWORKREPLY_P_H
+#endif // QNETWORKREPLYFILEIMPL_H