QList<const Type*> no working anymore in SIP 6

Phil Thompson phil at riverbankcomputing.com
Tue Apr 4 11:10:23 BST 2023


On 03/04/2023 13:42, Julien Cabieces wrote:
> Hi,
> 
> I get this error :
> 
> sip_analysispart10.cpp:593:26: error: no matching constructor for
> initialization of 'QList< ::QgsRasterCalcNode *>'
>             sipRes = new QList< 
> ::QgsRasterCalcNode*>(sipCpp->findNodes(a0));
>                          ^                            
> ~~~~~~~~~~~~~~~~~~~~~
> /usr/include/qt6/QtCore/qcontainerfwd.h:25:29: note: candidate
> constructor (the implicit copy constructor) not viable: no known
> conversion from 'QList<const QgsRasterCalcNode *>' to 'const
> QList<QgsRasterCalcNode *>' for 1st argument
> 
> ...
> 
> for the following sip definition
> 
>     QList<const QgsRasterCalcNode *> findNodes( const
> QgsRasterCalcNode::Type type ) const;
> 
> The SIP generated cpp code miss the const keyword
> 
>    sipRes = new QList< ::QgsRasterCalcNode*>(sipCpp->findNodes(a0));
> 
> It was working with SIP 4.19.25 and no longer works with SIP 6.
> 
> Is this an issue or am I missing something?

Works fine for me.  Which SIP and PyQt6 versions?

Phil


More information about the PyQt mailing list