src/eric7/WebBrowser/UserAgent/UserAgentMenu.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
26 26
27 def __init__(self, title, url=None, parent=None): 27 def __init__(self, title, url=None, parent=None):
28 """ 28 """
29 Constructor 29 Constructor
30 30
31 @param title title of the menu (string) 31 @param title title of the menu
32 @param url URL to set user agent for (QUrl) 32 @type str
33 @param parent reference to the parent widget (QWidget) 33 @param url URL to set user agent for
34 @type QUrl
35 @param parent reference to the parent widget
36 @type QWidget
34 """ 37 """
35 super().__init__(title, parent) 38 super().__init__(title, parent)
36 39
37 self.__manager = None 40 self.__manager = None
38 self.__url = url 41 self.__url = url
122 125
123 def __addDefaultActions(self): 126 def __addDefaultActions(self):
124 """ 127 """
125 Private slot to add the default user agent entries. 128 Private slot to add the default user agent entries.
126 129
127 @return flag indicating that a user agent entry is checked (boolean) 130 @return flag indicating that a user agent entry is checked
131 @rtype bool
128 """ 132 """
129 defaultUserAgents = QFile( 133 defaultUserAgents = QFile(
130 os.path.join(os.path.dirname(__file__), "UserAgentDefaults.xml") 134 os.path.join(os.path.dirname(__file__), "UserAgentDefaults.xml")
131 ) 135 )
132 defaultUserAgents.open(QIODevice.OpenModeFlag.ReadOnly) 136 defaultUserAgents.open(QIODevice.OpenModeFlag.ReadOnly)

eric ide

mercurial