def init(args): """Initialize the global QWebSettings.""" if args.enable_webengine_inspector: os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) # Workaround for a black screen with some setups # https://github.com/spyder-ide/spyder/issues/3226 if not os.environ.get('QUTE_NO_OPENGL_WORKAROUND'): # Hide "No OpenGL_accelerate module loaded: ..." message logging.getLogger('OpenGL.acceleratesupport').propagate = False try: from OpenGL import GL # pylint: disable=unused-variable except ImportError: pass else: log.misc.debug("Imported PyOpenGL as workaround") _init_profiles() # We need to do this here as a WORKAROUND for # https://bugreports.qt.io/browse/QTBUG-58650 if not qtutils.version_check('5.9'): PersistentCookiePolicy().set(config.get('content', 'cookies-store')) Attribute(QWebEngineSettings.FullScreenSupportEnabled).set(True) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(): """Initialize the global QWebSettings.""" # FIXME:qtwebengine set paths in profile if config.get('general', 'developer-extras'): # FIXME:qtwebengine Make sure we call globalSettings *after* this... os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(args): """Initialize the global QWebSettings.""" if args.enable_webengine_inspector: os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) profile = QWebEngineProfile.defaultProfile() profile.setCachePath(os.path.join(standarddir.cache(), 'webengine')) profile.setPersistentStoragePath( os.path.join(standarddir.data(), 'webengine')) _init_stylesheet(profile) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(): """Initialize the global QWebSettings.""" if config.get('general', 'developer-extras'): # FIXME:qtwebengine Make sure we call globalSettings *after* this... os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) profile = QWebEngineProfile.defaultProfile() profile.setCachePath(os.path.join(standarddir.cache(), 'webengine')) profile.setPersistentStoragePath( os.path.join(standarddir.data(), 'webengine')) _init_stylesheet(profile) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(args): """Initialize the global QWebSettings.""" if args.enable_webengine_inspector: os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) _init_profiles() # We need to do this here as a WORKAROUND for # https://bugreports.qt.io/browse/QTBUG-58650 if not qtutils.version_check('5.9', compiled=False): PersistentCookiePolicy().set(config.val.content.cookies.store) Attribute(QWebEngineSettings.FullScreenSupportEnabled).set(True) websettings.init_mappings(MAPPINGS) config.instance.changed.connect(_update_settings)
def init(args): """Initialize the global QWebSettings.""" if args.enable_webengine_inspector: os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) profile = QWebEngineProfile.defaultProfile() _init_profile(profile) _init_stylesheet(profile) # We need to do this here as a WORKAROUND for # https://bugreports.qt.io/browse/QTBUG-58650 PersistentCookiePolicy().set(config.get('content', 'cookies-store')) Attribute(QWebEngineSettings.FullScreenSupportEnabled).set(True) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(_args): """Initialize the global QWebSettings.""" cache_path = standarddir.cache() data_path = standarddir.data() QWebSettings.setIconDatabasePath(standarddir.cache()) QWebSettings.setOfflineWebApplicationCachePath( os.path.join(cache_path, 'application-cache')) QWebSettings.globalSettings().setLocalStoragePath( os.path.join(data_path, 'local-storage')) QWebSettings.setOfflineStoragePath( os.path.join(data_path, 'offline-storage')) websettings.init_mappings(MAPPINGS) _set_user_stylesheet() config.instance.changed.connect(_update_settings)
def init(_args): """Initialize the global QWebSettings.""" cache_path = standarddir.cache() data_path = standarddir.data() _init_private_browsing() QWebSettings.setOfflineWebApplicationCachePath( os.path.join(cache_path, 'application-cache')) QWebSettings.globalSettings().setLocalStoragePath( os.path.join(data_path, 'local-storage')) QWebSettings.setOfflineStoragePath( os.path.join(data_path, 'offline-storage')) websettings.init_mappings(MAPPINGS) _set_user_stylesheet() objreg.get('config').changed.connect(update_settings)
def init(): """Initialize the global QWebSettings.""" cache_path = standarddir.cache() data_path = standarddir.data() if config.get('general', 'private-browsing') or cache_path is None: QWebSettings.setIconDatabasePath('') else: QWebSettings.setIconDatabasePath(cache_path) if cache_path is not None: QWebSettings.setOfflineWebApplicationCachePath( os.path.join(cache_path, 'application-cache')) if data_path is not None: QWebSettings.globalSettings().setLocalStoragePath( os.path.join(data_path, 'local-storage')) QWebSettings.setOfflineStoragePath( os.path.join(data_path, 'offline-storage')) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(args): """Initialize the global QWebSettings.""" if args.enable_webengine_inspector: os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) # WORKAROUND for # https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826 if sys.platform == 'linux': ctypes.CDLL(ctypes.util.find_library("GL"), mode=ctypes.RTLD_GLOBAL) _init_profiles() # We need to do this here as a WORKAROUND for # https://bugreports.qt.io/browse/QTBUG-58650 if not qtutils.version_check('5.9'): PersistentCookiePolicy().set(config.val.content.cookies.store) Attribute(QWebEngineSettings.FullScreenSupportEnabled).set(True) websettings.init_mappings(MAPPINGS) config.instance.changed.connect(_update_settings)
def init(args): """Initialize the global QWebSettings.""" if args.enable_webengine_inspector: os.environ['QTWEBENGINE_REMOTE_DEBUGGING'] = str(utils.random_port()) # WORKAROUND for # https://bugs.launchpad.net/ubuntu/+source/python-qt4/+bug/941826 if sys.platform == 'linux': ctypes.CDLL(ctypes.util.find_library("GL"), mode=ctypes.RTLD_GLOBAL) _init_profiles() # We need to do this here as a WORKAROUND for # https://bugreports.qt.io/browse/QTBUG-58650 if not qtutils.version_check('5.9'): PersistentCookiePolicy().set(config.get('content', 'cookies-store')) Attribute(QWebEngineSettings.FullScreenSupportEnabled).set(True) websettings.init_mappings(MAPPINGS) objreg.get('config').changed.connect(update_settings)
def init(_args): """Initialize the global QWebSettings.""" cache_path = standarddir.cache() data_path = standarddir.data() QWebSettings.setIconDatabasePath(standarddir.cache()) QWebSettings.setOfflineWebApplicationCachePath( os.path.join(cache_path, 'application-cache')) QWebSettings.globalSettings().setLocalStoragePath( os.path.join(data_path, 'local-storage')) QWebSettings.setOfflineStoragePath( os.path.join(data_path, 'offline-storage')) if (config.get('general', 'private-browsing') and not qtutils.version_check('5.4.2')): # WORKAROUND for https://codereview.qt-project.org/#/c/108936/ # Won't work when private browsing is not enabled globally, but that's # the best we can do... QWebSettings.setIconDatabasePath('') websettings.init_mappings(MAPPINGS) _set_user_stylesheet() objreg.get('config').changed.connect(update_settings)