Florian Bruhin
dc82ac3eb2
Move qute_pdfjs to qutescheme.py
2018-09-09 18:35:09 +02:00
Florian Bruhin
b611ff52cf
Support URL patterns for content.autoplay
2018-09-09 18:31:41 +02:00
Florian Bruhin
93eb05598e
Fix request logging
2018-09-07 16:12:40 +02:00
Florian Bruhin
0b27779c9d
Allow null initiator for qute:// URLs on Qt 5.11
...
Before Qt 5.11.2, for unique origins, we always got QUrl() and thus passed it
through.
With Qt 5.11.2, only missing origins (browser-initiated requests) get an empty
initiator, while unique origins get QUrl("null"):
https://codereview.qt-project.org/#/c/234849/
https://bugreports.qt.io/browse/QTBUG-69372
In theory, those should be locked down (as an unique origin is e.g. a sandboxed
iframe) and never have access to any other content.
However, thanks to a Qt bug, XHR on qute:// pages has QUrl("null") as origin as
long as the URL scheme is not registered. We can only do the registering once
Qt 5.12 is out.
Since unique origins were effectively already allowed on Qt 5.11.0/.1, we pass
them through here as well until Qt 5.12.
See #4198
2018-09-07 12:25:07 +02:00
Florian Bruhin
15c547b3f5
Move QuteSchemeHandler._check_initiator to its own method
2018-09-07 12:24:54 +02:00
Florian Bruhin
5ca911bcdb
Fix lint
2018-09-06 20:09:57 +02:00
Florian Bruhin
ab6c8dde9a
Decrease minimum QProgressDialog duration
...
We already have a threshold before we use a QProgressDialog at all, so let's
show it quite quickly and not after 4 seconds.
2018-09-06 17:26:28 +02:00
Florian Bruhin
d4f16f88b6
Remove support for importing pre-v1.0.0 history
2018-09-06 17:26:28 +02:00
Florian Bruhin
ec774379bd
Add tests for history progress
2018-09-06 17:13:46 +02:00
Florian Bruhin
e4b7786bcc
Factor out GUI stuff to a HistoryProgress object
2018-09-06 17:04:26 +02:00
Florian Bruhin
2109b2276e
Initial progress dialog for history rebuild
2018-09-06 16:52:14 +02:00
Florian Bruhin
cd8fd8ab3c
Use config cache for completion.web_history.exclude
...
On my machine, this speeds up regenerating from ~6min to ~25s.
2018-09-06 16:17:23 +02:00
Florian Bruhin
108cc65bc6
Merge remote-tracking branch 'origin/pr/4185'
2018-09-06 16:15:16 +02:00
Jay Kamat
8e82adc306
Refactor configcache to cache
...
Also fix and improve configcache tests
2018-09-05 22:26:12 -07:00
Florian Bruhin
6293bc5178
Fix lint and test
2018-09-04 23:46:34 +02:00
SubbulakshmiRS
5b8e0d8d80
Fixing the previous patches
...
Patch files for correct usage of QuteSchemeError and general clean up.
Closes https://github.com/qutebrowser/qutebrowser/issues/4059
2018-09-04 23:15:05 +02:00
Florian Bruhin
58793d95d7
Further clean up error handling
2018-09-04 23:05:59 +02:00
Florian Bruhin
92fcc523c5
WIP: Properly signal scheme errors
2018-09-04 23:03:10 +02:00
Florian Bruhin
2fcdc5a0c9
Merge branch 'blacklist-history'
2018-09-04 22:19:52 +02:00
Florian Bruhin
f6d0ed78d0
Improve description for completion.web_history.exclude
2018-09-04 22:19:22 +02:00
Jay Kamat
d4cf5045ab
Fix tests for configcache
2018-09-02 18:03:36 -07:00
Jay Kamat
cc09f6c962
Fix doc issues in configcache
2018-09-02 14:38:46 -07:00
Jay Kamat
0335fc31c1
Use config cache to cache static hotspots
2018-09-02 14:23:01 -07:00
Jay Kamat
067d76616b
Implement config cache system
2018-09-02 14:23:00 -07:00
Florian Bruhin
79eece8fd0
Completely undo older changes
2018-09-02 18:27:30 +02:00
Florian Bruhin
87a4b1d662
Reduce code duplication
2018-09-02 18:26:43 +02:00
Florian Bruhin
5b0c10d430
Fix docstrings
2018-09-02 15:46:57 +02:00
Florian Bruhin
8a42256cff
Merge remote-tracking branch 'origin/pr/4178'
2018-09-02 15:45:48 +02:00
Florian Bruhin
a7775ffc2d
Release v1.4.2
2018-09-02 14:53:38 +02:00
Florian Bruhin
ed67263a64
Check redirect before patterns
2018-09-02 14:42:47 +02:00
Florian Bruhin
dbdeb6a9c7
Rename history.exclude to completion.web_history.exclude
...
If the blacklist is only valid for the completion, the setting should also be
under completion.
This also un-renames history.gap_interval and renames
completion.web_history_max_items.
2018-09-02 14:42:47 +02:00
Florian Bruhin
4f56355fbe
Don't affect qute://history with history.exclude
2018-09-02 14:42:47 +02:00
Florian Bruhin
3a13614d0e
Fix none_ok description in BaseType
2018-09-02 12:10:07 +02:00
Florian Bruhin
67b4b7d490
Handle :// as URL pattern
2018-09-02 11:58:34 +02:00
Florian Bruhin
37396d68f3
Define names for sqlite error codes
2018-09-01 22:25:22 +02:00
Florian Bruhin
f5c92ded41
Merge Sql{Environment,Bug}Error with Sqlite{Environment,Bug}Error
2018-09-01 22:25:22 +02:00
Florian Bruhin
50ae2bf2f9
Redesign SQL error handling
...
Instead of having an environmental attribute on exceptions, we now have two
different exception classes.
Fixes #3341
See #3073
2018-09-01 22:25:22 +02:00
Florian Bruhin
99ae49ccd6
Describe all sqlite error codes
2018-09-01 22:25:22 +02:00
Florian Bruhin
71a2dad570
Add a history.exclude setting
...
This allows to exclude URL patterns from being displayed in the completion or
in qute://history.
2018-09-01 22:25:22 +02:00
Florian Bruhin
7fb2224640
Add a UrlPattern config type
...
For some settings it makes sense to have a list of URL patterns in the config,
rather than having a per-domain boolean setting.
2018-09-01 18:25:58 +02:00
Florian Bruhin
5c8d4ede06
Rename history_gap_interval to history.gap_interval
2018-09-01 18:25:58 +02:00
Florian Bruhin
67a52527f5
Mark SQLITE_IOERR/SQLITE_CANTOPEN as environmental error
...
Fixes #3060
IOERR: The SQLITE_IOERR result code says that the operation could not finish
because the operating system reported an I/O error.
CANTOPEN: The SQLITE_CANTOPEN result code indicates that SQLite was unable to
open a file. The file in question might be a primary database file or on of
several temporary disk files.
2018-09-01 18:25:58 +02:00
Florian Bruhin
47218e5402
sql.Query: Roll back transactions on errors
2018-09-01 18:25:58 +02:00
Florian Bruhin
aff1108836
sql.Query: Make sure transaction/commit succeed
2018-09-01 18:25:58 +02:00
Florian Bruhin
992f13b5b8
Add sql.Query._check_ok
2018-09-01 18:25:58 +02:00
Florian Bruhin
3f2a468750
Also detect missing bound values for sql.Query.run_batch
2018-09-01 18:25:58 +02:00
Florian Bruhin
0e284944e7
Use composition instead of inheritance for sql.Query
...
This means we're more loosely coupled to Qt's QSqlQuery, and also can move some
logic for handling batch queries from the table to there.
2018-09-01 18:25:58 +02:00
Florian Bruhin
6b719fb218
Make sure queries don't have any missing bindings
2018-09-01 18:25:58 +02:00
Florian Bruhin
9fb794656b
Make it possible to force a history rebuild
...
This adds a new CompletionMetaInfo table which is a simple key/value store.
Thanks to Python/sqlite duck typing, we can use that to store values of any
type, even new ones in the future.
Currently, the only allowed key is force_rebuild, which forces a rebuild of the
CompletionHistory table. This will be needed for a future change.
2018-09-01 18:25:58 +02:00
Vasilij Schneidermann
3fa6d94893
Display value when calling :set without a value
...
This change brings Qutebrowser closer to Vim's behavior of `:set
foo?` *and* `:set foo` displaying the current value of `foo`.
2018-08-31 21:34:42 +02:00