1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

WebView: Try requestedUrl when url is empty in title()

This commit is contained in:
David Rosca 2018-01-30 17:31:36 +01:00
parent 61299c89b6
commit 33b2f0f908
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8

View File

@ -121,8 +121,14 @@ QString WebView::title(bool allowEmpty) const
return title;
}
const QUrl u = url().isEmpty() ? m_page->requestedUrl() : url();
if (title.isEmpty()) {
title = url().toString(QUrl::RemoveFragment);
title = u.host();
}
if (title.isEmpty()) {
title = u.toString(QUrl::RemoveFragment);
}
if (title.isEmpty() || title == QL1S("about:blank")) {