Clean up FIXMEs and add github URLs

This commit is contained in:
Florian Bruhin 2014-10-01 22:23:27 +02:00
parent d7a0a7246f
commit d674b90240
29 changed files with 42 additions and 11 deletions

View File

@ -186,6 +186,8 @@ class Application(QApplication):
# However this also means if the logfile is there for some weird
# reason, we'll *always* log to stderr, but that's still better than no
# dialogs at all.
# probably irrelevant with single instance support
# https://github.com/The-Compiler/qutebrowser/issues/10
path = utils.get_standard_dir(QStandardPaths.DataLocation)
logname = os.path.join(path, 'crash.log')
# First check if an old logfile exists.
@ -332,6 +334,7 @@ class Application(QApplication):
# statusbar
# FIXME some of these probably only should be triggered on mainframe
# loadStarted.
# https://github.com/The-Compiler/qutebrowser/issues/112
tabs.current_tab_changed.connect(status.prog.on_tab_changed)
tabs.cur_progress.connect(status.prog.setValue)
tabs.cur_load_finished.connect(status.prog.hide)
@ -655,6 +658,7 @@ class Application(QApplication):
"""Second stage of shutdown."""
# pylint: disable=too-many-branches, too-many-statements
# FIXME refactor this
# https://github.com/The-Compiler/qutebrowser/issues/113
log.destroy.debug("Stage 2 of shutting down...")
# Remove eventfilter
try:

View File

@ -71,6 +71,7 @@ class CookieJar(QNetworkCookieJar):
"""Save cookies to disk."""
if not config.get('permissions', 'cookies-store'):
# FIXME if this changed to false we should delete the old cookies
# https://github.com/The-Compiler/qutebrowser/issues/116
return
self.purge_old_cookies()
lines = []

View File

@ -306,6 +306,7 @@ class HintManager(QObject):
# FIXME Instead of clicking the center, we could have nicer heuristics.
# e.g. parse (-webkit-)border-radius correctly and click text fields at
# the bottom right, and everything else on the top left or so.
# https://github.com/The-Compiler/qutebrowser/issues/70
pos = elem.rect_on_view().center()
log.hints.debug("Clicking on '{}' at {}/{}".format(
elem, pos.x(), pos.y()))

View File

