Support Qgis 4#205
Merged
Merged
Conversation
…4 (otherwise is ignored)
There was a problem hiding this comment.
Pull request overview
This PR updates the QGIS-Tim plugin to be compatible with QGIS 4 by switching PyQt imports to qgis.PyQt and updating numerous QGIS/Qt enum references to their scoped (Qt6-style) forms. It also bumps the development version to 0.7.0.dev2 and updates documentation/tutorial requirements to no longer exclude QGIS 4.
Changes:
- Migrated PyQt imports across the plugin from
PyQt5toqgis.PyQtand updated scoped enums for QGIS 4 / Qt6 compatibility. - Updated QGIS API enum usages (message levels, task flags, layer proxy filters, raster/mesh settings, etc.).
- Bumped package/plugin versions to
0.7.0.dev2and adjusted docs/tutorial requirements around supported QGIS versions.
Reviewed changes
Copilot reviewed 40 out of 40 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Version bump to 0.7.0.dev2. |
| pixi.toml | Version bump and QGIS dependency range adjusted for dev env. |
| gistim/init.py | Version bump to 0.7.0.dev2. |
| plugin/qgistim/metadata.txt | Declares QGIS max version and bumps plugin version/changelog. |
| plugin/qgistim/qgistim.py | Updates dock widget area enum usage for Qt6-style enums. |
| plugin/qgistim/resources.py | Switches resource module import to qgis.PyQt. |
| plugin/qgistim/core/task.py | Updates task cancel flag and message level enums. |
| plugin/qgistim/core/processing.py | Updates QtCore imports and QGIS enum scoping (mesh resampling, temporal mode). |
| plugin/qgistim/core/layer_styling.py | Updates QtGui import and QGIS enum scoping for styling/statistics/label placement. |
| plugin/qgistim/core/geopackage.py | Updates QgsVectorFileWriter enums for QGIS 4 API. |
| plugin/qgistim/core/elements/aquifer.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/building_pit.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/circular_area_sink.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/constant.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/discharge_observation.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/domain.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/element.py | Switches widget imports to qgis.PyQt and replaces exec_() with exec(). |
| plugin/qgistim/core/elements/head_line_sink.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/headwell.py | Switches Qt imports (QVariant, QColor) to qgis.PyQt. |
| plugin/qgistim/core/elements/impermeable_line_doublet.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/leaky_building_pit.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/leaky_line_doublet.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/line_sink_ditch.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/observation.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/particle.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/polygon_area_sink.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/polygon_inhomogeneity.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/polygon_semi_confined_top.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/uniform_flow.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/core/elements/well.py | Switches QVariant import to qgis.PyQt. |
| plugin/qgistim/widgets/compute_widget.py | Updates Qt imports and QGIS enum scoping (filters, alignment, task dependency, mesh resampling). |
| plugin/qgistim/widgets/dataset_widget.py | Updates Qt imports and enum scoping (selection mode, sizing, header resize mode, message levels, unit enums, message box buttons). |
| plugin/qgistim/widgets/elements_widget.py | Switches widgets import to qgis.PyQt and updates message level enum. |
| plugin/qgistim/widgets/error_window.py | Switches widgets import to qgis.PyQt (formatting cleanup). |
| plugin/qgistim/widgets/install_dialog.py | Switches Qt imports to qgis.PyQt and updates task flags / message levels / button enums / alignment enum. |
| plugin/qgistim/widgets/tim_widget.py | Switches Qt imports to qgis.PyQt and updates suppress/alignment enums. |
| docs/install.qmd | Updates supported QGIS version wording to allow QGIS 4+. |
| docs/tutorial_TheHague.qmd | Updates requirements to allow QGIS 4+. |
| docs/tutorial_Rijsenhout.qmd | Updates requirements to allow QGIS 4+. |
| docs/tutorial_particle_tracking.qmd | Updates requirements to allow QGIS 4+. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #191
Converted with the script https://github.com/qgis/QGIS/wiki/Plugin-migration-to-be-compatible-with-Qt5-and-Qt6
Had to manually fix two things:
I also explicitly set the permissions for GitHub pages, so that that doesn't break anymore