khtmlpart and socket error: -1 (pykde)

Lee Braiden lee.b at digitalunleashed.com
Sun May 7 14:41:49 BST 2006


Hi,

Please copy me in on any replies to this, since I don't read this list 
regularly.  Thanks.


I have a (pykde) application that subclasses khtmlpart.  In one branch, it 
works, in the other (a code cleanup) it doesn't.  However, I can't see any 
obvious reason for the difference.

In the cleanup branch, khtmlpart no longer loads any standard urls (namely, 
http://* or file://*).  Instead, it writes:

--------------
An error occurred while loading 
file://localhost/home/jel/Projects/KatchTV-cleanup/Docs/Manual/index.html:
The process for the file://localhost protocol died unexpectedly.
--------------

to the khtmlpart window, and:

--------------
kdecore (KNetwork socket): WARNING: Error listening on socket: -1
--------------


To summarise the code...

My subclass, KTVHTMLPart, is pretty much stock, except that it adds support 
for a new "protocol", "katchtv:", which is begin()/write()/end()'d by the 
application, rather than loaded from a kioslave.

I've reimplemented urlSelected(), goToURL().  and openURLRequestDelayed(), by 
connecting them to the appropriate signals.

goToURL() does some checking for the custom katchtv: urls, and dispatches to 
methods that do write() for those custom pages.  For other (standard) URLs, 
it calls openURL()

My urlSelected() and openURLRequestDelayed() handlers just call goToURL().


Now... the newer, code cleanup branch basically just moves some classes into 
separate files.  I did remove some cruft, and I moved a signal handler from 
the kmainwindow-derived class into the ktvhtmlpart class.  But as far as I 
can tell, this is all fine.


It's all running on the same system, and again, one branch works while the 
other doesn't.  Could someone take a look at the attached code (if it's not 
immediately obvious from what I said above) and tell me what might be 
happening here?

Also, if I've missed something really simple... is there a good (detailed) 
guide to using/subclassing khtmlpart?

Thanks :)


-- 
Lee Braiden
http://DigitalUnleashed.com

"Visions without implementation are hallucinations."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KTVHTMLPart.py
Type: application/x-python
Size: 23674 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20060507/b2c18ae3/attachment.bin>


More information about the kfm-devel mailing list