[Development] QList

Marc Mutz marc.mutz at kdab.com
Mon Mar 20 15:19:32 CET 2017


On Monday 20 March 2017 14:52:36 Ville Voutilainen wrote:
> On 20 March 2017 at 15:52, Marc Mutz <marc.mutz at kdab.com> wrote:
> > So, e.g.: Pay twice the fees to use a compatibility QList until Qt 7 or
> > pay the normal price and port, possibly with an automated tool a la
> > clang- modermize.
> 
> And if I want to run the same code with Qt 5 and Qt 6? I don't want to
> modernize it,
> since that may change or break what it does on Qt 5, and I also don't
> want to modernize code
> as part of my build in a dynamic fashion, because that costs time and can
> cause version control problems. If we want Qt to be a library that caters
> to various different
> user scenarios, we should first stop assuming that one-way
> modernization tools are
> a realistic solution to compatibility problems.

That from someone that just broke an awful lot of lines of C++ code by making 
noexcept be part of the function type :P

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.

Thanks,
Marc

-- 
Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts



More information about the Development mailing list