Konqueror and empty window title...
adawit at kde.org
Wed Aug 19 15:32:49 BST 2009
Is there any good reason why empty titles are not allowed in Konqueror's title
bar ? Both of the setCaption member functions in KonqMainWindow.cpp (@ 4351)
and KonqView.cpp (@ 700) reject an empty caption.
I am in the process of fixing the history navigation issues when using the
webkitpart and I have ironed out all the issues except when no title is
present in the document being displayed. In other words a missing <TITLE> tag
in the document which is affected by the issue above.
What happens in webkitpart is that whenever QtWebKit emits the titleChanged
signal the parts setWindowCaption signal is invoked. However, QtWebkit always
first clears the title everytime the url changes by emitting titleChanged with
an empty/null strings and sets is to the current title after it parses the
<TITLE> tag in the new document. However, because of the restrictions imposed
by Konqueror in the above two functions, the title from the previous document
remains displayed if the current document does not provide a title. This is
always the case if the user clicks on a link to a text document in webkitpart
for example. The result is the entries in the history navigation buttons
(forward/backward) will contain show the wrong text (previous title).
The attached patch changes this behavior in Konqueror, but I am not sure why
an empty caption was disallowed in the first place. If it was to prevent an
empty entry from showing up in the back/forward buttons, I have tried to
address that in this patch by using the location bar url instead when the
title is empty. Perhaps, boomarking needs similar fix ?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1444 bytes
Desc: not available
More information about the kde-core-devel