From feacc0dff2d751893f88a2e3fc187914030a153e Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Date: Mon, 10 Jun 2013 17:18:47 +0200 Subject: [PATCH] Cleanup unneeded global variables. --- lib/qquickwebcontentsview.cpp | 8 -------- lib/qquickwebcontentsview.h | 6 ------ lib/qwebcontentsview.cpp | 7 ------- lib/qwebcontentsview.h | 6 ------ 4 files changed, 27 deletions(-) diff --git a/lib/qquickwebcontentsview.cpp b/lib/qquickwebcontentsview.cpp index 54ae779c6..3e20e90f7 100644 --- a/lib/qquickwebcontentsview.cpp +++ b/lib/qquickwebcontentsview.cpp @@ -55,10 +55,6 @@ #include <QWidget> #include <QUrl> -namespace content { -QQuickWebContentsView* gQuickView = 0; -} - class QQuickWebContentsViewPrivate { public: @@ -69,10 +65,6 @@ QQuickWebContentsView::QQuickWebContentsView() { d.reset(new QQuickWebContentsViewPrivate); - // Cheap hack to allow getting signals from shell_qt.cpp. - Q_ASSERT(!content::gQuickView); - content::gQuickView = this; - content::BrowserContext* browser_context = static_cast<ContentBrowserClientQt*>(content::GetContentClient()->browser())->browser_context(); d->webContentsDelegate.reset(WebContentsDelegateQt::CreateNewWindow(browser_context, GURL(std::string("http://qt-project.org/")), NULL, MSG_ROUTING_NONE, gfx::Size(), this)); } diff --git a/lib/qquickwebcontentsview.h b/lib/qquickwebcontentsview.h index 030365c29..809bbf25e 100644 --- a/lib/qquickwebcontentsview.h +++ b/lib/qquickwebcontentsview.h @@ -45,10 +45,6 @@ #include <QQuickItem> #include <QScopedPointer> -namespace content { - class Shell; -} - class QQuickWebContentsViewPrivate; class Q_DECL_EXPORT QQuickWebContentsView : public QQuickItem { @@ -72,8 +68,6 @@ Q_SIGNALS: private: QScopedPointer<QQuickWebContentsViewPrivate> d; - - friend class content::Shell; }; QML_DECLARE_TYPE(QQuickWebContentsView) diff --git a/lib/qwebcontentsview.cpp b/lib/qwebcontentsview.cpp index c30973a48..2ce75f3a6 100644 --- a/lib/qwebcontentsview.cpp +++ b/lib/qwebcontentsview.cpp @@ -55,10 +55,6 @@ #include <QWidget> #include <QUrl> -namespace content { -QWebContentsView* gWidgetView = 0; -} - class QWebContentsViewPrivate { public: @@ -69,9 +65,6 @@ QWebContentsView::QWebContentsView() { d.reset(new QWebContentsViewPrivate); - // Cheap hack to allow getting signals from shell_qt.cpp. - Q_ASSERT(!content::gWidgetView); - content::BrowserContext* browser_context = static_cast<ContentBrowserClientQt*>(content::GetContentClient()->browser())->browser_context(); d->webContentsDelegate.reset(WebContentsDelegateQt::CreateNewWindow(browser_context, GURL(std::string("http://qt-project.org/")), NULL, MSG_ROUTING_NONE, gfx::Size(), this)); } diff --git a/lib/qwebcontentsview.h b/lib/qwebcontentsview.h index 077c3cde6..e5f082310 100644 --- a/lib/qwebcontentsview.h +++ b/lib/qwebcontentsview.h @@ -45,10 +45,6 @@ #include <QWidget> #include <QScopedPointer> -namespace content { - class Shell; -} - class QWebContentsViewPrivate; class Q_DECL_EXPORT QWebContentsView : public QWidget { @@ -70,8 +66,6 @@ Q_SIGNALS: private: QScopedPointer<QWebContentsViewPrivate> d; - - friend class content::Shell; }; #endif // QWEBCONTESTSVIEW_H -- GitLab