119 Private method to load the cookies settings. |
119 Private method to load the cookies settings. |
120 """ |
120 """ |
121 if self.__loaded: |
121 if self.__loaded: |
122 return |
122 return |
123 |
123 |
124 cookieSettings = QSettings(self.__cookiesFile, QSettings.IniFormat) |
124 cookieSettings = QSettings(self.__cookiesFile, |
|
125 QSettings.Format.IniFormat) |
125 |
126 |
126 # load exceptions |
127 # load exceptions |
127 self.__exceptionsBlock = Preferences.toList( |
128 self.__exceptionsBlock = Preferences.toList( |
128 cookieSettings.value("Exceptions/block")) |
129 cookieSettings.value("Exceptions/block")) |
129 self.__exceptionsAllow = Preferences.toList( |
130 self.__exceptionsAllow = Preferences.toList( |
150 Private method to save the cookies settings. |
151 Private method to save the cookies settings. |
151 """ |
152 """ |
152 if not self.__loaded: |
153 if not self.__loaded: |
153 return |
154 return |
154 |
155 |
155 cookieSettings = QSettings(self.__cookiesFile, QSettings.IniFormat) |
156 cookieSettings = QSettings(self.__cookiesFile, |
|
157 QSettings.Format.IniFormat) |
156 |
158 |
157 cookieSettings.setValue("Exceptions/block", self.__exceptionsBlock) |
159 cookieSettings.setValue("Exceptions/block", self.__exceptionsBlock) |
158 cookieSettings.setValue("Exceptions/allow", self.__exceptionsAllow) |
160 cookieSettings.setValue("Exceptions/allow", self.__exceptionsAllow) |
159 cookieSettings.setValue("Exceptions/allowForSession", |
161 cookieSettings.setValue("Exceptions/allowForSession", |
160 self.__exceptionsAllowForSession) |
162 self.__exceptionsAllowForSession) |