database qute://back
This commit is contained in:
parent
801b6b90ce
commit
125af531cb
@ -32,7 +32,7 @@ from qutebrowser.misc import objects, sql
|
|||||||
|
|
||||||
|
|
||||||
# increment to indicate that HistoryCompletion must be regenerated
|
# increment to indicate that HistoryCompletion must be regenerated
|
||||||
_USER_VERSION = 1
|
_USER_VERSION = 2
|
||||||
|
|
||||||
|
|
||||||
class CompletionHistory(sql.SqlTable):
|
class CompletionHistory(sql.SqlTable):
|
||||||
@ -102,7 +102,8 @@ class WebHistory(sql.SqlTable):
|
|||||||
data = {'url': [], 'title': [], 'last_atime': []}
|
data = {'url': [], 'title': [], 'last_atime': []}
|
||||||
# select the latest entry for each url
|
# select the latest entry for each url
|
||||||
q = sql.Query('SELECT url, title, max(atime) AS atime FROM History '
|
q = sql.Query('SELECT url, title, max(atime) AS atime FROM History '
|
||||||
'WHERE NOT redirect GROUP BY url ORDER BY atime asc')
|
'WHERE NOT redirect and url NOT LIKE "qute://back%" '
|
||||||
|
'GROUP BY url ORDER BY atime asc')
|
||||||
for entry in q.run():
|
for entry in q.run():
|
||||||
data['url'].append(self._format_completion_url(QUrl(entry.url)))
|
data['url'].append(self._format_completion_url(QUrl(entry.url)))
|
||||||
data['title'].append(entry.title)
|
data['title'].append(entry.title)
|
||||||
@ -172,7 +173,7 @@ class WebHistory(sql.SqlTable):
|
|||||||
def add_from_tab(self, url, requested_url, title):
|
def add_from_tab(self, url, requested_url, title):
|
||||||
"""Add a new history entry as slot, called from a BrowserTab."""
|
"""Add a new history entry as slot, called from a BrowserTab."""
|
||||||
if any(url.scheme() == 'data' or
|
if any(url.scheme() == 'data' or
|
||||||
('qute', 'back') == (url.scheme(), url.host())
|
(url.scheme(), url.host()) == ('qute', 'back')
|
||||||
for url in (url, requested_url)):
|
for url in (url, requested_url)):
|
||||||
return
|
return
|
||||||
if url.isEmpty():
|
if url.isEmpty():
|
||||||
|
Loading…
Reference in New Issue
Block a user