--- a/eric7/MicroPython/MicrobitDevices.py Sat May 22 17:01:51 2021 +0200 +++ b/eric7/MicroPython/MicrobitDevices.py Sat May 22 18:51:46 2021 +0200 @@ -17,8 +17,8 @@ from .MicroPythonDevices import MicroPythonDevice from .MicroPythonWidget import HAS_QTCHART -from E5Gui import E5MessageBox, E5FileDialog -from E5Gui.E5Application import e5App +from E5Gui import EricMessageBox, EricFileDialog +from E5Gui.EricApplication import ericApp import Utilities import Preferences @@ -206,7 +206,7 @@ if self.getDeviceType() == "bbc_microbit": # BBC micro:bit is not ready or not mounted if firmware: - E5MessageBox.critical( + EricMessageBox.critical( self.microPython, self.tr("Flash MicroPython/Firmware"), self.tr( @@ -226,7 +226,7 @@ ) ) else: - E5MessageBox.critical( + EricMessageBox.critical( self.microPython, self.tr("Flash MicroPython/Firmware"), self.tr( @@ -239,7 +239,7 @@ else: # Calliope mini is not ready or not mounted if firmware: - E5MessageBox.critical( + EricMessageBox.critical( self.microPython, self.tr("Flash MicroPython/Firmware"), self.tr( @@ -256,7 +256,7 @@ ) ) else: - E5MessageBox.critical( + EricMessageBox.critical( self.microPython, self.tr("Flash MicroPython/Firmware"), self.tr( @@ -269,7 +269,7 @@ elif len(deviceDirectories) == 1: downloadsPath = QStandardPaths.standardLocations( QStandardPaths.StandardLocation.DownloadLocation)[0] - firmware = E5FileDialog.getOpenFileName( + firmware = EricFileDialog.getOpenFileName( self.microPython, self.tr("Flash MicroPython/Firmware"), downloadsPath, @@ -278,7 +278,7 @@ if firmware and os.path.exists(firmware): shutil.copy2(firmware, deviceDirectories[0]) else: - E5MessageBox.warning( + EricMessageBox.warning( self, self.tr("Flash MicroPython/Firmware"), self.tr("There are multiple devices ready for flashing." @@ -302,7 +302,7 @@ @param scriptName name of the file on the device @type str """ - aw = e5App().getObject("ViewManager").activeWindow() + aw = ericApp().getObject("ViewManager").activeWindow() if not aw: return @@ -313,7 +313,7 @@ ) if not (aw.isPyFile() or aw.isMicroPythonFile()): - yes = E5MessageBox.yesNo( + yes = EricMessageBox.yesNo( self.microPython, title, self.tr("""The current editor does not contain a Python""" @@ -323,7 +323,7 @@ script = aw.text().strip() if not script: - E5MessageBox.warning( + EricMessageBox.warning( self.microPython, title, self.tr("""The script is empty. Aborting.""")) @@ -351,7 +351,7 @@ commands.append("fd.close()") out, err = self.microPython.commandsInterface().execute(commands) if err: - E5MessageBox.critical( + EricMessageBox.critical( self.microPython, title, self.tr("""<p>The script could not be saved to the"""