[QGIS-Developer] Qt6: qgsspatialindex.sip: line 148: column 5: 'QgsSpatialIndex::intersects' has an unsupported return type
Julien Cabieces
julien.cabieces at oslandia.com
Tue May 28 08:20:47 PDT 2024
Hi German,
If I believe the PR [0] I pushed 4 month ago, QList<qint64> is now
wrapped so there is no need to add it in conversions.sip
If I remember correctly we can't add it back because we would get some
type colliding on other system (fedora for instance). I fail to find exact reason of why we needed it before
and we don't need it now, but I just remember it was the right things to
do.
Anyway, it seems to work on fedora, but there is something wrong on
Debian that would need further investigation.
Regards,
Julien
[0] https://github.com/qgis/QGIS/pull/55674
> Hi Richard and Julien,
>
> Thanks a lot for sharing the steps to compile QGIS with Qt6 on Debian. I followed your steps on Ubuntu Noble (24.04) and I've been able to
> reach this point that you're mentioning in this thread, namely:
>
> 'QgsSpatialIndex::intersects' has an unsupported return type - provide %MethodCode and a C++ signature
> 'QgsSpatialIndex::nearestNeighbor' has an unsupported return type - provide %MethodCode and a C++ signature
> 'QgsSpatialIndex::nearestNeighbor' has an unsupported return type - provide %MethodCode and a C++ signature
> 'QgsAttributeTableView::selectedFeaturesIds' has an unsupported return type - provide %MethodCode and a C++ signature
> ninja: build stopped: subcommand failed.
>
> For me, it has worked by bringing back the MethodCode removed at [1] (which dealt with QList<qint64>). Namely, I copied these lines [2] to
> python/PyQt6/core/conversions.sip and built QGIS again.
>
> After doing that, and after installing a couple of missing libs (pytho3-pyqt6.qtpositioning and pytho3-pyqt6.qtserialport), QGIS runs with Python
> bindings enabled on Qt6.
>
> Julien, could this MethodCode be still needed for particular SIP versions? Could we bring back this MethodCode to
> python/PyQt6/core/conversions.sip or what could be the recommended approach?
>
> Regards,
>
> Germán
> ------------
> [1] https://github.com/qgis/QGIS/pull/55674/commits/5711a69d26e980395529b56e8e3fa757fbfb5550
> [2] https://github.com/qgis/QGIS/blob/895193f2dddb616cfd21c8cdde037b971f15aa32/python/core/conversions.sip#L1566-L1613
>
>
> El mié, 31 ene 2024 a las 9:11, Richard Duivenvoorde via QGIS-Developer (<qgis-developer at lists.osgeo.org>) escribió:
>
> Hi,
>
> My Qt6 (test) build stops with the following:
>
> Generating the gui bindings...
> sip-build: /home/richard/git/qgisqt6/build/python/core/auto_generated/qgsspatialindex.sip: line 148: column 5:
> 'QgsSpatialIndex::intersects' has an unsupported return type - provide %MethodCode and a C++ signature
> /home/richard/git/qgisqt6/build/python/core/auto_generated/qgsspatialindex.sip: line 159: column 5: 'QgsSpatialIndex::nearestNeighbor'
> has an unsupported return type - provide %MethodCode and a C++ signature
> /home/richard/git/qgisqt6/build/python/core/auto_generated/qgsspatialindex.sip: line 179: column 5: 'QgsSpatialIndex::nearestNeighbor'
> has an unsupported return type - provide %MethodCode and a C++ signature
> /home/richard/git/qgisqt6/build/python/gui/auto_generated/attributetable/qgsattributetableview.sip: line 63: column 5:
> 'QgsAttributeTableView::selectedFeaturesIds' has an unsupported return type - provide %MethodCode and a C++ signature
> ninja: build stopped: subcommand failed.
>
> Is this my setup?
> Do others succeed in creating the python bindings?
>
> python3-sip/testing,now 4.19.25+dfsg-5+b2 amd64 [installed]
> python3-pyqt6.sip/testing,now 13.6.0-1+b1 amd64 [installed,automatic]
> python3-sipbuild/testing,now 6.8.1+dfsg-1 all [installed,automatic]
>
> Regards,
>
> Richard Duivenvoorde
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
--
Julien Cabieces
Senior Developer at Oslandia
julien.cabieces at oslandia.com
More information about the QGIS-Developer
mailing list