From e78d3cc07f4b29518c4ebe15e3ab56c73c4cace5 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Tue, 17 Apr 2018 11:12:44 +0200 Subject: Address bar searches work again --- src/webengine/webview.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/webengine/webview.cpp') diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index d145d2b..1e5d8d5 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -74,10 +74,16 @@ int WebView::loadProgress() const return m_loadProgress; } +void WebView::search(const QString& term) +{ + const QString searchUrl = m_profile->search().arg(QString(QUrl::toPercentEncoding(term))); + load(searchUrl); +} + WebView *WebView::createWindow(QWebEnginePage::WebWindowType type) { if(m_parentWindow == nullptr) { - qDebug("parent window not found!"); + qDebug("WebView::createWindow: parent window not found, returning nullptr"); return nullptr; } @@ -111,7 +117,7 @@ WebView *WebView::createWindow(QWebEnginePage::WebWindowType type) void WebView::handleLinkHovered(const QString &url) { // TODO: tooltip - qDebug("%s", qUtf8Printable(url)); + Q_UNUSED(url); } void WebView::triggerViewAction(WebView::ViewAction action) -- cgit v1.2.1