[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: 2 Suburl patches for review: khtml_part.cpp & job.cpp
From: Laurence Anderson <l.d.anderson () warwick ! ac ! uk>
Date: 2003-08-16 14:10:05
[Download RAW message or body]
Hi,
At last, I've managed to fix enough of the suburl related bugs to get a
modified kio_tar to work with suburls (ie. file:/home/me/file.tar#tar:/
rather than tar:/home/me/file.tar/), which I will post once I have committed
these patches. However I'm not quite sure about the remaining two patches, so
I'd appreciate it if people could have a look.
kdelibs/khtml/khtml_part.cpp
I have removed the following code from khtml_part.cpp in void
KHTMLPart::begin:
KURL::List lst = KURL::split( m_url );
if ( !lst.isEmpty() )
baseurl = *lst.begin();
I'm not quite sure why the code was there initially, maybe it was todo with
the error protocol that uses suburls? Without these changes if a html file
has a location of:
file:/home/me/archive.war#tar:/index.html
baseurl would be set to file:/home/me/archive.war, which is incorrect. With
this code removed it seems to make the following lines irrelevant, any
comments.
kdelibs/kio/kio/job.cpp
I have removed the following line from job.cpp in SimpleJob::SimpleJob:
if (m_url.hasSubURL())
{
KURL::List list = KURL::split(m_url);
KURL::List::Iterator it = list.fromLast();
XX m_url = *it; XX
I don't know what the original intention was, but it causes KDirLister to
crash, as it expects job->url() to return the same value as the job was
constructed with (which seems fair enough).
Thanks for you comments,
Laurence
["job.diff" (text/x-diff)]
Index: job.cpp
===================================================================
RCS file: /home/kde/kdelibs/kio/kio/job.cpp,v
retrieving revision 1.352
diff -u -p -r1.352 job.cpp
--- job.cpp 14 Aug 2003 09:33:05 -0000 1.352
+++ job.cpp 16 Aug 2003 14:07:06 -0000
@@ -386,7 +386,6 @@ SimpleJob::SimpleJob(const KURL& url, in
{
KURL::List list = KURL::split(m_url);
KURL::List::Iterator it = list.fromLast();
- m_url = *it;
list.remove(it);
m_subUrl = KURL::join(list);
//kdDebug(7007) << "New URL = " << m_url.url() << endl;
["khtml.diff" (text/x-diff)]
Index: khtml_part.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtml_part.cpp,v
retrieving revision 1.872
diff -u -p -r1.872 khtml_part.cpp
--- khtml_part.cpp 11 Aug 2003 15:04:45 -0000 1.872
+++ khtml_part.cpp 16 Aug 2003 14:06:38 -0000
@@ -1508,10 +1508,6 @@ void KHTMLPart::begin( const KURL &url,
if ( !m_url.isEmpty() )
{
- KURL::List lst = KURL::split( m_url );
- if ( !lst.isEmpty() )
- baseurl = *lst.begin();
-
KURL title( baseurl );
title.setRef( QString::null );
title.setQuery( QString::null );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic