Helpviewer/HelpWindow.py

changeset 355
c29c8b8dadf1
parent 354
f80d88e87677
child 381
64ae9e09d8bc
equal deleted inserted replaced
354:f80d88e87677 355:c29c8b8dadf1
325 os.makedirs(webDatabaseDir) 325 os.makedirs(webDatabaseDir)
326 settings.setOfflineStoragePath(webDatabaseDir) 326 settings.setOfflineStoragePath(webDatabaseDir)
327 settings.setOfflineStorageDefaultQuota( 327 settings.setOfflineStorageDefaultQuota(
328 Preferences.getHelp("OfflineStorageDatabaseQuota") * 1024 * 1024) 328 Preferences.getHelp("OfflineStorageDatabaseQuota") * 1024 * 1024)
329 329
330 if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"):
331 settings.setAttribute(QWebSettings.OfflineWebApplicationCacheEnabled,
332 Preferences.getHelp("OfflineWebApplicationCacheEnabled"))
333 appCacheDir = os.path.join(
334 Utilities.getConfigDir(), "browser", "webappcaches")
335 if not os.path.exists(appCacheDir):
336 os.makedirs(appCacheDir)
337 settings.setOfflineWebApplicationCachePath(appCacheDir)
338 settings.setOfflineWebApplicationCacheQuota(
339 Preferences.getHelp("OfflineWebApplicationCacheQuota") * 1024 * 1024)
340
341 if hasattr(QWebSettings, "LocalStorageEnabled"):
342 settings.setAttribute(QWebSettings.LocalStorageEnabled,
343 Preferences.getHelp("LocalStorageEnabled"))
344 localStorageDir = os.path.join(
345 Utilities.getConfigDir(), "browser", "weblocalstorage")
346 if not os.path.exists(localStorageDir):
347 os.makedirs(localStorageDir)
348 settings.setLocalStoragePath(localStorageDir)
349
330 if hasattr(QWebSettings, "DnsPrefetchEnabled"): 350 if hasattr(QWebSettings, "DnsPrefetchEnabled"):
331 settings.setAttribute(QWebSettings.DnsPrefetchEnabled, 351 settings.setAttribute(QWebSettings.DnsPrefetchEnabled,
332 Preferences.getHelp("DnsPrefetchEnabled")) 352 Preferences.getHelp("DnsPrefetchEnabled"))
333 353
334 def __initActions(self): 354 def __initActions(self):

eric ide

mercurial