From 12a3f3429b66e3cd7eaaabeca17e29bd12df8c4d Mon Sep 17 00:00:00 2001 From: Kugi Eusebio Date: Thu, 29 Jul 2021 00:27:10 +0800 Subject: [PATCH] Fixed #456 Save icon URL of tabs without QtWebEngine's favicon scheme and host --- src/app/webbrowser/Browser.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/webbrowser/Browser.qml b/src/app/webbrowser/Browser.qml index a4d2e17f6..c83e20574 100644 --- a/src/app/webbrowser/Browser.qml +++ b/src/app/webbrowser/Browser.qml @@ -94,7 +94,13 @@ Common.BrowserView { state.uniqueId = tab.uniqueId state.url = tab.url.toString() state.title = tab.title - state.icon = tab.icon.toString() + + if (UrlUtils.schemeIs(tab.icon, "image") && UrlUtils.hostIs(tab.icon, "favicon")) { + state.icon = tab.icon.toString().substring(("image://favicon/").length) + } else { + state.icon = tab.icon.toString() + } + state.preview = Qt.resolvedUrl(PreviewManager.previewPathFromUrl(tab.url)) state.savedState = tab.webview ? tab.webview.currentState : tab.restoreState return state