QNAM: Fix proxy code after refactoring

This commit is contained in:
Markus Goetz 2011-04-08 13:41:57 +02:00
parent 0b7df28754
commit 43b6320a5a
2 changed files with 13 additions and 7 deletions

View File

@ -600,10 +600,10 @@ void QNetworkReplyHttpImplPrivate::postRequest()
if (transparentProxy.type() == QNetworkProxy::DefaultProxy &&
cacheProxy.type() == QNetworkProxy::DefaultProxy) {
// unsuitable proxies
QMetaObject::invokeMethod(q, "error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection,
QMetaObject::invokeMethod(q, "_q_error", synchronous ? Qt::DirectConnection : Qt::QueuedConnection,
Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ProxyNotFoundError),
Q_ARG(QString, q->tr("No suitable proxy found")));
QMetaObject::invokeMethod(q, "finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);
QMetaObject::invokeMethod(q, "_q_finished", synchronous ? Qt::DirectConnection : Qt::QueuedConnection);
return;
}
#endif
@ -1811,6 +1811,12 @@ void QNetworkReplyHttpImplPrivate::finished()
//resumeNotificationHandling();
}
void QNetworkReplyHttpImplPrivate::_q_error(QNetworkReplyImpl::NetworkError code, const QString &errorMessage)
{
this->error(code, errorMessage);
}
void QNetworkReplyHttpImplPrivate::error(QNetworkReplyImpl::NetworkError code, const QString &errorMessage)
{
Q_Q(QNetworkReplyHttpImpl);

View File

@ -100,8 +100,6 @@ public:
Q_INVOKABLE void setSslConfigurationImplementation(const QSslConfiguration &configuration);
Q_INVOKABLE QSslConfiguration sslConfigurationImplementation() const;
#endif
// Q_INVOKABLE QSslConfiguration sslConfigurationImplementation() const;
// Q_INVOKABLE void setSslConfigurationImplementation(const QSslConfiguration &configuration);
Q_DECLARE_PRIVATE(QNetworkReplyHttpImpl)
Q_PRIVATE_SLOT(d_func(), void _q_startOperation())
@ -113,6 +111,9 @@ public:
Q_PRIVATE_SLOT(d_func(), void _q_networkSessionFailed())
#endif
Q_PRIVATE_SLOT(d_func(), void _q_finished())
Q_PRIVATE_SLOT(d_func(), void _q_error(QNetworkReply::NetworkError, const QString &))
// From reply
Q_PRIVATE_SLOT(d_func(), void replyDownloadData(QByteArray))
Q_PRIVATE_SLOT(d_func(), void replyFinished())
Q_PRIVATE_SLOT(d_func(), void replyDownloadMetaData(QList<QPair<QByteArray,QByteArray> >,int,QString,bool,QSharedPointer<char>,qint64))
@ -131,6 +132,7 @@ public:
Q_PRIVATE_SLOT(d_func(), void emitReplyUploadProgress(qint64, qint64))
signals:
// To HTTP thread:
void startHttpRequest();
@ -184,6 +186,7 @@ public:
// FIXME
void finished();
void error(QNetworkReply::NetworkError code, const QString &errorString);
void _q_error(QNetworkReply::NetworkError code, const QString &errorString);
void metaDataChanged();
void redirectionRequested(const QUrl &target);
@ -293,9 +296,6 @@ public:
void wantUploadDataSlot(qint64);
void sentUploadDataSlot(qint64);
Q_DECLARE_PUBLIC(QNetworkReplyHttpImpl)
};