[Development] QList

Thiago Macieira thiago.macieira at intel.com
Sun Mar 26 19:49:39 CEST 2017


Em sábado, 25 de março de 2017, às 23:30:46 PDT, Philippe escreveu:
> > Il 25/03/2017 23:23, Philippe ha scritto:
> > > Indeed, as a user of QPolygon, I do see and handle a QPolygon as a
> > > vector of points...
> > 
> > None of these properties strictly depend on the fact that a QPolygon
> > _is-a_ QVector.
> 
> For sure, but where is the problem of having QPolygon publicly
> inheriting from a QVector, since the API of QVector is reusable and useful
> at times, as mentionned? Why changing something that works well and that
> is conceptually far from shocking?

The MSVC ABI problem. We get linker errors in some cases. qvector.h still has 
a "### Qt5" comment:

/*
   ### Qt 5:
   ### This needs to be removed for next releases of Qt. It is a workaround 
for vc++ because
   ### Qt exports QPolygon and QPolygonF that inherit QVector<QPoint> and
   ### QVector<QPointF> respectively.
*/

This was most recently touched in commit 
39e80062d0cf0c25b456bd89be827e50a6077efa, relating to the Intel compiler on 
Windows. See 

http://code.qt.io/cgit/qt/qtbase.git/commit/?
id=39e80062d0cf0c25b456bd89be827e50a6077efa

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list