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

remotes/origin/Falkon/3.0
David Rosca 8 years ago
parent 61299c89b6
commit 33b2f0f908
No known key found for this signature in database
GPG Key ID: EBC3FC294452C6D8
  1. 8
      src/lib/webengine/webview.cpp

@ -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 = u.host();
}
if (title.isEmpty()) {
title = url().toString(QUrl::RemoveFragment);
title = u.toString(QUrl::RemoveFragment);
}
if (title.isEmpty() || title == QL1S("about:blank")) {

Loading…
Cancel
Save