Skip to content

pyqt5_to_pyqt6.py: Some suggestions reference wrong class #64462

Description

@kannes

What is the bug or the crash?

Having the enum QgsProcessing.TypeVectorLine leads to the suggestion Enum error, add 'ProcessingSourceType' before 'TypeVectorLine' which would lead to QgsProcessing.ProcessingSourceType.TypeVectorLine which is wrong.

The correct enum would be QgsProcessing.SourceType.TypeVectorLine if compatibility with QGIS <3.36 is wanted or Qgis.ProcessingSourceType.VectorLine if QGIS >=3.36 is ok.

Same for e.g. QgsProcessingParameterNumber.Double where the script suggests the wrong QgsProcessingParameterNumber.ProcessingNumberParameterType.Double.

Correct would be either QgsProcessingParameterNumber.Type.Double (QGIS <3.36) or Qgis.ProcessingNumberParameterType.Double (QGIS >=3.36).

I assume the same happens for other Processing related enums.

References:

Steps to reproduce the issue

See above

Versions

Latest qt5_to_qt6.py (I presume) via registry.gitlab.com/oslandia/qgis/pyqgis-4-checker/pyqgis-qt-checker:latest

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugEither a bug report, or a bug fix. Let's hope for the latter!

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions