--- a/ProjectPyramid/DistributionTypeSelectionDialog.py Sat May 29 15:05:16 2021 +0200 +++ b/ProjectPyramid/DistributionTypeSelectionDialog.py Tue Jun 01 19:37:46 2021 +0200 @@ -7,10 +7,10 @@ Module implementing a dialog to select the distribution file formats. """ -from PyQt5.QtCore import Qt, QProcess -from PyQt5.QtWidgets import QDialog, QListWidgetItem +from PyQt6.QtCore import Qt, QProcess +from PyQt6.QtWidgets import QDialog, QListWidgetItem -from E5Gui import E5MessageBox +from EricWidgets import EricMessageBox from .Ui_DistributionTypeSelectionDialog import ( Ui_DistributionTypeSelectionDialog @@ -29,9 +29,11 @@ Constructor @param project reference to the project object - (ProjectPyramid.Project.Project) - @param projectPath path of the Pyramid project (string) - @param parent reference to the parent widget (QWidget) + @type Project + @param projectPath path of the Pyramid project + @type str + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent) self.setupUi(self) @@ -68,10 +70,10 @@ itm = QListWidgetItem( "{0} ({1})".format(fileFormat, description), self.formatsList) - itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) - itm.setCheckState(Qt.Unchecked) + itm.setFlags(itm.flags() | Qt.ItemFlag.ItemIsUserCheckable) + itm.setCheckState(Qt.CheckState.Unchecked) else: - E5MessageBox.critical( + EricMessageBox.critical( None, self.tr('Process Generation Error'), errMsg) @@ -80,12 +82,13 @@ """ Public method to retrieve the checked formats. - @return list of selected formats (list of string) + @return list of selected formats + @rtype list of str """ formats = [] for row in range(self.formatsList.count()): itm = self.formatsList.item(row) - if itm.checkState() == Qt.Checked: + if itm.checkState() == Qt.CheckState.Checked: fileFormat = itm.text().split(None, 1)[0].strip() if fileFormat: formats.append(fileFormat)