diff --git a/examples/webenginewidgets/demobrowser/webview.cpp b/examples/webenginewidgets/demobrowser/webview.cpp index 42f725fe885c92d481023979425bdfec418721e6..9feedc0b5be4d66ff6a02b19d41cd3449d77dfd4 100644 --- a/examples/webenginewidgets/demobrowser/webview.cpp +++ b/examples/webenginewidgets/demobrowser/webview.cpp @@ -96,16 +96,6 @@ BrowserMainWindow *WebPage::mainWindow() return BrowserApplication::instance()->mainWindow(); } -bool WebPage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) -{ - Q_UNUSED(type); - if (isMainFrame) { - m_loadingUrl = url; - emit loadingUrl(m_loadingUrl); - } - return true; -} - bool WebPage::certificateError(const QWebEngineCertificateError &error) { if (error.isOverridable()) { @@ -357,8 +347,6 @@ void WebView::setPage(WebPage *_page) connect(page(), SIGNAL(statusBarMessage(QString)), SLOT(setStatusBarText(QString))); #endif - connect(page(), SIGNAL(loadingUrl(QUrl)), - this, SIGNAL(urlChanged(QUrl))); connect(page(), SIGNAL(iconUrlChanged(QUrl)), this, SLOT(onIconUrlChanged(QUrl))); connect(page(), &WebPage::featurePermissionRequested, this, &WebView::onFeaturePermissionRequested); diff --git a/examples/webenginewidgets/demobrowser/webview.h b/examples/webenginewidgets/demobrowser/webview.h index 6d9cd46ab6ac3b3cf178d35f1135324b79192c76..c506ec8b9dfbd101fb45e3dccc1e12035a0e72c7 100644 --- a/examples/webenginewidgets/demobrowser/webview.h +++ b/examples/webenginewidgets/demobrowser/webview.h @@ -55,16 +55,11 @@ QT_END_NAMESPACE class BrowserMainWindow; class WebPage : public QWebEnginePage { Q_OBJECT - -signals: - void loadingUrl(const QUrl &url); - public: WebPage(QWebEngineProfile *profile, QObject *parent = 0); BrowserMainWindow *mainWindow(); protected: - bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) Q_DECL_OVERRIDE; QWebEnginePage *createWindow(QWebEnginePage::WebWindowType type) Q_DECL_OVERRIDE; #if !defined(QT_NO_UITOOLS) QObject *createPlugin(const QString &classId, const QUrl &url, const QStringList ¶mNames, const QStringList ¶mValues); @@ -84,7 +79,6 @@ private: // set the webview mousepressedevent Qt::KeyboardModifiers m_keyboardModifiers; Qt::MouseButtons m_pressedButtons; - QUrl m_loadingUrl; }; class WebView : public QWebEngineView {