eric6/MicroPython/UF2FlashDialog.py

changeset 8143
2c730d5fd177
parent 8120
84928e9f446f
child 8167
cdc1b6692766
--- a/eric6/MicroPython/UF2FlashDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/MicroPython/UF2FlashDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -456,8 +456,8 @@
     """
     Class implementing a dialog to flash any UF2 capable device.
     """
-    DeviceTypeRole = Qt.UserRole
-    DeviceVidPidRole = Qt.UserRole + 1
+    DeviceTypeRole = Qt.ItemDataRole.UserRole
+    DeviceVidPidRole = Qt.ItemDataRole.UserRole + 1
     
     def __init__(self, boardType="", parent=None):
         """
@@ -746,7 +746,8 @@
                     "<p>Flashing the {0} firmware to the device. Please wait"
                     " until the device resets automatically.</p>"
                 ).format(firmwareType))
-            QCoreApplication.processEvents(QEventLoop.ExcludeUserInputEvents)
+            QCoreApplication.processEvents(
+                QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents)
             shutil.copy2(firmwarePath, volumePath)
             QThread.sleep(1)
             self.on_refreshButton_clicked()

eric ide

mercurial