From c1c7c3cfa9d8c3e6f05095d0880a84a13a0d9e01 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Mon, 19 Aug 2013 15:17:56 +0200 Subject: Centralize type conversion functions. This adds the common GURL->QUrl and string16->QString conversions into a common header and use those functions throughout the code. Move the qStringToStringType into the same header and rename it to a name consistent with the others. This also cleans up shared_globals.h by moving content:: forward declarations in the cpp, where they are used. Change-Id: I19527ea7de1f6047aae8b44c97eb4d7c3e5a0e54 Reviewed-by: Andras Becsi --- lib/web_contents_delegate_qt.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/web_contents_delegate_qt.cpp') diff --git a/lib/web_contents_delegate_qt.cpp b/lib/web_contents_delegate_qt.cpp index 9cadf4b60..738ebd0fc 100644 --- a/lib/web_contents_delegate_qt.cpp +++ b/lib/web_contents_delegate_qt.cpp @@ -41,6 +41,7 @@ #include "web_contents_delegate_qt.h" +#include "type_conversion.h" #include "web_contents_adapter_client.h" #include "content/public/browser/navigation_controller.h" @@ -87,9 +88,7 @@ void WebContentsDelegateQt::NavigationStateChanged(const content::WebContents* s { if (changed_flags & content::INVALIDATE_TYPE_URL) { Q_ASSERT(m_viewClient); - GURL gurl = web_contents()->GetVisibleURL(); - QUrl url(QString::fromStdString(gurl.spec())); - m_viewClient->urlChanged(url); + m_viewClient->urlChanged(toQt(web_contents()->GetVisibleURL())); } } -- cgit v1.2.3