KUrl or QUrl bug?

Sebastian Trüg trueg at kde.org
Sat Jun 19 07:53:27 BST 2010


On 06/18/2010 11:28 PM, Ingo Klöcker wrote:
> On Friday 18 June 2010, Sebastian Trüg wrote:
>> On 06/18/2010 03:45 PM, David Faure wrote:
>>> On Thursday 17 June 2010, Sebastian Trüg wrote:
>>>> Hi guys,
>>>>
>>>> please find attached a patch to the kurltest which will make it
>>>> fail since an url on which you add a query item and then remove
>>>> it are not equal anymore.
>>>
>>> Yes, because "no query" isn't the same as "an empty query", IIRC.
>>> So after removing the query, you have a url with "an empty query".
>>> Did you try calling .url() on both urls? I suppose url3 will have a
>>> trailing '?'.
>>
>> exactly. I just think it is unwanted behavior. What exactly is this
>> good for? Who would ever want to have an empty query?
> 
> Who would ever want to remove a query item from a query? I assume you 
> need this because otherwise you wouldn't have filed this bug report. But 
> why exactly do you need this?

Well, maybe this can be seen as a corner case, too. But then it should
at least be documented that removing all query items will not remove the
query.
As for why I need it: I am cleaning up query URLs for saving them
without options. IMHO a stright-forward usecase. :)

Cheers,
Sebastian




More information about the kde-core-devel mailing list