Skip to content

Commit 0c42ad0

Browse files
authored
Merge pull request #250 from Xpirix/remove_supportsQt6
Remove supportsQt6 check from metadata.txt and specific QGIS 4.0 conditions
2 parents 2c262af + 769758a commit 0c42ad0

File tree

9 files changed

+41
-623
lines changed

9 files changed

+41
-623
lines changed

qgis-app/plugins/api.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ def plugin_upload(package, **kwargs):
130130
version_data["changelog"] = cleaned_data.get("changelog")
131131
if cleaned_data.get("qgisMaximumVersion"):
132132
version_data["max_qg_version"] = cleaned_data.get("qgisMaximumVersion")
133-
if cleaned_data.get("supportsQt6"):
134-
version_data["supports_qt6"] = cleaned_data.get("supportsQt6")
135-
136133
new_version = PluginVersion(**version_data)
137134
new_version.clean()
138135
new_version.save()

qgis-app/plugins/forms.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,6 @@ def clean(self):
189189
self.instance.changelog = self.cleaned_data.get("changelog")
190190
if "experimental" in self.cleaned_data:
191191
self.instance.experimental = self.cleaned_data.get("experimental")
192-
if "supportsQt6" in self.cleaned_data:
193-
self.instance.supports_qt6 = self.cleaned_data.get("supportsQt6")
194192
return super(PluginVersionForm, self).clean()
195193

196194

qgis-app/plugins/management/commands/update_qt6_support.py

Lines changed: 0 additions & 298 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from django.db import migrations
2+
3+
4+
class Migration(migrations.Migration):
5+
6+
dependencies = [
7+
("plugins", "0018_pluginversionsecurityscan"),
8+
]
9+
10+
operations = [
11+
migrations.RemoveField(
12+
model_name="pluginversion",
13+
name="supports_qt6",
14+
),
15+
]

qgis-app/plugins/models.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ class NewQgisMajorVersionReadyPlugins(BasePluginManager):
109109
"""
110110
Shows only public plugins: i.e. those with "approved" flag set
111111
and with one version that is compatible with the new QGIS major version.
112-
This is determined by checking if the max_qg_version is greater than
113-
or equal to the current QGIS major version and has supports_qt6 flag set.
112+
This is determined by checking if the max_qg_version is greater
113+
than or equal to the new QGIS major version.
114114
This manager filters out deprecated plugins as well.
115115
"""
116116

@@ -120,9 +120,8 @@ def get_queryset(self):
120120
.get_queryset()
121121
.filter(
122122
pluginversion__approved=True,
123-
pluginversion__min_qg_version__gte=f"{settings.CURRENT_QGIS_MAJOR_VERSION}.0",
124-
pluginversion__supports_qt6=True,
125-
deprecated=False,
123+
pluginversion__max_qg_version__gte=f"{settings.NEW_QGIS_MAJOR_VERSION}.0",
124+
deprecated=False
126125
)
127126
.distinct()
128127
.order_by("-created_on")
@@ -907,12 +906,6 @@ class PluginVersion(models.Model):
907906
max_qg_version = QGVersionZeroForcedField(
908907
_("Maximum QGIS version"), max_length=32, null=True, blank=True, db_index=True
909908
)
910-
supports_qt6 = models.BooleanField(
911-
_("Supports Qt6"),
912-
default=False,
913-
help_text=_("Check this box if this version supports Qt6."),
914-
db_index=True,
915-
)
916909
version = VersionField(_("Version"), max_length=32, db_index=True)
917910
changelog = models.TextField(_("Changelog"), null=True, blank=True)
918911

0 commit comments

Comments
 (0)