Commit Graph

12187 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
acea0d3c67 Use SQL completion for the open command.
Now that history, bookmark, and quickmark storage are SQL-backed, use
a sql completion model to serve url completions.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
6e1ea89ca1 Implement SQL completion model.
This model wraps one or more SQL tables and exposes data in a tiered
manner that can be consumed by the tree view used for completion.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
93d81d96ce Use SQL for quickmark/bookmark storage.
Store quickmarks and bookmarks in an in-memory sql database instead of a
python dict. Long-term storage is not affected, bookmarks and
quickmarks are still persisted in a text file.

The added and deleted signals were removed, as once sql completion
models are used the models will no longer need to update themselves.

This will set the stage for SQL-based history completion.
See #1765.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
9477a2eeb2 Use SQL for history storage.
The browser-wide in-memory web history is now stored in an in-memory sql
database instead of a python dict. Long-term storage is not affected, it
is still persisted in a text file of the same format.

This will set the stage for SQL-based history completion.
See #1765.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
f43f78c40f Implement SQL interface.
When qutebrowser starts, it creates an in-memory sqlite database. One
can instantiate a SqlTable to create a new table in the database. The
object provides an interface to query and modify the table.

This intended to serve as the base class for the quickmark, bookmark,
and history manager objects in objreg. Instead of reading their data
into an in-memory dict, they will read into an in-memory sql table.

Eventually the completion models for history, bookmarks, and quickmarks
can be replaced with SqlQuery models for faster creation and filtering.

See #1765.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
3b30b42211 Remove completion.instances, usertypes.Completion.
The new completion API no longer needs either of these. Instead of
referencing an enum member, cmdutils.argument.completion now points to
a function that returnsthe desired completion model.
This vastly simplifies the addition of new completion types. Previously
it was necessary to define the new model as well as editing usertypes
and completion.models.instances. Now it is only necessary to define a
single function under completion.models.

