[Development] Proposal: Deprecate QVector in Qt 6

Joerg Bornemann joerg.bornemann at qt.io
Fri Apr 24 08:57:35 CEST 2020


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.


Cheers,

Joerg


More information about the Development mailing list