More sql code review fixes
This commit is contained in:
parent
9b0395db08
commit
3a4ef09f58
@ -149,7 +149,7 @@ class CompletionView(QTreeView):
|
||||
def _resize_columns(self):
|
||||
"""Resize the completion columns based on column_widths."""
|
||||
width = self.size().width()
|
||||
column_widths = self.model.column_widths
|
||||
column_widths = self.model().column_widths
|
||||
pixel_widths = [(width * perc // 100) for perc in column_widths]
|
||||
|
||||
if self.verticalScrollBar().isVisible():
|
||||
@ -295,7 +295,7 @@ class CompletionView(QTreeView):
|
||||
|
||||
def _maybe_show(self):
|
||||
if (config.get('completion', 'show') == 'always' and
|
||||
model.count() > 0):
|
||||
self.model().count() > 0):
|
||||
self.show()
|
||||
else:
|
||||
self.hide()
|
||||
|
@ -44,5 +44,5 @@ def check_history(quteproc, httpbin, tmpdir, expected):
|
||||
|
||||
|
||||
@bdd.then("the history should be empty")
|
||||
def check_history_empty(quteproc, httpbin):
|
||||
check_history(quteproc, '', httpbin)
|
||||
def check_history_empty(quteproc, httpbin, tmpdir):
|
||||
check_history(quteproc, httpbin, tmpdir, '')
|
||||
|
@ -107,7 +107,6 @@ def test_entries_before(hist):
|
||||
assert times == [12348, 12347, 12346]
|
||||
|
||||
|
||||
|
||||
def test_clear(qtbot, tmpdir, hist, mocker):
|
||||
hist.add_url(QUrl('http://example.com/'))
|
||||
hist.add_url(QUrl('http://www.qutebrowser.org/'))
|
||||
@ -186,7 +185,7 @@ def cleanup_init():
|
||||
try:
|
||||
from PyQt5.QtWebKit import QWebHistoryInterface
|
||||
QWebHistoryInterface.setDefaultInterface(None)
|
||||
except Exception:
|
||||
except ImportError:
|
||||
pass
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user