diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-15 14:05:08 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-19 23:11:09 +0000 |
commit | 7023f228b099c410081db5c697e2d69ed57558da (patch) | |
tree | 783b36e9728099e147fd248a248eaa921fd2da64 /src/core/url_request_context_getter_qt.cpp | |
parent | 1e006305a7f450d6da3e700bcf0bbe70bf8c5105 (diff) |
Switch BrowserContextAdapter to QSharedPointer
BrowserContextAdapter is not a form of shared data, and using
QExplicitSharedDataPointer on it as always been a misuse of the class.
Instead we should switch it to QSharedPointer, which also allows us to
use QWeakPointer.
Change-Id: I8eb489b4a12d3fdddcde55821be294814a156a9d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Diffstat (limited to 'src/core/url_request_context_getter_qt.cpp')
-rw-r--r-- | src/core/url_request_context_getter_qt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp index fb4dc467e..daa07b54b 100644 --- a/src/core/url_request_context_getter_qt.cpp +++ b/src/core/url_request_context_getter_qt.cpp @@ -85,7 +85,7 @@ static const char kQrcSchemeQt[] = "qrc"; using content::BrowserThread; -URLRequestContextGetterQt::URLRequestContextGetterQt(BrowserContextAdapter *browserContext, content::ProtocolHandlerMap *protocolHandlers, content::URLRequestInterceptorScopedVector request_interceptors) +URLRequestContextGetterQt::URLRequestContextGetterQt(QSharedPointer<BrowserContextAdapter> browserContext, content::ProtocolHandlerMap *protocolHandlers, content::URLRequestInterceptorScopedVector request_interceptors) : m_ignoreCertificateErrors(false) , m_browserContext(browserContext) , m_cookieDelegate(new CookieMonsterDelegateQt()) @@ -293,7 +293,7 @@ void URLRequestContextGetterQt::generateUserAgent() Q_ASSERT(m_urlRequestContext); Q_ASSERT(m_storage); - m_storage->set_http_user_agent_settings(new HttpUserAgentSettingsQt(m_browserContext.constData())); + m_storage->set_http_user_agent_settings(new HttpUserAgentSettingsQt(m_browserContext.data())); } void URLRequestContextGetterQt::updateHttpCache() |