Make Konqueror's searchbar plugin work with any KPart based browser engine...

Friedrich W. H. Kossebau kossebau at kde.org
Fri Sep 25 19:24:52 BST 2009


Hi Dawit,

Vendredi, le 25 septembre 2009, à 18:02, Dawit A. a écrit:
> Hello,
>
> Since there is no "Konqueror" or "Konq-plugins" group in reviewboard, I am
> going to post this patch here. As the subject states the attached patch
> makes it possible for the searchbar plugin to be used with rendering
> engines other other than khtml, e.g. webkitpart.
>
> Please CC me when you reply since I am not subscribed to kfm-devel.

@@ -458,7 +459,7 @@
 
 void SearchBarPlugin::updateComboVisibility()
 {
-    bool isBrowser = m_part && dynamic_cast<KHTMLPart *>(m_part);
+    bool isBrowser = (m_part && m_part->browserExtension());

The name "browserExtension()" might have lead you to the wrong assumption. The 
BrowserExtension [BE] is an extension of KParts for better support _of_ 
browser-a-like containers like Konqueror, for stuff like going back and 
forward in history. It is not the extension of a (HTML) browsing-able KPart.

Besides the KHtmlPart at least the KParts of Kate and Okteta are implementing 
this extension. So this check for "isBrowser" does not work I fear.

[BE] 
http://api.kde.org/4.x-api/kdelibs-apidocs/kparts/html/classKParts_1_1BrowserExtension.html

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta




More information about the kfm-devel mailing list