--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -43,9 +43,9 @@ vcsUrlHistory = self.__vcs.getPlugin().getPreferences( "RepositoryUrlHistory") self.vcsUrlPicker.setMode(E5PathPickerModes.DirectoryMode) - self.vcsUrlPicker.setInsertPolicy(QComboBox.InsertAtTop) + self.vcsUrlPicker.setInsertPolicy(QComboBox.InsertPolicy.InsertAtTop) self.vcsUrlPicker.setSizeAdjustPolicy( - QComboBox.AdjustToMinimumContentsLength) + QComboBox.SizeAdjustPolicy.AdjustToContents) self.vcsUrlPicker.setPathsList(vcsUrlHistory) self.vcsUrlClearHistoryButton.setIcon( UI.PixmapCache.getIcon("editDelete")) @@ -66,7 +66,8 @@ self.largeCheckBox.setVisible( self.__vcs.isExtensionActive("largefiles")) - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(False) msh = self.minimumSizeHint() self.resize(max(self.width(), msh.width()), msh.height()) @@ -78,7 +79,7 @@ @param txt name of the project directory (string) """ - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled( + self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( bool(txt) and Utilities.fromNativeSeparators(txt) not in self.__initPaths) @@ -91,7 +92,8 @@ """ url = QUrl.fromUserInput(txt) enable = url.isValid() and url.scheme() in ConfigHgSchemes - self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) + self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok).setEnabled(enable) self.vcsUrlPicker.setPickerEnabled(url.scheme() == "file" or len(txt) == 0) @@ -119,7 +121,7 @@ url = QUrl.fromUserInput(self.vcsUrlPicker.text().replace("\\", "/")) vcsdatadict = { - "url": url.toString(QUrl.None_), + "url": url.toString(QUrl.UrlFormattingOption.None_), "revision": self.vcsRevisionEdit.text(), "largefiles": self.largeCheckBox.isChecked(), }