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