Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions a00_qpip/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name=qpip
qgisMinimumVersion=3.18
description=PIP dependencies manager for QGIS plugins
version=dev
supportsQt6=True
qgisMaximumVersion=4.99
author=OPENGIS.ch
email=info@opengis.ch

Expand Down
12 changes: 6 additions & 6 deletions a00_qpip/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def initComplete(self):
log(f"Initialization complete. Loading deferred packages")
dialog, run_gui = self.check_deps(additional_plugins=self._defered_packages)
if run_gui:
self.promt_install(dialog)
self.prompt_install(dialog)
self.save_settings(dialog)
self.start_packages(self._defered_packages)
self._defered_packages = []
Expand Down Expand Up @@ -139,7 +139,7 @@ def patched_load_plugin(self, packageName):
log(f"Check on install enabled, we check {packageName}.")
dialog, run_gui = self.check_deps(additional_plugins=[packageName])
if run_gui:
self.promt_install(dialog)
self.prompt_install(dialog)
self.save_settings(dialog)
self.start_packages([packageName])
res = True
Expand Down Expand Up @@ -202,9 +202,9 @@ def check_deps(self, additional_plugins=[]) -> Union[MainDialog, bool]:
)
return dialog, needs_gui

def promt_install(self, dialog: MainDialog):
"""Promts the install dialog and ask the user what to install"""
if dialog.exec_():
def prompt_install(self, dialog: MainDialog):
"""Prompts the installation dialog and ask the user what to install"""
if dialog.exec():
reqs_to_uninstall = dialog.reqs_to_uninstall
if reqs_to_uninstall:
log(f"Will uninstall selected dependencies : {reqs_to_uninstall}")
Expand Down Expand Up @@ -320,7 +320,7 @@ def python_command(self):

def check(self):
dialog, _ = self.check_deps()
self.promt_install(dialog)
self.prompt_install(dialog)
self.save_settings(dialog)

def show_folder(self):
Expand Down
4 changes: 2 additions & 2 deletions a00_qpip/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from typing import Dict, List

from pkg_resources import DistributionNotFound, VersionConflict
from PyQt5 import uic
from qgis.core import QgsApplication
from qgis.PyQt import uic
from qgis.PyQt.QtCore import Qt
from qgis.PyQt.QtGui import QColor
from qgis.PyQt.QtWidgets import QComboBox, QDialog, QTableWidgetItem
Expand All @@ -30,7 +30,7 @@ def __init__(self, libs: List[Lib], check_on_startup, check_on_install):
def make_widget(label, tooltip=None):
item = QTableWidgetItem(label)
item.setToolTip(tooltip)
item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
item.setFlags(Qt.ItemFlag.ItemIsSelectable | Qt.ItemFlag.ItemIsEnabled)
return item

def make_error_widget(error_type):
Expand Down
2 changes: 1 addition & 1 deletion a00_qpip/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def run_cmd(args, description="running a system command"):
progress_dlg = QProgressDialog(
description, "Abort", 0, 0, parent=iface.mainWindow()
)
progress_dlg.setWindowModality(Qt.WindowModal)
progress_dlg.setWindowModality(Qt.WindowModality.WindowModal)
progress_dlg.show()

startupinfo = None
Expand Down