11 import os |
11 import os |
12 |
12 |
13 from PyQt6.QtCore import QByteArray, QMutex, QObject, QUrl, QUrlQuery, pyqtSignal |
13 from PyQt6.QtCore import QByteArray, QMutex, QObject, QUrl, QUrlQuery, pyqtSignal |
14 from PyQt6.QtWebEngineCore import QWebEngineUrlRequestInfo |
14 from PyQt6.QtWebEngineCore import QWebEngineUrlRequestInfo |
15 |
15 |
16 from eric7 import Globals, Preferences |
16 from eric7 import EricUtilities, Preferences |
17 from eric7.EricUtilities.EricMutexLocker import EricMutexLocker |
17 from eric7.EricUtilities.EricMutexLocker import EricMutexLocker |
18 from eric7.EricWidgets import EricMessageBox |
18 from eric7.EricWidgets import EricMessageBox |
19 from eric7.Utilities.AutoSaver import AutoSaver |
19 from eric7.Utilities.AutoSaver import AutoSaver |
20 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
20 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
21 |
21 |
204 Private method to generate the path for custom subscriptions. |
204 Private method to generate the path for custom subscriptions. |
205 |
205 |
206 @return URL for custom subscriptions |
206 @return URL for custom subscriptions |
207 @rtype QUrl |
207 @rtype QUrl |
208 """ |
208 """ |
209 dataDir = os.path.join(Globals.getConfigDir(), "web_browser", "subscriptions") |
209 dataDir = os.path.join( |
|
210 EricUtilities.getConfigDir(), "web_browser", "subscriptions" |
|
211 ) |
210 if not os.path.exists(dataDir): |
212 if not os.path.exists(dataDir): |
211 os.makedirs(dataDir) |
213 os.makedirs(dataDir) |
212 fileName = os.path.join(dataDir, "adblock_subscription_custom") |
214 fileName = os.path.join(dataDir, "adblock_subscription_custom") |
213 return QUrl.fromLocalFile(fileName) |
215 return QUrl.fromLocalFile(fileName) |
214 |
216 |