59 else: |
59 else: |
60 self.__pluginManager = pluginManager |
60 self.__pluginManager = pluginManager |
61 self.__external = False |
61 self.__external = False |
62 |
62 |
63 self.__backButton = self.buttonBox.addButton( |
63 self.__backButton = self.buttonBox.addButton( |
64 self.tr("< Back"), QDialogButtonBox.ActionRole) |
64 self.tr("< Back"), QDialogButtonBox.ButtonRole.ActionRole) |
65 self.__nextButton = self.buttonBox.addButton( |
65 self.__nextButton = self.buttonBox.addButton( |
66 self.tr("Next >"), QDialogButtonBox.ActionRole) |
66 self.tr("Next >"), QDialogButtonBox.ButtonRole.ActionRole) |
67 self.__finishButton = self.buttonBox.addButton( |
67 self.__finishButton = self.buttonBox.addButton( |
68 self.tr("Install"), QDialogButtonBox.ActionRole) |
68 self.tr("Install"), QDialogButtonBox.ButtonRole.ActionRole) |
69 |
69 |
70 self.__closeButton = self.buttonBox.button(QDialogButtonBox.Close) |
70 self.__closeButton = self.buttonBox.button( |
71 self.__cancelButton = self.buttonBox.button(QDialogButtonBox.Cancel) |
71 QDialogButtonBox.StandardButton.Close) |
|
72 self.__cancelButton = self.buttonBox.button( |
|
73 QDialogButtonBox.StandardButton.Cancel) |
72 |
74 |
73 userDir = self.__pluginManager.getPluginDir("user") |
75 userDir = self.__pluginManager.getPluginDir("user") |
74 if userDir is not None: |
76 if userDir is not None: |
75 self.destinationCombo.addItem( |
77 self.destinationCombo.addItem( |
76 self.tr("User plugins directory"), |
78 self.tr("User plugins directory"), |
164 self.tr("Select plugin ZIP-archives"), |
166 self.tr("Select plugin ZIP-archives"), |
165 dn, |
167 dn, |
166 self.tr("Plugin archive (*.zip)")) |
168 self.tr("Plugin archive (*.zip)")) |
167 |
169 |
168 if archives: |
170 if archives: |
169 matchflags = Qt.MatchFixedString |
171 matchflags = Qt.MatchFlag.MatchFixedString |
170 if not Utilities.isWindowsPlatform(): |
172 if not Utilities.isWindowsPlatform(): |
171 matchflags |= Qt.MatchCaseSensitive |
173 matchflags |= Qt.MatchFlag.MatchCaseSensitive |
172 for archive in archives: |
174 for archive in archives: |
173 if len(self.archivesList.findItems(archive, matchflags)) == 0: |
175 if len(self.archivesList.findItems(archive, matchflags)) == 0: |
174 # entry not in list already |
176 # entry not in list already |
175 self.archivesList.addItem(archive) |
177 self.archivesList.addItem(archive) |
176 self.archivesList.sortItems() |
178 self.archivesList.sortItems() |