ohos: Do not emit titleChanged for an automatically generated title
When a page load fails, the resulting error page has no <title>
element, so ArkWeb generates a title from the failing URL and reports
it through onTitleReceive. OnTitleReceiveEvent marks such a title with
isRealTitle set to false, distinguishing it from a title taken from the
page's <title> element.
Forwarding a generated title as a titleChanged signal reports a title
change for a page that has no real title. For a failed load this is
checked by test_title() in
tests/auto/qml/qquickwebview/tst_qquickwebview.qml, which expects no
titleChanged after a failed load.
Ignore title updates whose isRealTitle is false: do not emit
titleChanged and do not update the cached title. Because getTitle()
returns a plain string with no way to tell a real title from a
generated one, cache the title reported through onTitleReceive and let
title() return the cached value instead of querying the controller, so
the signal and the property stay consistent and a page without a real
title keeps the previously reported title.
Task-number: QTBUG-146838
Pick-to: 6.12
Change-Id: I8bcbc684168161a2a9db496b5cc7efaa759a8a6d
Reviewed-by: Liang Qi <liang.qi@qt.io>