diff -r 49f3377aebf1 -r 787a6b3f8c9f eric6/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveBrowserDialog.py --- a/eric6/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveBrowserDialog.py Fri Oct 09 17:19:29 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsMercurial/ShelveExtension/HgShelveBrowserDialog.py Sat Oct 10 12:20:51 2020 +0200 @@ -10,12 +10,13 @@ import os from PyQt5.QtCore import pyqtSlot, Qt, QPoint -from PyQt5.QtGui import QCursor from PyQt5.QtWidgets import ( QWidget, QDialogButtonBox, QTreeWidgetItem, QAbstractButton, QMenu, QHeaderView, QApplication ) +from E5Gui.E5OverrideCursor import E5OverrideCursor + from .Ui_HgShelveBrowserDialog import Ui_HgShelveBrowserDialog @@ -129,9 +130,6 @@ self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) QApplication.processEvents() - QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) - QApplication.processEvents() - self.buf = [] self.errors.clear() self.intercept = False @@ -140,11 +138,12 @@ args.append("--list") args.append("--stat") - out, err = self.__hgClient.runcommand(args) - self.buf = out.splitlines(True) - if err: - self.__showError(err) - self.__processBuffer() + with E5OverrideCursor(): + out, err = self.__hgClient.runcommand(args) + self.buf = out.splitlines(True) + if err: + self.__showError(err) + self.__processBuffer() self.__finish() def start(self, projectDir): @@ -177,8 +176,6 @@ Private slot called when the process finished or the user pressed the button. """ - QApplication.restoreOverrideCursor() - self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)