This is the next step of Completion Model/View Revamping (#74).
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
b36cf0572d Avoid potential circular import in config.py.
There was a circular import from
config -> keyconf -> miscmodels -> config.
This is resolved by scoping config's keyconf import to the one function
that uses it.
2017-06-19 07:42:12 -04:00
Ryan Roden-Corrent
08bb3f4f19 Implement completion models as functions.
First step of Completion Model/View revamping (#74). Rewrite the
completion models as functions that each return an instance of a
CompletionModel class.

Caching is removed from all models except the UrlModel. Models other
than the UrlModel can be generated very quickly so caching just adds
needless complexity and can lead to incorrect results if one forgets to
wire up a signal.
2017-06-19 07:42:12 -04:00
Florian Bruhin
bef372e5f5 Clear search on page load
Fixes #2728
2017-06-19 10:27:27 +02:00
Florian Bruhin
4ae8e247d0 Show 'legacy QtWebKit' in version output 2017-06-19 10:24:33 +02:00
Florian Bruhin
8191a5465a Regenerate authors 2017-06-19 09:44:04 +02:00
Florian Bruhin
5bb63e67e0 Remove another stray # 2017-06-19 09:43:45 +02:00
Florian Bruhin
8494332c3a Merge branch 'fix-tabbar-padding' of https://github.com/kmarius/qutebrowser 2017-06-19 09:43:26 +02:00
Florian Bruhin
df6c4c6e73 Fix earlyinit.qt_version issues 2017-06-19 09:42:49 +02:00
Florian Bruhin
9b5227b987 Improve test_version output 2017-06-19 09:06:18 +02:00
Florian Bruhin
6c534bea6b Actually remove version import in earlyinit... 2017-06-19 08:59:26 +02:00
Florian Bruhin
fdba676933 Move version.qt_version() to earlyinit
Importing version in earlyinit is a bad idea, as it already pulls in a lot of
stuff we don't want.
2017-06-19 08:57:29 +02:00
Marius
de743732aa remove # inside comment 2017-06-19 08:29:23 +02:00
Marius
ebd442ea95 add needed parens and remove trailing whitespace 2017-06-18 23:07:38 +02:00
Marius
68f172558b fix line length 2017-06-18 22:44:06 +02:00
Marius
4b2bf12efa Fix padding of remaining tabbar space with pinned tabs 2017-06-18 21:49:04 +02:00
Florian Bruhin
a5db21abe9 Update FAQ, fixes #2732 2017-06-17 15:47:39 +02:00
Florian Bruhin
695a2656fe Rename webelem.js functions to match WebEngineElem
Fixes #2726
2017-06-16 23:14:17 +02:00
Florian Bruhin
9cc688ea2b Fix initial tab sizing with vertical tabbar 2017-06-16 23:00:16 +02:00
Florian Bruhin
b37d040d44 Add version check for 5.8 search segfault workaround 2017-06-14 10:57:32 +02:00
Florian Bruhin
2ffb10badf Merge pull request #2715 from qutebrowser/pyup-scheduled-update-06-12-2017
Scheduled weekly dependency update for week 24
2017-06-14 10:44:11 +02:00
Florian Bruhin
54154e2434 Mark :stop test as flaky
Looks like the requests sometimes aren't updated, but I have no idea why.
2017-06-12 18:15:05 +02:00
Florian Bruhin
38d54cb112 Stabilize history tests
Get current URL right away in :view-source, and wait until source is shown in
the test.
2017-06-12 18:13:17 +02:00
pyup-bot
c9979d18db Update pytest from 3.1.1 to 3.1.2 2017-06-12 15:45:19 +02:00
pyup-bot
a2878a382c Update hypothesis from 3.11.1 to 3.11.3 2017-06-12 15:45:17 +02:00
pyup-bot
1deb6e53d0 Update chardet from 3.0.3 to 3.0.4 2017-06-12 15:45:16 +02:00
pyup-bot
227fd47f2f Update chardet from 3.0.3 to 3.0.4 2017-06-12 15:45:15 +02:00
pyup-bot
62d56237bd Update chardet from 3.0.3 to 3.0.4 2017-06-12 15:45:13 +02:00
Florian Bruhin
b687ede25c Adjust eslintrc for eslint 4.0 2017-06-12 09:23:20 +02:00
Florian Bruhin
57fbfbd606 Set an initial window size for background tabs
When we open a background tab, it gets a hardcoded size (800x600 or so) because
it doesn't get resized by the layout yet.

By resizing it to the size it'll actually have later, we make sure scrolling to
an anchor in an background tab works, and JS also gets the correct size for
background tabs.

Fixes #1190
Fixes #2495
See #1417
2017-06-11 17:48:01 +02:00
Florian Bruhin
2e5620cac1 Try a different way of fixing userscript crashes 2017-06-11 14:44:19 +02:00
Florian Bruhin
a49adc6298 Revert "Work around userscript crash issue"
This reverts commit 73ff2afb3f.

Doesn't seem to help, at least for pkill9...
2017-06-11 14:41:58 +02:00
Florian Bruhin
73ff2afb3f Work around userscript crash issue 2017-06-11 13:17:40 +02:00
Florian Bruhin
89218c9d31 Improve error handling in version.opengl_vendor()
Not being able to get versionFunctions is now handled, and the cleanup is done
in a finally: block.
2017-06-09 23:14:34 +02:00
Florian Bruhin
9c851293ac pyinstaller: Add PyQt5.QtOpenGL to hiddenimports 2017-06-09 21:50:52 +02:00
Florian Bruhin
ad260366ef Remove ":messages without messages" test
We can never know for sure there aren't any messages - for example, on Travis we get a message about XDG_RUNTIME_DIR being unset on Qt 5.9.
2017-06-09 11:04:21 +02:00
Florian Bruhin
9f9061f146 Update docs 2017-06-09 11:04:04 +02:00
Florian Bruhin
b874432c69 Remove private browsing notes for QtWebKit-NG 2017-06-09 10:31:21 +02:00
Florian Bruhin
250da212cd Adjust tests for new QtWebKit-NG 2017-06-09 10:28:41 +02:00
Florian Bruhin
d2c289b6a6 Adjust changelog 2017-06-08 14:18:40 +02:00
Florian Bruhin
6361a5bab2 Merge branch 'private_tag_tab_title' of https://github.com/craftyguy/qutebrowser 2017-06-08 14:17:43 +02:00
Florian Bruhin
56f1dfb9eb Merge remote-tracking branch 'origin/pyup-update-isort-4.2.14-to-4.2.15' 2017-06-08 14:17:25 +02:00
Florian Bruhin
ddf4521305 Fix :messages tests 2017-06-08 14:16:30 +02:00
Florian Bruhin
c8d4ef13de Adjust default :messages level 2017-06-08 12:35:21 +02:00
Florian Bruhin
63f6409fdb Remove stray StatusBar._option 2017-06-08 12:29:07 +02:00