Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PyQGIS Developer Cookbook (>=3.38): the QgsField constructor used in the examples is deprecated #9259

Closed
agiudiceandrea opened this issue Sep 14, 2024 · 2 comments

Comments

@agiudiceandrea
Copy link
Member

agiudiceandrea commented Sep 14, 2024

Description

In various examples, a deprecated QgsField constructor (using QVariant) is used. The examples should be updated to used the non deprecated QgsField constructor (using QMetaType), instead.
Probably other constructors / functions should be updated to use QMetaType.

See qgis/QGIS#57272.

Page URL:
e.g. https://docs.qgis.org/3.34/en/docs/pyqgis_developer_cookbook/vector.html#creating-vector-layers

@DelazJ
Copy link
Collaborator

DelazJ commented Sep 15, 2024

@agiudiceandrea isn't this already fixed: b8fd0fb? Afaict this wasn't backported so 3.34 docs is not a relevant target here.

@agiudiceandrea
Copy link
Member Author

@DelazJ you are right. I was comparing the two versions and I got confused between the two... In 3.34 Qvariant.type is not deprecated.

@agiudiceandrea agiudiceandrea closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants