[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    khtmlpart and socket error: -1 (pykde)
From:       Lee Braiden <lee.b () digitalunleashed ! com>
Date:       2006-05-07 13:41:49
Message-ID: 200605071441.50434.lee.b () digitalunleashed ! com
[Download RAW message or body]


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."

["KTVHTMLPart.py" (application/x-python)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic