Bug 45231

Summary: [Qt] Update NetworkAccessManager in Qt FrameNetworkingContext
Product: WebKit Reporter: Diego Gonzalez <diegohcg>
Component: WebKit QtAssignee: Diego Gonzalez <diegohcg>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hausmann, kbalazs, kenneth, tonikitoo, webkit-ews
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 42292    
Attachments:
Description Flags
Patch
kenneth: review-
Patch none

Description Diego Gonzalez 2010-09-04 12:09:31 PDT
Make possible to get the current QNAM when NetwokingContext request it.
Comment 1 Diego Gonzalez 2010-09-04 12:15:28 PDT
Created attachment 66586 [details]
Patch
Comment 2 Early Warning System Bot 2010-09-04 12:22:34 PDT
Attachment 66586 [details] did not build on qt:
Build output: http://queues.webkit.org/results/3914125
Comment 3 Kenneth Rohde Christiansen 2010-09-04 12:24:54 PDT
This should really build on Qt :)
Comment 4 Kenneth Rohde Christiansen 2010-09-04 12:29:10 PDT
Comment on attachment 66586 [details]
Patch

> From 08ee72aae848a76e1ebd473cde1e5802062653b4 Mon Sep 17 00:00:00 2001
> From: Diego Gonzalez <diegohcg@webkit.org>
> Date: Sat, 4 Sep 2010 15:12:49 -0400
> Subject: [PATCH] [Qt] Update NetworkAccessManager in Qt FrameNetworkingContext
>  https://bugs.webkit.org/show_bug.cgi?id=45231
> 
> Reviewed by NOBODY (OOPS!).
> 
> Make possible to get the current QNAM when NetwokingContext request it.
> 
> * WebCoreSupport/FrameNetworkingContextQt.cpp:
> (WebCore::FrameNetworkingContextQt::networkAccessManager):
> ---
>  WebKit/qt/ChangeLog                                |   12 ++++++++++++
>  .../qt/WebCoreSupport/FrameNetworkingContextQt.cpp |    4 ++++
>  2 files changed, 16 insertions(+), 0 deletions(-)
> 
> diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
> index 8f026a2..f5e4e31 100644
> --- a/WebKit/qt/ChangeLog
> +++ b/WebKit/qt/ChangeLog
> @@ -1,3 +1,15 @@
> +2010-09-04  Diego Gonzalez  <diegohcg@webkit.org>
> +
> +        Reviewed by NOBODY (OOPS!).
> +
> +        [Qt] Update NetworkAccessManager in Qt FrameNetworkingContext
> +        https://bugs.webkit.org/show_bug.cgi?id=45231
> +
> +        Make possible to get the current QNAM when NetwokingContext request it.
> +
> +        * WebCoreSupport/FrameNetworkingContextQt.cpp:
> +        (WebCore::FrameNetworkingContextQt::networkAccessManager):
> +
>  2010-09-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
>  
>          Reviewed by Darin Adler.
> diff --git a/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp b/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
> index e502e2a..98e9f9a 100644
> --- a/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
> +++ b/WebKit/qt/WebCoreSupport/FrameNetworkingContextQt.cpp
> @@ -23,6 +23,8 @@
>  
>  #include <QNetworkAccessManager>
>  #include <QObject>
> +#include <QWebFrame>
> +#include <QWebPage>
>  
>  namespace WebCore {
>  
> @@ -45,6 +47,8 @@ QObject* FrameNetworkingContextQt::originatingObject() const
>  
>  QNetworkAccessManager* FrameNetworkingContextQt::networkAccessManager() const
>  {
> +    if (QWebFrame* webFrame = qobject_cast<QWebFrame*>(m_originatingObject))
> +        m_networkAccessManager = webFrame->...

Why not jist return here, and never use m_networkaccessmanager directly?
Just call this method instead.
Comment 5 Diego Gonzalez 2010-09-06 07:55:16 PDT
Created attachment 66645 [details]
Patch
Comment 6 Antonio Gomes 2010-09-06 08:20:02 PDT
Comment on attachment 66645 [details]
Patch

r=me
Comment 7 WebKit Commit Bot 2010-09-06 16:01:47 PDT
Comment on attachment 66645 [details]
Patch

Clearing flags on attachment: 66645

Committed r66853: <http://trac.webkit.org/changeset/66853>
Comment 8 WebKit Commit Bot 2010-09-06 16:01:52 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Balazs Kelemen 2010-09-07 01:35:06 PDT
The m_networkingContext member should be removed according to this change, isn't it?