--- a/eric6/Plugins/VcsPlugins/vcsGit/git.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Plugins/VcsPlugins/vcsGit/git.py Tue Mar 02 17:17:09 2021 +0100 @@ -689,7 +689,7 @@ else: from .GitCopyDialog import GitCopyDialog dlg = GitCopyDialog(name, None, True) - accepted = dlg.exec() == QDialog.Accepted + accepted = dlg.exec() == QDialog.DialogCode.Accepted if accepted: target, force = dlg.getData() @@ -886,7 +886,7 @@ "Do you really want to revert all changes to these files" " or directories?"), names) - yes = dlg.exec() == QDialog.Accepted + yes = dlg.exec() == QDialog.DialogCode.Accepted else: yes = E5MessageBox.yesNo( None, @@ -925,7 +925,7 @@ self.gitGetBranchesList(repodir, withMaster=True), self.gitGetCurrentBranch(repodir), self.gitGetBranchesList(repodir, remotes=True)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: commit, doCommit, commitMessage, addLog, diffStat = ( dlg.getParameters() ) @@ -978,7 +978,7 @@ trackingBranchesList=self.gitGetBranchesList( repodir, remotes=True), noneLabel=self.tr("Master branch head")) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev = dlg.getRevision() return self.vcsUpdate(name, revision=rev) @@ -1183,7 +1183,7 @@ """ from .GitCommandDialog import GitCommandDialog dlg = GitCommandDialog(self.commandHistory, name) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: command = dlg.getData() commandList = Utilities.parseOptionString(command) @@ -1424,7 +1424,7 @@ """ from .GitCopyDialog import GitCopyDialog dlg = GitCopyDialog(name) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: target, force = dlg.getData() # step 1: copy the file/directory: @@ -1513,7 +1513,7 @@ from .GitRevisionsSelectionDialog import GitRevisionsSelectionDialog dlg = GitRevisionsSelectionDialog(self.gitGetTagsList(repodir), self.gitGetBranchesList(repodir)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: revisions = dlg.getRevisions() if self.diff is None: from .GitDiffDialog import GitDiffDialog @@ -1597,7 +1597,7 @@ ) dlg = GitRevisionsSelectionDialog(self.gitGetTagsList(repodir), self.gitGetBranchesList(repodir)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev1, rev2 = dlg.getRevisions() elif revisions: rev1, rev2 = revisions[0], revisions[1] @@ -1661,7 +1661,7 @@ from .GitFetchDialog import GitFetchDialog dlg = GitFetchDialog(self, repodir) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: (remote, url, remoteBranches, localBranch, fetchAll, prune, includeTags) = dlg.getData() @@ -1704,7 +1704,7 @@ from .GitPullDialog import GitPullDialog dlg = GitPullDialog(self, repodir) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: remote, url, branches, pullAll, prune = dlg.getData() args = self.initCommand('pull') @@ -1744,7 +1744,7 @@ from .GitPushDialog import GitPushDialog dlg = GitPushDialog(self, repodir) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: remote, refspecs, tags, tracking, submodule = dlg.getData() args = self.initCommand("push") @@ -1871,7 +1871,7 @@ from .GitPatchFilesDialog import GitPatchFilesDialog dlg = GitPatchFilesDialog(repodir, self.__patchCheckData) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: patchFilesList, stripCount, inaccurateEof, recount = dlg.getData() if patchFilesList: args = self.initCommand("apply") @@ -1938,7 +1938,7 @@ from .GitTagDialog import GitTagDialog dlg = GitTagDialog(self.gitGetTagsList(repodir), revision, tagName) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: tag, revision, tagOp, tagType, force = dlg.getParameters() else: return False @@ -2134,7 +2134,7 @@ dlg = GitBranchDialog( self.gitGetBranchesList(repodir, allBranches=True), revision, branchName, branchOp) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: branchOp, branch, revision, newBranch, remoteBranch, force = ( dlg.getParameters() ) @@ -2224,7 +2224,7 @@ dlg = GitBranchPushDialog(self.gitGetBranchesList(repodir), self.gitGetRemotesList(repodir), delete=True) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: branchName, remoteName = dlg.getData()[:2] args = self.initCommand("push") @@ -2278,7 +2278,7 @@ from .GitBundleDialog import GitBundleDialog dlg = GitBundleDialog(self.gitGetTagsList(repodir), self.gitGetBranchesList(repodir)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: revs = dlg.getData() fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( @@ -2439,7 +2439,7 @@ dlg = GitApplyBundleDataDialog( self.gitGetBundleHeads(repodir, fname), self.gitGetBranchesList(repodir)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: bundleHead, branch = dlg.getData() args = self.initCommand("fetch") @@ -2487,7 +2487,7 @@ dlg = GitApplyBundleDataDialog( self.gitGetBundleHeads(repodir, fname), self.gitGetBranchesList(repodir)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: bundleHead, branch = dlg.getData() args = self.initCommand("pull") @@ -2546,7 +2546,7 @@ self.gitGetBranchesList(repodir), showBranches=showBranches, showHead=showHead) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: rev = dlg.getRevision() else: return False @@ -2555,7 +2555,7 @@ if subcommand == "start_extended": from .GitBisectStartDialog import GitBisectStartDialog dlg = GitBisectStartDialog() - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: bad, good, noCheckout = dlg.getData() args.append("start") if noCheckout: @@ -2919,7 +2919,7 @@ from .GitAddRemoteDialog import GitAddRemoteDialog dlg = GitAddRemoteDialog() - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: name, url = dlg.getData() args = self.initCommand("remote") args.append("add") @@ -2947,7 +2947,7 @@ None, self.tr("Rename Remote Repository"), self.tr("Enter new name for remote repository:"), - QLineEdit.Normal) + QLineEdit.EchoMode.Normal) if ok and newName and newName != remoteName: args = self.initCommand("remote") args.append("rename") @@ -2980,7 +2980,7 @@ from .GitChangeRemoteUrlDialog import GitChangeRemoteUrlDialog dlg = GitChangeRemoteUrlDialog(remoteName, remoteUrl) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: name, url = dlg.getData() if url != remoteUrl: args = self.initCommand("remote") @@ -3014,7 +3014,7 @@ from .GitRemoteCredentialsDialog import GitRemoteCredentialsDialog dlg = GitRemoteCredentialsDialog(remoteName, remoteUrl) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: name, url = dlg.getData() if url != remoteUrl: args = self.initCommand("remote") @@ -3132,7 +3132,7 @@ from .GitCherryPickDialog import GitCherryPickDialog dlg = GitCherryPickDialog(commits) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: commits, cherrypickInfo, signoff, nocommit = ( dlg.getData() ) @@ -3294,7 +3294,7 @@ res = False from .GitStashDataDialog import GitStashDataDialog dlg = GitStashDataDialog() - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: message, keepIndex, untracked = dlg.getData() args = self.initCommand("stash") args.append("save") @@ -3460,7 +3460,7 @@ None, self.tr("Create Branch"), self.tr("Enter a branch name to restore a stash to:"), - QLineEdit.Normal) + QLineEdit.EchoMode.Normal) if not ok or branchName == "": return False @@ -3593,7 +3593,7 @@ if not os.path.exists(cfgFile): from .GitUserConfigDataDialog import GitUserConfigDataDialog dlg = GitUserConfigDataDialog() - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: firstName, lastName, email = dlg.getData() else: firstName, lastName, email = ( @@ -3807,7 +3807,7 @@ self.gitGetBranchesList(repodir, withMaster=True), self.gitGetArchiveFormats(repodir) ) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: commit, archiveFormat, fileName, prefix = dlg.getData() args = self.initCommand("archive") args.append("--format={0}".format(archiveFormat)) @@ -3846,7 +3846,7 @@ from .GitSubmoduleAddDialog import GitSubmoduleAddDialog dlg = GitSubmoduleAddDialog(self, repodir) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: repo, branch, name, path, force = dlg.getData() args = self.initCommand("submodule") args.append("add") @@ -3973,7 +3973,7 @@ from .GitListDialog import GitListDialog dlg = GitListDialog(sorted(paths)) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: selectedPaths = dlg.getSelection() return selectedPaths, True else: @@ -4025,7 +4025,7 @@ from .GitSubmodulesDeinitDialog import GitSubmodulesDeinitDialog dlg = GitSubmodulesDeinitDialog(paths) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: deinitAll, submodulePaths, force = dlg.getData() args = self.initCommand("submodule") args.append("deinit") @@ -4100,7 +4100,7 @@ GitSubmodulesUpdateOptionsDialog ) dlg = GitSubmodulesUpdateOptionsDialog(paths) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: procedure, init, remote, noFetch, force, submodulePaths = ( dlg.getData() ) @@ -4144,7 +4144,7 @@ from .GitSubmodulesSyncDialog import GitSubmodulesSyncDialog dlg = GitSubmodulesSyncDialog(paths) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: submodulePaths, recursive = dlg.getData() args = self.initCommand("submodule") args.append("sync") @@ -4194,7 +4194,7 @@ GitSubmodulesSummaryOptionsDialog ) dlg = GitSubmodulesSummaryOptionsDialog(paths) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: submodulePaths, superProject, index, commit, limit = dlg.getData() args = self.initCommand("submodule") args.append("summary")