--- a/eric7/Plugins/VcsPlugins/vcsGit/GitLogBrowserDialog.py Sat May 22 17:01:51 2021 +0200 +++ b/eric7/Plugins/VcsPlugins/vcsGit/GitLogBrowserDialog.py Sat May 22 18:51:46 2021 +0200 @@ -23,9 +23,9 @@ QLineEdit, QMenu, QInputDialog ) -from E5Gui.E5Application import e5App -from E5Gui import E5MessageBox, E5FileDialog -from E5Gui.E5OverrideCursor import E5OverrideCursorProcess +from E5Gui.EricApplication import ericApp +from E5Gui import EricMessageBox, EricFileDialog +from E5Gui.EricOverrideCursor import EricOverrideCursorProcess from Globals import strToQByteArray @@ -118,7 +118,7 @@ self.__logTreeNormalFont.setBold(False) self.__logTreeBoldFont = self.logTree.font() self.__logTreeBoldFont.setBold(True) - self.__logTreeHasDarkBackground = e5App().usesDarkPalette() + self.__logTreeHasDarkBackground = ericApp().usesDarkPalette() font = Preferences.getEditorOtherFonts("MonospacedFont") self.diffEdit.document().setDefaultFont(font) @@ -198,7 +198,7 @@ # roles used in the file tree self.__diffFileLineRole = Qt.ItemDataRole.UserRole - self.__process = E5OverrideCursorProcess() + self.__process = EricOverrideCursorProcess() self.__process.finished.connect(self.__procFinished) self.__process.readyReadStandardOutput.connect(self.__readStdout) self.__process.readyReadStandardError.connect(self.__readStderr) @@ -643,7 +643,7 @@ errMsg = self.tr("Could not start the git executable.") if errMsg: - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr("Git Error"), errMsg) @@ -824,7 +824,7 @@ if not procStarted: self.inputGroup.setEnabled(False) self.inputGroup.hide() - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr('Process Generation Error'), self.tr( @@ -1709,7 +1709,7 @@ commits[index] = itm.text(self.CommitIdColumn) if commits: - pfile = e5App().getObject("Project").getProjectFile() + pfile = ericApp().getObject("Project").getProjectFile() lastModified = QFileInfo(pfile).lastModified().toString() shouldReopen = ( self.vcs.gitCherryPick( @@ -1719,14 +1719,14 @@ QFileInfo(pfile).lastModified().toString() != lastModified ) if shouldReopen: - res = E5MessageBox.yesNo( + res = EricMessageBox.yesNo( None, self.tr("Copy Changesets"), self.tr( """The project should be reread. Do this now?"""), yesDefault=True) if res: - e5App().getObject("Project").reopenProject() + ericApp().getObject("Project").reopenProject() return self.on_refreshButton_clicked() @@ -1772,21 +1772,21 @@ rev = branch else: rev = commit - pfile = e5App().getObject("Project").getProjectFile() + pfile = ericApp().getObject("Project").getProjectFile() lastModified = QFileInfo(pfile).lastModified().toString() shouldReopen = ( self.vcs.vcsUpdate(self.repodir, revision=rev) or QFileInfo(pfile).lastModified().toString() != lastModified ) if shouldReopen: - res = E5MessageBox.yesNo( + res = EricMessageBox.yesNo( None, self.tr("Switch"), self.tr( """The project should be reread. Do this now?"""), yesDefault=True) if res: - e5App().getObject("Project").reopenProject() + ericApp().getObject("Project").reopenProject() return self.on_refreshButton_clicked() @@ -1846,7 +1846,7 @@ return else: branch = "" - pfile = e5App().getObject("Project").getProjectFile() + pfile = ericApp().getObject("Project").getProjectFile() lastModified = QFileInfo(pfile).lastModified().toString() res, shouldReopen = self.vcs.gitBranch( self.repodir, revision=commit, branchName=branch, @@ -1857,14 +1857,14 @@ ) if res: if shouldReopen: - res = E5MessageBox.yesNo( + res = EricMessageBox.yesNo( None, self.tr("Switch"), self.tr( """The project should be reread. Do this now?"""), yesDefault=True) if res: - e5App().getObject("Project").reopenProject() + ericApp().getObject("Project").reopenProject() return self.on_refreshButton_clicked() @@ -2065,7 +2065,7 @@ self.logTree.setCurrentItem(self.logTree.topLevelItem(index)) break else: - E5MessageBox.information( + EricMessageBox.information( self, self.tr("Find Commit"), self.tr("""'{0}' was not found.""").format(self.rxEdit.text())) @@ -2289,13 +2289,13 @@ else: fname = dname - fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( + fname, selectedFilter = EricFileDialog.getSaveFileNameAndFilter( self, self.tr("Save Diff"), fname, self.tr("Patch Files (*.diff)"), None, - E5FileDialog.DontConfirmOverwrite) + EricFileDialog.DontConfirmOverwrite) if not fname: return # user aborted @@ -2306,23 +2306,23 @@ if ex: fname += ex if QFileInfo(fname).exists(): - res = E5MessageBox.yesNo( + res = EricMessageBox.yesNo( self, self.tr("Save Diff"), self.tr("<p>The patch file <b>{0}</b> already exists." " Overwrite it?</p>").format(fname), - icon=E5MessageBox.Warning) + icon=EricMessageBox.Warning) if not res: return fname = Utilities.toNativeSeparators(fname) - eol = e5App().getObject("Project").getEolString() + eol = ericApp().getObject("Project").getEolString() try: with open(fname, "w", encoding="utf-8", newline="") as f: f.write(eol.join(self.diffEdit.toPlainText().splitlines())) f.write(eol) except OSError as why: - E5MessageBox.critical( + EricMessageBox.critical( self, self.tr('Save Diff'), self.tr( '<p>The patch file <b>{0}</b> could not be saved.'