Adjust various comments
This commit is contained in:
parent
3c99436950
commit
d9516b9c1d
@ -484,7 +484,7 @@ class CommandDispatcher:
|
||||
url = self._current_url().adjusted(QUrl.RemoveFragment)
|
||||
|
||||
if where in ['prev', 'next']:
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
page = widget._widget.page() # pylint: disable=protected-access
|
||||
frame = page.currentFrame()
|
||||
if frame is None:
|
||||
@ -1037,7 +1037,7 @@ class CommandDispatcher:
|
||||
env['QUTE_SELECTED_TEXT'] = tab.caret.selection()
|
||||
env['QUTE_SELECTED_HTML'] = tab.caret.selection(html=True)
|
||||
|
||||
# FIXME:refactor: If tab is None, run_async will fail!
|
||||
# FIXME:qtwebengine: If tab is None, run_async will fail!
|
||||
|
||||
try:
|
||||
url = self._tabbed_browser.current_url()
|
||||
@ -1136,7 +1136,7 @@ class CommandDispatcher:
|
||||
"Please enable developer-extras before using the "
|
||||
"webinspector!")
|
||||
tab.data.inspector = inspector.WebInspector()
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
page = tab._widget.page() # pylint: disable=protected-access
|
||||
tab.data.inspector.setPage(page)
|
||||
tab.data.inspector.show()
|
||||
@ -1185,7 +1185,7 @@ class CommandDispatcher:
|
||||
elif mhtml_:
|
||||
self._download_mhtml(dest)
|
||||
else:
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
tab = self._current_widget()
|
||||
page = tab._widget.page() # pylint: disable=protected-access
|
||||
download_manager.get(self._current_url(), page=page,
|
||||
@ -1330,7 +1330,7 @@ class CommandDispatcher:
|
||||
The editor which should be launched can be configured via the
|
||||
`general -> editor` config option.
|
||||
"""
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
tab = self._current_widget()
|
||||
page = tab._widget.page() # pylint: disable=protected-access
|
||||
try:
|
||||
@ -1375,7 +1375,7 @@ class CommandDispatcher:
|
||||
needs_js=True)
|
||||
def paste_primary(self):
|
||||
"""Paste the primary selection at cursor position."""
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
tab = self._current_widget()
|
||||
page = tab._widget.page() # pylint: disable=protected-access
|
||||
try:
|
||||
|
@ -819,7 +819,7 @@ class HintManager(QObject):
|
||||
tab = tabbed_browser.currentWidget()
|
||||
if tab is None:
|
||||
raise cmdexc.CommandError("No WebView available yet!")
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
page = tab._widget.page() # pylint: disable=protected-access
|
||||
mainframe = page.mainFrame()
|
||||
if mainframe is None:
|
||||
|
@ -154,7 +154,7 @@ class AbstractZoom(QObject):
|
||||
self._init_neighborlist()
|
||||
objreg.get('config').changed.connect(self._on_config_changed)
|
||||
|
||||
# # FIXME:refactor is this needed?
|
||||
# # FIXME:qtwebengine is this needed?
|
||||
# # For some reason, this signal doesn't get disconnected automatically
|
||||
# # when the WebView is destroyed on older PyQt versions.
|
||||
# # See https://github.com/The-Compiler/qutebrowser/issues/390
|
||||
@ -431,7 +431,7 @@ class AbstractTab(QWidget):
|
||||
load_progress = pyqtSignal(int)
|
||||
load_finished = pyqtSignal(bool)
|
||||
icon_changed = pyqtSignal(QIcon)
|
||||
# FIXME:refactor get rid of this altogether?
|
||||
# FIXME:qtwebengine get rid of this altogether?
|
||||
url_text_changed = pyqtSignal(str)
|
||||
title_changed = pyqtSignal(str)
|
||||
load_status_changed = pyqtSignal(str)
|
||||
|
@ -31,7 +31,7 @@ from qutebrowser.browser.webengine import webview
|
||||
from qutebrowser.utils import usertypes, qtutils
|
||||
|
||||
|
||||
## FIXME:refactor add stubs for abstract things which aren't implemented yet.
|
||||
## FIXME:qtwebengine add stubs for abstract things which aren't implemented yet.
|
||||
## pylint: disable=abstract-method
|
||||
|
||||
|
||||
@ -74,11 +74,12 @@ class WebEngineScroller(tab.AbstractScroller):
|
||||
"""QtWebEngine implementations related to scrolling."""
|
||||
|
||||
def _key_press(self, key, count=1):
|
||||
# FIXME Abort scrolling if the minimum/maximum was reached.
|
||||
# FIXME:qtwebengine Abort scrolling if the minimum/maximum was reached.
|
||||
press_evt = QKeyEvent(QEvent.KeyPress, key, Qt.NoModifier, 0, 0, 0)
|
||||
release_evt = QKeyEvent(QEvent.KeyRelease, key, Qt.NoModifier, 0, 0, 0)
|
||||
recipient = self._widget.focusProxy()
|
||||
for _ in range(count):
|
||||
# If we get a segfault here, we might want to try sendEvent instead.
|
||||
QApplication.postEvent(recipient, press_evt)
|
||||
QApplication.postEvent(recipient, release_evt)
|
||||
|
||||
@ -91,7 +92,7 @@ class WebEngineScroller(tab.AbstractScroller):
|
||||
# Added in Qt 5.7
|
||||
return (None, None)
|
||||
else:
|
||||
# FIXME is this correct?
|
||||
# FIXME:qtwebengine is this correct?
|
||||
perc_x = 100 / size.width() * pos.x()
|
||||
perc_y = 100 / size.height() * pos.y()
|
||||
return (perc_x, perc_y)
|
||||
@ -190,7 +191,7 @@ class WebEngineViewTab(tab.AbstractTab):
|
||||
|
||||
@property
|
||||
def progress(self):
|
||||
return 0 # FIXME:refactor
|
||||
return 0 # FIXME:qtwebengine
|
||||
|
||||
@property
|
||||
def load_status(self):
|
||||
@ -232,7 +233,8 @@ class WebEngineViewTab(tab.AbstractTab):
|
||||
self._widget.triggerPageAction(action)
|
||||
|
||||
def set_html(self, html, base_url):
|
||||
# FIXME check this and raise an exception if too big:
|
||||
# FIXME:qtwebengine
|
||||
# check this and raise an exception if too big:
|
||||
# Warning: The content will be percent encoded before being sent to the
|
||||
# renderer via IPC. This may increase its size. The maximum size of the
|
||||
# percent encoded content is 2 megabytes minus 30 bytes.
|
||||
@ -247,7 +249,7 @@ class WebEngineViewTab(tab.AbstractTab):
|
||||
page.loadStarted.connect(self._on_load_started)
|
||||
view.titleChanged.connect(self.title_changed)
|
||||
page.loadFinished.connect(self.load_finished)
|
||||
# FIXME:refactor
|
||||
# FIXME:qtwebengine stub this?
|
||||
# view.iconChanged.connect(self.icon_changed)
|
||||
# view.scroll.pos_changed.connect(self.scroll.perc_changed)
|
||||
# view.url_text_changed.connect(self.url_text_changed)
|
||||
|
@ -254,7 +254,7 @@ class _Downloader:
|
||||
self._used = True
|
||||
web_url = self.web_view.cur_url
|
||||
|
||||
# FIXME:refactor have a proper API for this
|
||||
# FIXME:qtwebengine have a proper API for this
|
||||
page = self.web_view._widget.page() # pylint: disable=protected-access
|
||||
web_frame = page.mainFrame()
|
||||
|
||||
|
@ -310,6 +310,8 @@ class WebViewScroller(tabmod.AbstractScroller):
|
||||
|
||||
"""QtWebKit implementations related to scrolling."""
|
||||
|
||||
# FIXME:qtwebengine When to use the main frame, when the current one?
|
||||
|
||||
def pos_px(self):
|
||||
return self._widget.page().mainFrame().scrollPosition()
|
||||
|
||||
@ -360,7 +362,7 @@ class WebViewScroller(tabmod.AbstractScroller):
|
||||
release_evt = QKeyEvent(QEvent.KeyRelease, key, Qt.NoModifier, 0, 0, 0)
|
||||
getter = None if getter_name is None else getattr(frame, getter_name)
|
||||
|
||||
# FIXME needed?
|
||||
# FIXME:qtwebengine needed?
|
||||
# self._widget.setFocus()
|
||||
|
||||
for _ in range(count):
|
||||
|
@ -95,7 +95,7 @@ class WebView(QWebView):
|
||||
self.progress = 0
|
||||
self.registry = objreg.ObjectRegistry()
|
||||
self._tab_id = tab_id
|
||||
# FIXME:refactor stop registering it here
|
||||
# FIXME:qtwebengine stop registering it here
|
||||
tab_registry = objreg.get('tab-registry', scope='window',
|
||||
window=win_id)
|
||||
tab_registry[self._tab_id] = self
|
||||
|
Loading…
Reference in New Issue
Block a user