From kde-core-devel Tue Mar 13 00:29:24 2001 From: Thiago Macieira Date: Tue, 13 Mar 2001 00:29:24 +0000 To: kde-core-devel Subject: Re: IPv6 -- we're almost there X-MARC-Message: https://marc.info/?l=kde-core-devel&m=98445727911043 Waldo Bastian wrote: > On Monday 12 March 2001 15:02, Thiago Macieira wrote: > >> Meanwhile, I've found a bug in KURL, when an URL with brackets is given >> (e.g., http://[::1]). It will parse the URL correctly, but >> KURL::prettyURL won't include the brackets. The following patch fixes >> it, but the solution is not "elegant". Should I commit it anyways? > > > Well, yes, since we have to keep BC it's hard to come up with an 'elegant' > solution. KURL::url() had a similair workaround, I have added the same thing > for prettyURL(). Another solution I had thought of was to make it check for all the characters that need to be enclosed in brackets, which includes the ':' character. Since I don't have that list, I didn't implement that. That could also be set to a new bool in this->d. BTW, in regards to your solution, '[' + m_strHost + ']' requires more code than doing += for each element. Unless I'm wrong, that will require two temporary QStrings to be created and destroyed. -- Thiago Macieira - UFOT Registry number: 1001 thiagom@mail.com talha@geocities.com ICQ UIN: 1967141 PGP: 0x8F2978D5 and 0xEA9037A5 Registered Linux user #65028 54/388. Let's make sure history never forgets the name Enterprise. -- Capt. Picard, "Yesterday's Enterprise"