[Development] QList
Lars Knoll
lars.knoll at qt.io
Mon Mar 20 16:10:53 CET 2017
> On 20 Mar 2017, at 15:56, Konrad Rosenbaum <konrad at silmor.de> wrote:
>
> On Mon, March 20, 2017 15:19, Marc Mutz wrote:
>> Well, seriously. My answer is the same: Time has only one direction. Qt
>> source
>> and binary compatibility only has one direction. If you want to use Qt in
>> a
>> way it was not intended to be used, then you need to pay the prize, and
>> not
>> ask the community to do so for you.
>>
>> You can pay by porting to QVector. Or auto. That will work in Qt 5 and Qt
>> 6.
>> You can define your own MyQListOrQVector type alias. Or you can #ifdef.
>> It's
>> up to you.
>
> Marc, please do not underestimate the impact of laziness! Whether we admit
> it or not: most of us became computer scientists because we're lazy - we
> want to let the machine work for us! ;-)
>
> Everybody else at least works for for someone who is quite tight-fisted
> with the budget.
>
> In other words: if Qt 6 forces me to do any significant amount of porting,
> then I'll stay with Qt 5. I was able to port my biggest Qt 4 application
> to Qt 5 because I could promise my client it'd be done in a couple of days
> and he'd gain lots of features too.
>
> If I have to replace every single occurrence of QList with QVector or auto
> for it to continue working with Qt 6, then I will not get a budget for
> that.
>
> The community will pay for my laziness by having to support an outdated
> framework for much longer. Lazy people are great at externalizing... :-P
I fully agree with you here Konrad. I've seen the pain our customers had to go through when moving from Qt 3 to Qt 4, and I do not want to repeat this. We need to make moving to Qt 6 as painless as possible for our users, otherwise we'll have many people stuck in 5.x for a very long time. And that's very costly for both us and our users.
This means we have to be careful with any changes that could break large amounts of source code. So QList will have to exist as a type in Qt 6 with an API that is as source compatible to the one in Qt 5 as we can make it, while we need to still try to deprecate it for new code and offer better alternatives.
We'll need to try it out, but so far making QList an alias to QVector sounds like the most likely approach we could take.
Cheers,
Lars
More information about the Development
mailing list