diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-17 11:12:44 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-04-17 11:12:44 +0200 |
commit | e78d3cc07f4b29518c4ebe15e3ab56c73c4cace5 (patch) | |
tree | 9c64aa396fcca4ba87b7fa05de13546d9c4c27a4 /src/webengine/webview.cpp | |
parent | Enabled address bar suggestions (diff) | |
download | smolbote-e78d3cc07f4b29518c4ebe15e3ab56c73c4cace5.tar.xz |
Address bar searches work again
Diffstat (limited to 'src/webengine/webview.cpp')
-rw-r--r-- | src/webengine/webview.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
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) |