@ -41,7 +41,6 @@ def check_overflow(arg, ctype):
CommandError if the argument is out of bounds.
ValueError if the given ctype is unknown.
"""
# FIXME we somehow should have nicer exceptions...
try:
qtutils.check_overflow(arg, ctype)
except OverflowError:

View File

@ -86,7 +86,6 @@ class _BlockingFIFOReader(QObject):
for line in self.fifo:
self.got_line.emit(line.rstrip())
if QThread.currentThread().isInterruptionRequested():
# FIXME this only exists since Qt 5.2, is that an issue?
self.finished.emit()
return

View File

@ -949,6 +949,7 @@ class ZoomPerc(Perc):
"""A percentage which needs to be in the current zoom percentages."""
# FIXME we should validate the percentage is in the list here.
# https://github.com/The-Compiler/qutebrowser/issues/115
class HintMode(BaseType):
@ -1084,6 +1085,7 @@ class UserStyleSheet(File):
# probably a CSS, so we don't handle it as filename.
# FIXME We just try if it is encodable, maybe we should validate
# CSS?
# https://github.com/The-Compiler/qutebrowser/issues/115
try:
value.encode('utf-8')
except UnicodeEncodeError as e:

View File

@ -145,8 +145,6 @@ class ValueList(Section):
_ordered_value_cache: A ChainMap-like OrderedDict of all values.
"""
# FIXME how to handle value layers here?
def __init__(self, keytype, valtype, *defaults):
"""Wrap types over default values. Take care when overriding this.

View File

@ -100,6 +100,7 @@ class NetworkManager(QNetworkAccessManager):
return
for err in errors:
# FIXME we might want to use warn here (non-fatal error)
# https://github.com/The-Compiler/qutebrowser/issues/114
message.error('SSL error: {}'.format(err.errorString()))
reply.ignoreSslErrors()

View File

@ -1127,6 +1127,7 @@ class FontTests(unittest.TestCase):
self.t2.validate(val)
# FIXME
# https://github.com/The-Compiler/qutebrowser/issues/103
@unittest.expectedFailure
def test_validate_invalid(self):
"""Test validate with invalid values."""

View File

@ -78,6 +78,8 @@ class QFlagsKeyTests(unittest.TestCase):
"""Tests for qflags_key()."""
# https://github.com/The-Compiler/qutebrowser/issues/42
@unittest.skip('FIXME')
def test_single(self):
"""Test with single value."""

View File

@ -198,6 +198,7 @@ class Completer(QObject):
# This is a search or gibberish, so we don't need to complete
# anything (yet)
# FIXME complete searchs
# https://github.com/The-Compiler/qutebrowser/issues/32
completion.hide()
return

View File

@ -116,6 +116,8 @@ def qflags_key(base, value, add_base=False, klass=None):
Note: Passing a combined value (such as Qt.AlignCenter) will get the names
for the individual bits (e.g. Qt.AlignVCenter | Qt.AlignHCenter). FIXME
https://github.com/The-Compiler/qutebrowser/issues/42
Args:
base: The object the flags are in, e.g. QtCore.Qt
value: The value to get.

View File

@ -161,6 +161,7 @@ def fix_harfbuzz(args):
# forced harfbuzz variant
# FIXME looking at the Qt code, 'new' isn't a valid value, but leaving
# it empty and using new yields different behaviour...
# (probably irrelevant when workaround gets removed)
log.init.debug("Using {} harfbuzz engine (forced)".format(
args.harfbuzz))
os.environ['QT_HARFBUZZ'] = args.harfbuzz

View File

@ -347,6 +347,8 @@ class RAMHandler(logging.Handler):
"""Dump the complete formatted log data as as string.
FIXME: We should do all the HTML formatter via jinja2.
(probably obsolete when moving to a widget for logging,
https://github.com/The-Compiler/qutebrowser/issues/34
"""
lines = []
fmt = self.html_formatter.format if html else self.format

View File

@ -72,7 +72,6 @@ def check_overflow(arg, ctype, fatal=True):
Raise:
OverflowError if the argument is out of bounds and fatal=True.
"""
# FIXME we somehow should have nicer exceptions...
maxval = MAXVALS[ctype]
minval = MINVALS[ctype]
if arg > maxval:

View File

@ -119,6 +119,7 @@ class Language(str):
"""A language-tag (RFC 5646, Section 2.1).
FIXME: This grammar is not 100% correct yet.
https://github.com/The-Compiler/qutebrowser/issues/105
"""
grammar = re.compile('[A-Za-z0-9-]+')
@ -132,6 +133,7 @@ class ValueChars(str):
"""A value of an attribute.
FIXME: Can we merge this with Value?
https://github.com/The-Compiler/qutebrowser/issues/105
"""
grammar = re.compile('({}|{})*'.format(attr_char_re, hex_digit_re))

View File

@ -32,6 +32,7 @@ from qutebrowser.utils import log, qtutils
# FIXME: we probably could raise some exceptions on invalid URLs
# https://github.com/The-Compiler/qutebrowser/issues/108
def _get_search_url(txt):
@ -235,6 +236,7 @@ def qurl_from_user_input(urlstr):
WORKAROUND - https://bugreports.qt-project.org/browse/QTBUG-41089
FIXME - Maybe https://codereview.qt-project.org/#/c/93851/ has a better way
to solve this?
https://github.com/The-Compiler/qutebrowser/issues/109
Args:
urlstr: The URL as string.

View File

@ -334,7 +334,7 @@ class Question(QObject):
self.aborted.emit()
self.completed.emit()
except TypeError:
# FIXME
# WORKAROUND
# We seem to get "pyqtSignal must be bound to a QObject, not
# 'Question' here, which makes no sense at all..."
log.misc.exception("Error while aborting question")

View File

@ -431,6 +431,7 @@ def keyevent_to_string(e):
if sys.platform == 'darwin':
# FIXME verify this feels right on a real Mac as well.
# In my Virtualbox VM, the Ctrl key shows up as meta.
# https://github.com/The-Compiler/qutebrowser/issues/110
modmask2str[Qt.MetaModifier] = 'Ctrl'
modifiers = (Qt.Key_Control, Qt.Key_Alt, Qt.Key_Shift, Qt.Key_Meta,
Qt.Key_AltGr, Qt.Key_Super_L, Qt.Key_Super_R,

View File

@ -86,6 +86,8 @@ class CompletionView(QTreeView):
COLUMN_WIDTHS = (20, 70, 10)
# FIXME style scrollbar
# https://github.com/The-Compiler/qutebrowser/issues/117
resize_completion = pyqtSignal()
@ -117,6 +119,7 @@ class CompletionView(QTreeView):
self.setUniformRowHeights(True)
self.hide()
# FIXME set elidemode
# https://github.com/The-Compiler/qutebrowser/issues/118
def __repr__(self):
return utils.get_repr(self)

View File

@ -53,6 +53,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
# FIXME this is horribly slow when resizing.
# We should probably cache something in _get_textdoc or so, but as soon as
# we implement eliding that cache probably isn't worth much anymore...
# https://github.com/The-Compiler/qutebrowser/issues/121
def __init__(self, parent=None):
self._painter = None
@ -172,6 +173,7 @@ class CompletionItemDelegate(QStyledItemDelegate):
"""
# FIXME we probably should do eliding here. See
# qcommonstyle.cpp:viewItemDrawText
# https://github.com/The-Compiler/qutebrowser/issues/118
text_option = QTextOption()
if self._opt.features & QStyleOptionViewItem.WrapText:
text_option.setWrapMode(QTextOption.WordWrap)

View File

@ -312,6 +312,7 @@ class StatusBar(QWidget):
queued.
"""
# FIXME probably using a QTime here would be easier.
# https://github.com/The-Compiler/qutebrowser/issues/124
log.statusbar.debug("Displaying text: {} (error={})".format(
text, error))
now = datetime.datetime.now()

View File

@ -64,10 +64,6 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
show_cmd = pyqtSignal()
hide_cmd = pyqtSignal()
# FIXME won't the tab key switch to the next widget?
# See http://www.saltycrane.com/blog/2008/01/how-to-capture-tab-key-press-event-with/
# for a possible fix.
def __init__(self, parent=None):
misc.CommandLineEdit.__init__(self, parent)
misc.MinimalLineEditMixin.__init__(self)
@ -128,7 +124,9 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
else:
self._empty_item_idx = None
break
cursor_pos -= (len(part) + 1) # FIXME are spaces always 1 char?
# FIXME are spaces always 1 char?
# https://github.com/The-Compiler/qutebrowser/issues/122
cursor_pos -= (len(part) + 1)
log.completion.debug("cursor_part {}, spaces {}".format(
self._cursor_part, spaces))
return
@ -176,6 +174,7 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit):
# rather than just replacing it if it is a dedicated argument. We could
# split the args, but then trailing spaces would be lost, so I'm not
# sure what's the best thing to do here
# https://github.com/The-Compiler/qutebrowser/issues/123
text = text.replace('{url}', url)
if not text[0] in modeparsers.STARTCHARS:
raise cmdexc.CommandError(

View File

@ -32,6 +32,8 @@ class Progress(QProgressBar):
"""The progress bar part of the status bar."""
# FIXME for some reason, margin-left is not shown
# https://github.com/The-Compiler/qutebrowser/issues/125
STYLESHEET = """
QProgressBar {
border-radius: 0px;

View File

@ -112,6 +112,7 @@ class TabbedBrowser(tabwidget.TabWidget):
objreg.register('command-dispatcher', dispatcher)
self._now_focused = None
# FIXME adjust this to font size
# https://github.com/The-Compiler/qutebrowser/issues/119
self.setIconSize(QSize(12, 12))
config.on_change(self.update_favicons, 'tabs', 'show-favicons')

View File

@ -88,6 +88,8 @@ class TabBar(QTabBar):
fixing this would be a lot of effort, so we'll postpone it until we're
reimplementing drag&drop for other reasons.
https://github.com/The-Compiler/qutebrowser/issues/126
Attributes:
vertical: When the tab bar is currently vertical.
"""

View File

@ -42,6 +42,7 @@ def call_asciidoc(src, dst):
os.path.basename(src)), 'cyan')
if os.name == 'nt':
# FIXME this is highly specific to my machine
# https://github.com/The-Compiler/qutebrowser/issues/106
args = [r'C:\Python27\python', r'J:\bin\asciidoc-8.6.9\asciidoc.py']
else:
args = ['asciidoc']

View File

@ -51,6 +51,7 @@ class ConfigChecker(checkers.BaseChecker):
"""Check that the arguments to config.get(...) are valid.
FIXME: We should check all ConfigManager calls.
https://github.com/The-Compiler/qutebrowser/issues/107
"""
try:
sect_arg = utils.get_argument_from_call(node, position=0,

View File

@ -231,6 +231,7 @@ def _get_args(checker):
# FIXME find a better solution
# pep257 uses cp1252 by default on Windows, which can't handle the
# unicode chars in some files.
# https://github.com/The-Compiler/qutebrowser/issues/105
excluded += ['configdata', 'misc']
args.append(r'--match=(?!{})\.py'.format('|'.join(excluded)))
args += _get_optional_args('pep257')