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

List:       kfm-devel
Subject:    Re: khtml_to_dom: kdelibs/khtml
From:       Waldo Bastian <bastian () suse ! de>
Date:       1999-09-08 7:37:48
[Download RAW message or body]

On Wed, 08 Sep 1999, CVS by knoll wrote:
> kdelibs/khtml html_documentimpl.cpp,1.1.2.8,1.1.2.9 \
> html_documentimpl.h,1.1.2.6,1.1.2.7 html_tableimpl.h,1.1.2.13,1.1.2.14 \
> kbrowser.cpp,1.3.2.1,1.3.2.2 khtml.cpp,1.48.2.6,1.48.2.7 khtml.h,1.23.2.4,1.23.2.5 \
>                 testkhtml.cpp,1.1.2.6,1.1.2.7
> Author: knoll
> CVSROOT: /home/kde
> Wed Sep  8 00:43:17 MET DST 1999
> Update of /home/kde/kdelibs/khtml
> In directory zeus:/tmp/cvs-serv10436
> 
> Modified Files:
> Tag: khtml_to_dom
> 	html_documentimpl.cpp html_documentimpl.h html_tableimpl.h 
> 	kbrowser.cpp khtml.cpp khtml.h testkhtml.cpp 
> Log Message:
> make clicking on url's work, except for one prob with KURL...
> is KURL(KURL(file:/filename), "newfilename") supposed to return
> an url of 'file:/filenamenewfilename' ??? Or is this a bug?

The first argument is supposed to be the base-URL. Which is different from
the document URL.

You can use the following (1.1.2) code to make a base-URL from a document URL.

void KHTMLWidget::setBaseURL( const char *_url)
{
    baseURL = _url;
    baseURL.setReference( 0 );
    baseURL.setSearchPart( 0 );
 
    QString p = baseURL.httpPath();
 
    if ( p.length() > 0 )
    {
       int pos = p.findRev( '/' );
       if ( pos >= 0 )
          p.truncate( pos );
    }
    p += "/";
 
    baseURL.setPath( p );
} 

So your example should read:

KURL(KURL("file:/"), "newfilename")

Cheers,
Waldo


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

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