mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-01-23 06:07:39 +01:00
Some refactoring in network manager.
This commit is contained in:
parent
aaa12e9183
commit
aa5dd662db
@ -27,7 +27,7 @@
|
||||
QPointer<WebBrowserNetworkAccessManager> WebBrowserNetworkAccessManager::s_instance;
|
||||
|
||||
WebBrowserNetworkAccessManager::WebBrowserNetworkAccessManager(WebPage *page, QObject *parent)
|
||||
: BaseNetworkAccessManager(parent), page_(page) {
|
||||
: BaseNetworkAccessManager(parent), m_page(page) {
|
||||
connect(this, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)),
|
||||
this, SLOT(onAuthenticationRequired(QNetworkReply*,QAuthenticator*)));
|
||||
}
|
||||
@ -44,9 +44,9 @@ void WebBrowserNetworkAccessManager::onAuthenticationRequired(QNetworkReply *rep
|
||||
}
|
||||
|
||||
QNetworkReply *WebBrowserNetworkAccessManager::createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) {
|
||||
if (page_) {
|
||||
if (m_page != NULL) {
|
||||
QNetworkRequest pageRequest = request;
|
||||
page_->populateNetworkRequest(pageRequest);
|
||||
m_page->populateNetworkRequest(pageRequest);
|
||||
return WebBrowserNetworkAccessManager::instance()->createRequest(op, pageRequest, outgoingData);
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class WebBrowserNetworkAccessManager : public BaseNetworkAccessManager {
|
||||
void onAuthenticationRequired(QNetworkReply *reply, QAuthenticator *authenticator);
|
||||
|
||||
private:
|
||||
WebPage* page_;
|
||||
WebPage *m_page;
|
||||
|
||||
static QPointer<WebBrowserNetworkAccessManager> s_instance;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user