From 963066b4bd7e20e1137ac9cdc92040a98e097af2 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 22 Apr 2014 14:45:24 +0200 Subject: [PATCH] Remove some old FIXMEs --- qutebrowser/commands/command.py | 2 +- qutebrowser/commands/utils.py | 1 - qutebrowser/config/config.py | 1 - qutebrowser/config/conftypes.py | 2 +- qutebrowser/config/style.py | 4 ---- qutebrowser/models/completion.py | 2 -- qutebrowser/network/qutescheme.py | 1 - qutebrowser/utils/keyparser.py | 2 +- qutebrowser/utils/url.py | 4 ++-- qutebrowser/widgets/completion.py | 6 +++--- qutebrowser/widgets/statusbar.py | 2 -- qutebrowser/widgets/tabbedbrowser.py | 2 -- 12 files changed, 8 insertions(+), 21 deletions(-) diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py index e5ed4b492..4c80e8220 100644 --- a/qutebrowser/commands/command.py +++ b/qutebrowser/commands/command.py @@ -48,7 +48,7 @@ class Command(QObject): from the app.py context. """ - # FIXME: + # TODO: # we should probably have some kind of typing / argument casting for args # this might be combined with help texts or so as well diff --git a/qutebrowser/commands/utils.py b/qutebrowser/commands/utils.py index d2e35f50b..323f8f665 100644 --- a/qutebrowser/commands/utils.py +++ b/qutebrowser/commands/utils.py @@ -79,7 +79,6 @@ class register: # pylint: disable=invalid-name Return: The original function (unmodified). """ - # FIXME: only register commands once names = [] name = func.__name__.lower() if self.name is None else self.name if isinstance(name, str): diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index 5d57ae054..268505a0b 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -362,7 +362,6 @@ class Config(QObject): Return: The changed config part as string. """ - # FIXME adopt this for layering lines = [] for secname, section in self.sections.items(): changed = section.dump_userconfig() diff --git a/qutebrowser/config/conftypes.py b/qutebrowser/config/conftypes.py index 4ce77dbf9..9fa3e3769 100644 --- a/qutebrowser/config/conftypes.py +++ b/qutebrowser/config/conftypes.py @@ -436,7 +436,7 @@ class Font(BaseType): typestr = 'font' def validate(self, value): - # FIXME validate fonts + # We can't really validate anything here pass diff --git a/qutebrowser/config/style.py b/qutebrowser/config/style.py index f53f4eb25..d9b667738 100644 --- a/qutebrowser/config/style.py +++ b/qutebrowser/config/style.py @@ -82,10 +82,6 @@ class ColorDict(dict): """A dict aimed at Qt stylesheet colors.""" - # FIXME we should validate colors in __setitem__ based on: - # http://qt-project.org/doc/qt-4.8/stylesheet-reference.html#brush - # http://www.w3.org/TR/CSS21/syndata.html#color-units - def __getitem__(self, key): """Override dict __getitem__. diff --git a/qutebrowser/models/completion.py b/qutebrowser/models/completion.py index 0a62e4c1b..02af29b2b 100644 --- a/qutebrowser/models/completion.py +++ b/qutebrowser/models/completion.py @@ -262,8 +262,6 @@ class CompletionModel(QAbstractItemModel): Return: The item flags, or Qt.NoItemFlags on error. """ - # FIXME categories are not selectable, but moving via arrow keys still - # tries to select them if not index.isValid(): return Qt.NoItemFlags flags = Qt.ItemIsEnabled diff --git a/qutebrowser/network/qutescheme.py b/qutebrowser/network/qutescheme.py index e1ad1defd..748ea4db4 100644 --- a/qutebrowser/network/qutescheme.py +++ b/qutebrowser/network/qutescheme.py @@ -89,7 +89,6 @@ class QuteSchemeHandler(SchemeHandler): """ # pylint: disable=unused-argument # FIXME handle unknown pages - # FIXME adjust URLutils based on handlers logging.debug('request: {}'.format(request)) url = urlstring(request.url()) handler = getattr(QuteHandlers, self._transform_url(url)) diff --git a/qutebrowser/utils/keyparser.py b/qutebrowser/utils/keyparser.py index 1130e6fc5..58af32022 100644 --- a/qutebrowser/utils/keyparser.py +++ b/qutebrowser/utils/keyparser.py @@ -110,7 +110,7 @@ class KeyParser(QObject): Args: e: the KeyPressEvent from Qt. """ - # FIXME maybe we can do this in an easier way by using QKeySeqyence + # FIXME maybe we can do this in an easier way by using QKeySequence # which has a matches method. logging.debug('Got key: {} / text: "{}"'.format(e.key(), e.text())) txt = e.text().strip() diff --git a/qutebrowser/utils/url.py b/qutebrowser/utils/url.py index 4dfef76d0..d887769bb 100644 --- a/qutebrowser/utils/url.py +++ b/qutebrowser/utils/url.py @@ -84,8 +84,8 @@ def _is_url_dns(url): Return: True if the url really is an URL, False otherwise. """ - # FIXME we could probably solve this in a nicer way by attempting to open - # the page in the webview, and then open the search if that fails. + # FIXME If we use Qt's methods to resolve URLs, we could benefit from the + # build-in cache and wouldn't have to resolve again. host = url.host() logging.debug("DNS request for {}".format(host)) if not host: diff --git a/qutebrowser/widgets/completion.py b/qutebrowser/widgets/completion.py index b70ff53c5..9363fc32d 100644 --- a/qutebrowser/widgets/completion.py +++ b/qutebrowser/widgets/completion.py @@ -133,7 +133,7 @@ class CompletionView(QTreeView): self.setHeaderHidden(True) self.setIndentation(0) self.setItemsExpandable(False) - # FIXME This is a workaround for weird race conditions with invalid + # QTBUG? This is a workaround for weird race conditions with invalid # item indexes leading to segfaults in Qt. # # Some background: http://bugs.quassel-irc.org/issues/663 @@ -379,8 +379,8 @@ class _CompletionItemDelegate(QStyledItemDelegate): if state & QStyle.State_Selected: self._painter.setPen(self._opt.palette.color( cg, QPalette.HighlightedText)) - # FIXME this is a dirty fix for the text jumping by one pixel... - # we really should do this properly somehow + # This is a dirty fix for the text jumping by one pixel for + # whatever reason. text_rect.adjust(0, -1, 0, 0) else: self._painter.setPen(self._opt.palette.color(cg, QPalette.Text)) diff --git a/qutebrowser/widgets/statusbar.py b/qutebrowser/widgets/statusbar.py index ac499e596..b4ccbb688 100644 --- a/qutebrowser/widgets/statusbar.py +++ b/qutebrowser/widgets/statusbar.py @@ -455,8 +455,6 @@ class TextBase(QLabel): when the text is empty -- we explicitely need to call repaint() to resolve this. See http://stackoverflow.com/q/21890462/2085149 - FIXME is there a nicer way to work around this? - Args: txt: The text to set (string). """ diff --git a/qutebrowser/widgets/tabbedbrowser.py b/qutebrowser/widgets/tabbedbrowser.py index 5924b53a1..137f2d985 100644 --- a/qutebrowser/widgets/tabbedbrowser.py +++ b/qutebrowser/widgets/tabbedbrowser.py @@ -206,7 +206,6 @@ class TabbedBrowser(TabWidget): return last_close = config.get('tabbar', 'last_close') if self.count() > 1: - # FIXME maybe we actually should store the webview objects here self._url_stack.append(tab.url()) self.removeTab(idx) tab.shutdown(callback=partial(self._cb_tab_shutdown, tab)) @@ -231,7 +230,6 @@ class TabbedBrowser(TabWidget): self._connect_tab_signals(tab) self._tabs.append(tab) self.addTab(tab, urlutils.urlstring(url)) - # FIXME sometimes this doesn't load tab.show() tab.openurl(url) if not background: