network: Pass types with copy-ctor or dtor by const-ref
Change-Id: I7bea3e03bff6f424b02335476211dd466ce4d720 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>bb10
parent
d6c2dea7da
commit
918bb8ec47
|
|
@ -1131,7 +1131,7 @@ void QHttpNetworkConnectionPrivate::startHostInfoLookup()
|
|||
}
|
||||
|
||||
|
||||
void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(QHostInfo info)
|
||||
void QHttpNetworkConnectionPrivate::_q_hostLookupFinished(const QHostInfo &info)
|
||||
{
|
||||
bool bIpv4 = false;
|
||||
bool bIpv6 = false;
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ public:
|
|||
// private slots
|
||||
void _q_startNextRequest(); // send the next request from the queue
|
||||
|
||||
void _q_hostLookupFinished(QHostInfo info);
|
||||
void _q_hostLookupFinished(const QHostInfo &info);
|
||||
void _q_connectDelayedChannel();
|
||||
|
||||
void createAuthorization(QAbstractSocket *socket, QHttpNetworkRequest &request);
|
||||
|
|
|
|||
|
|
@ -130,14 +130,14 @@ signals:
|
|||
#ifndef QT_NO_SSL
|
||||
void encrypted();
|
||||
void sslErrors(const QList<QSslError> &, bool *, QList<QSslError> *);
|
||||
void sslConfigurationChanged(const QSslConfiguration);
|
||||
void sslConfigurationChanged(const QSslConfiguration &);
|
||||
void preSharedKeyAuthenticationRequired(QSslPreSharedKeyAuthenticator *);
|
||||
#endif
|
||||
void downloadMetaData(QList<QPair<QByteArray,QByteArray> >, int, QString, bool,
|
||||
void downloadMetaData(const QList<QPair<QByteArray,QByteArray> > &, int, const QString &, bool,
|
||||
QSharedPointer<char>, qint64, bool);
|
||||
void downloadProgress(qint64, qint64);
|
||||
void downloadData(QByteArray);
|
||||
void error(QNetworkReply::NetworkError, const QString);
|
||||
void downloadData(const QByteArray &);
|
||||
void error(QNetworkReply::NetworkError, const QString &);
|
||||
void downloadFinished();
|
||||
void redirected(const QUrl &url, int httpStatus, int maxRedirectsRemainig);
|
||||
|
||||
|
|
@ -285,7 +285,7 @@ public:
|
|||
|
||||
public slots:
|
||||
// From user thread:
|
||||
void haveDataSlot(qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize)
|
||||
void haveDataSlot(qint64 pos, const QByteArray &dataArray, bool dataAtEnd, qint64 dataSize)
|
||||
{
|
||||
if (pos != m_pos) {
|
||||
// Sometimes when re-sending a request in the qhttpnetwork* layer there is a pending haveData from the
|
||||
|
|
|
|||
|
|
@ -1162,11 +1162,10 @@ void QNetworkReplyHttpImplPrivate::checkForRedirect(const int statusCode)
|
|||
}
|
||||
}
|
||||
|
||||
void QNetworkReplyHttpImplPrivate::replyDownloadMetaData
|
||||
(QList<QPair<QByteArray,QByteArray> > hm,
|
||||
int sc,QString rp,bool pu,
|
||||
QSharedPointer<char> db,
|
||||
qint64 contentLength, bool spdyWasUsed)
|
||||
void QNetworkReplyHttpImplPrivate::replyDownloadMetaData(const QList<QPair<QByteArray,QByteArray> > &hm,
|
||||
int sc, const QString &rp, bool pu,
|
||||
QSharedPointer<char> db,
|
||||
qint64 contentLength, bool spdyWasUsed)
|
||||
{
|
||||
Q_Q(QNetworkReplyHttpImpl);
|
||||
Q_UNUSED(contentLength);
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ signals:
|
|||
|
||||
void startHttpRequestSynchronously();
|
||||
|
||||
void haveUploadData(const qint64 pos, QByteArray dataArray, bool dataAtEnd, qint64 dataSize);
|
||||
void haveUploadData(const qint64 pos, const QByteArray &dataArray, bool dataAtEnd, qint64 dataSize);
|
||||
};
|
||||
|
||||
class QNetworkReplyHttpImplPrivate: public QNetworkReplyPrivate
|
||||
|
|
@ -273,8 +273,8 @@ public:
|
|||
// From HTTP thread:
|
||||
void replyDownloadData(QByteArray);
|
||||
void replyFinished();
|
||||
void replyDownloadMetaData(QList<QPair<QByteArray,QByteArray> >, int, QString, bool,
|
||||
QSharedPointer<char>, qint64, bool);
|
||||
void replyDownloadMetaData(const QList<QPair<QByteArray,QByteArray> > &, int, const QString &,
|
||||
bool, QSharedPointer<char>, qint64, bool);
|
||||
void replyDownloadProgressSlot(qint64,qint64);
|
||||
void httpAuthenticationRequired(const QHttpNetworkRequest &request, QAuthenticator *auth);
|
||||
void httpError(QNetworkReply::NetworkError error, const QString &errorString);
|
||||
|
|
|
|||
|
|
@ -601,7 +601,7 @@ void QSpdyProtocolHandler::sendControlFrame(FrameType type,
|
|||
Q_UNUSED(written); // silence -Wunused-variable
|
||||
}
|
||||
|
||||
void QSpdyProtocolHandler::sendSYN_STREAM(HttpMessagePair messagePair,
|
||||
void QSpdyProtocolHandler::sendSYN_STREAM(const HttpMessagePair &messagePair,
|
||||
qint32 streamID, qint32 associatedToStreamID)
|
||||
{
|
||||
QHttpNetworkRequest request = messagePair.first;
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ private:
|
|||
|
||||
void sendControlFrame(FrameType type, ControlFrameFlags flags, const char *data, quint32 length);
|
||||
|
||||
void sendSYN_STREAM(HttpMessagePair pair, qint32 streamID,
|
||||
void sendSYN_STREAM(const HttpMessagePair &pair, qint32 streamID,
|
||||
qint32 associatedToStreamID);
|
||||
void sendRST_STREAM(qint32 streamID, RST_STREAM_STATUS_CODE statusCode);
|
||||
void sendPING(quint32 pingID);
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ protected:
|
|||
}
|
||||
|
||||
inline void setPrivateConfiguration(QNetworkConfiguration &config,
|
||||
QNetworkConfigurationPrivatePointer ptr) const
|
||||
const QNetworkConfigurationPrivatePointer &ptr) const
|
||||
{
|
||||
config.d = ptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ static void doDeleteLater(QObject* obj)
|
|||
obj->deleteLater();
|
||||
}
|
||||
|
||||
QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(QNetworkConfiguration config)
|
||||
QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(const QNetworkConfiguration &config)
|
||||
{
|
||||
QSharedNetworkSessionManager *m(sharedNetworkSessionManager());
|
||||
//if already have a session, return it
|
||||
|
|
@ -71,7 +71,7 @@ QSharedPointer<QNetworkSession> QSharedNetworkSessionManager::getSession(QNetwor
|
|||
return session;
|
||||
}
|
||||
|
||||
void QSharedNetworkSessionManager::setSession(QNetworkConfiguration config, QSharedPointer<QNetworkSession> session)
|
||||
void QSharedNetworkSessionManager::setSession(const QNetworkConfiguration &config, QSharedPointer<QNetworkSession> session)
|
||||
{
|
||||
QSharedNetworkSessionManager *m(sharedNetworkSessionManager());
|
||||
m->sessions[config] = session;
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ uint qHash(const QNetworkConfiguration& config);
|
|||
class QSharedNetworkSessionManager
|
||||
{
|
||||
public:
|
||||
static QSharedPointer<QNetworkSession> getSession(QNetworkConfiguration config);
|
||||
static void setSession(QNetworkConfiguration config, QSharedPointer<QNetworkSession> session);
|
||||
static QSharedPointer<QNetworkSession> getSession(const QNetworkConfiguration &config);
|
||||
static void setSession(const QNetworkConfiguration &config, QSharedPointer<QNetworkSession> session);
|
||||
private:
|
||||
QHash<QNetworkConfiguration, QWeakPointer<QNetworkSession> > sessions;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue