src/eric7/MicroPython/WifiDialogs/WifiController.py

branch
eric7
changeset 11005
b918c6c2736b
parent 10806
2f6df822e3b9
child 11090
f5f5f5803935
diff -r 5f8d929657b3 -r b918c6c2736b src/eric7/MicroPython/WifiDialogs/WifiController.py
--- a/src/eric7/MicroPython/WifiDialogs/WifiController.py	Fri Oct 25 08:42:57 2024 +0200
+++ b/src/eric7/MicroPython/WifiDialogs/WifiController.py	Fri Oct 25 09:47:48 2024 +0200
@@ -25,7 +25,7 @@
         Constructor
 
         @param microPython reference to the MicroPython widget
-        @type MicroPythonWidgep
+        @type MicroPythonWidget
         @param parent reference to the parent object (defaults to None)
         @type QObject (optional)
         """
@@ -93,7 +93,9 @@
         try:
             clientStatus, apStatus, overallStatus = self.__mpy.getDevice().getWifiData()
 
-            dlg = WifiStatusDialog(clientStatus, apStatus, overallStatus)
+            dlg = WifiStatusDialog(
+                clientStatus, apStatus, overallStatus, parent=self.__mpy
+            )
             dlg.exec()
         except Exception as exc:
             self.__mpy.showError("getWifiData()", str(exc))
@@ -105,7 +107,7 @@
         """
         from .WifiConnectionDialog import WifiConnectionDialog
 
-        dlg = WifiConnectionDialog()
+        dlg = WifiConnectionDialog(parent=self.__mpy)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             ssid, password, hostname = dlg.getConnectionParameters()
             success, error = self.__mpy.getDevice().connectWifi(
@@ -196,7 +198,10 @@
         """
         from .WifiConnectionDialog import WifiConnectionDialog
 
-        dlg = WifiConnectionDialog(withCountry=self.__mpy.getDevice().hasWifiCountry())
+        dlg = WifiConnectionDialog(
+            withCountry=self.__mpy.getDevice().hasWifiCountry(),
+            parent=self.__mpy,
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             ssid, password, hostname = dlg.getConnectionParameters()
             country = dlg.getCountryCode()
@@ -296,7 +301,7 @@
         """
         from .WifiApConfigDialog import WifiApConfigDialog
 
-        dlg = WifiApConfigDialog(withIP=withIP)
+        dlg = WifiApConfigDialog(withIP=withIP, parent=self.__mpy)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             ssid, password, security, hostname, ifconfig = dlg.getApConfig()
 
@@ -370,7 +375,7 @@
             self.__mpy.showError("getConnectedClients()", err)
         else:
             if stations:
-                dlg = WifiApStationsDialog(stations)
+                dlg = WifiApStationsDialog(stations, parent=self.__mpy)
                 dlg.exec()
             else:
                 EricMessageBox.information(
@@ -433,7 +438,7 @@
                 )
             return
 
-        dlg = NtpParametersDialog(self.__mpy)
+        dlg = NtpParametersDialog(parent=self.__mpy)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             server, tzOffset, isDst, timeout = dlg.getParameters()
             if isDst:
@@ -476,7 +481,7 @@
             MicroPythonWebreplParametersDialog,
         )
 
-        dlg = MicroPythonWebreplParametersDialog()
+        dlg = MicroPythonWebreplParametersDialog(parent=self.__mpy)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             (password,) = dlg.getParameters()
             success, error = self.__mpy.getDevice().enableWebrepl(password)

eric ide

mercurial