diff -r 495f084a737e -r 36a90a94765c src/eric7/EricNetwork/EricNetworkIcon.py --- a/src/eric7/EricNetwork/EricNetworkIcon.py Mon Sep 23 14:37:31 2024 +0200 +++ b/src/eric7/EricNetwork/EricNetworkIcon.py Tue Sep 24 17:52:41 2024 +0200 @@ -11,7 +11,6 @@ from PyQt6.QtNetwork import QNetworkInformation from PyQt6.QtWidgets import QLabel -from eric7 import Preferences from eric7.EricGui import EricPixmapCache @@ -28,16 +27,19 @@ onlineStateChanged = pyqtSignal(bool) reachabilityStateChanged = pyqtSignal(QNetworkInformation.Reachability) - def __init__(self, parent=None): + def __init__(self, dynamicOnlineCheck=True, parent=None): """ Constructor + @param dynamicOnlineCheck flag indicating to perform online checks during + runtime (defaults to True) + @type bool (optional) @param parent reference to the parent widget @type QWidget """ super().__init__(parent) - if Preferences.getUI("DynamicOnlineCheck") and QNetworkInformation.load( + if dynamicOnlineCheck and QNetworkInformation.load( QNetworkInformation.Feature.Reachability ): self.__online = (