[Development] QUrl setPath Qt4 vs Qt5

Samuel Gaist samuel.gaist at edeltech.ch
Mon Sep 29 09:13:50 CEST 2014


On 29 sept. 2014, at 09:08, Ziller Eike <Eike.Ziller at digia.com> wrote:

> Just for completeness ;)
> 
> https://bugreports.qt-project.org/browse/QTBUG-27728
> 

Thanks :)

Since it's a documentation update and 5.4 is not officially out, should I target 5.3 ?

> 
> On Sep 28, 2014, at 9:52 AM, Samuel Gaist <samuel.gaist at edeltech.ch> wrote:
> 
>> 
>>> On 28 sept. 2014, at 03:26, Thiago Macieira <thiago.macieira at intel.com> wrote:
>>> 
>>>> On Sunday 28 September 2014 01:02:11 Samuel Gaist wrote:
>>>> Hi,
>>>> 
>>>> Following a post on the forum, I've checked and there's been a behavior
>>>> change in QUrl's setPath between Qt 4 and Qt 5 that is not mentioned in the
>>>> "C++ API changes" chapter.
>>>> 
>>>> If I understood correctly:
>>>> 
>>>> QUrl example1("http://www.example.com");
>>>> example1.setPath("pub/something");
>>>> 
>>>> makes example1 invalid in Qt 5 due to the fact that "pub/something" is a
>>>> relative path (following QUrl documentation and test) but in Qt 4 the
>>>> result is "http://www.example.com/pub/something".
>>>> 
>>>> Should it be considered bug in Qt 4 that needs fixing ? However fixing it
>>>> might break existing application that could be relying on that behavior. In
>>>> this case, simply add the API break in Qt 5's documentation ?
>>> 
>>> Yes, it's a bug in Qt 4, bug I won't fix it because it's not that important and 
>>> would require a major change.
>>> 
>>> QUrl in Qt 4 has quite a few known issues with encoding and decoding of 
>>> delimiters too. And its QString constructor is a completely flawed design and 
>>> should never be used.
>>> 
>>> QUrl changed considerably in Qt 5 to comply better with the URL specifications 
>>> and with brokenness out there. If we add anything to the documentation, it 
>>> would be the previous sentence, with no extra details.
>> 
>> I remember now following a discussion about that matter some time ago.
>> 
>> Fine for me. I'll update the API change doc to include that so future users won't be surprised.
>> 
>> Samuel
>> _______________________________________________
>> Development mailing list
>> Development at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/development
> 
> -- 
> Eike Ziller, Senior Software Engineer - Digia, Qt
> 
> Digia Germany GmbH, Rudower Chaussee 13, D-12489 Berlin
> Geschäftsführer: Mika Pälsi, Juha Varelius, Tuula Haataja
> Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B
> 
> 




More information about the Development mailing list