[Development] Proposal: Deprecate QVector in Qt 6
Oliver Wolff
oliver.wolff at qt.io
Fri Apr 24 09:11:32 CEST 2020
Hi
On 24.04.2020 08:57, Joerg Bornemann wrote:
> On 4/23/20 15:52, Thiago Macieira wrote:
>
>>> Proposed:
>>>
>>> template <typename T> using QVector = QList<T>; // mark deprecated
>>> template <typename T> class QList { $(implementation to be
>>> moved); }
>>
>> Proposal 2:
>>
>> template <typename T> class QList { $(implementation to be moved); }
>> template <typename T> using QVector = QList<T>;
>>
>> no deprecation.
>
> +1 for proposal 2.
>
> Alternatively, proposal 3 (aka "do almost nothing"):
> template <typename T> class QVector { implementation }
> template <typename T> using QList = QVector<T>;
>
> No deprecation of QVector.
> No replacement of QList with QVector in our API.
>
> Rationale: QList is our default sequential container, and in Qt6 we just
> change its implementation.
>
> The "people have been told many times to not use QList" argument can be
> countered with "this has been fixed in Qt6".
>
> The "vector is a silly name from a mathematical standpoint" argument is
> valid, but vector is an established term in C++ world. Sorry, that ship
> has sailed.
>
I am also in favor of proposal 2 or 3. I think deprecating either QList
or QVector without any big advantage for the user will just make porting
form Qt5 to Qt6 needlessly harder.
Even inside Qt we are struggling to keep up with deprecation warnings
(Thanks to Friedemann for fixing these). I am pretty sure Creator does
have the same "problem". Extrapolating that from "just us" to the
broader audience we are hopefully targetting, it looks like lots of
users/applications will be hit by these warnings and it will mean (lots
of?) work for them.
Cheers,
Olli
>
> Cheers,
>
> Joerg
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development
More information about the Development
mailing list