[Development] QList for Qt 6

Lars Knoll lars.knoll at qt.io
Mon May 27 14:25:59 CEST 2019



On 27 May 2019, at 13:51, Eike Ziller <Eike.Ziller at qt.io<mailto:Eike.Ziller at qt.io>> wrote:



On 27. May 2019, at 12:49, Lars Knoll <lars.knoll at qt.io<mailto:lars.knoll at qt.io>> wrote:

On 27 May 2019, at 11:37, Giuseppe D'Angelo <giuseppe.dangelo at kdab.com<mailto:giuseppe.dangelo at kdab.com>> wrote:

Il 27/05/19 10:24, Simon Hausmann ha scritto:
Hi,
I’m very much in favor of having QList be an alias for QVector and try it out, in qt5, with creator and KDE.

Could someone please summarize where we are inside this thread? Now I'm completely lost…

My summary would be as follows:

* We rename QList to QArrayList
* We can still discuss whether it should rather be Qt5::QList
* QStringList and QBAList will be implemented using QVector
* QList becomes an alias to QVector in wip/qt6 (for now at least)
* We delay the decision on what QList will be in Qt 6 for a little while
* QVector for Qt 6 will most likely be updated with the changes Thiago has waiting since quite some years

What is the summary for these?

Thiago?


* To be able to reach a decision:
* we test some Qt libs and apps with QList being an alias to QVector
* We know that the only source incompatibility is the stability of references

At least the following are source incompatibilities currently (though easily noticeable because they generate compile errors):

- QVector doesn’t have to/fromSet, to/fromStdList or (obviously) to/fromVector

See https://codereview.qt-project.org/c/qt/qtbase/+/260813 . To/fromVector will be added as deprecated methods in Qt 6.

- QVector requires the value type to be default constructible

Already fixed , see https://codereview.qt-project.org/c/qt/qtbase/+/242197

Cheers,
Lars


* If it turns out that most of Qt and (maybe also KDE) run without problems with QList = QVector, we should IMO go down that route.
* The reason is that aliasing those classes will resolve many other problems we could otherwise run into

Cheers,
Lars

_______________________________________________
Development mailing list
Development at qt-project.org<mailto:Development at qt-project.org>
https://lists.qt-project.org/listinfo/development

--
Eike Ziller
Principal Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin
eike.ziller at qt.io<mailto:eike.ziller at qt.io>
http://qt.io<http://qt.io/>
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin, Registergericht: Amtsgericht Charlottenburg, HRB 144331 B

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20190527/7e32ec55/attachment.html>


More information about the Development mailing list