Commit Graph

469 Commits

Author SHA1 Message Date
Florian Bruhin
3956f81e73 Refactor websettings
This refactors the whole web(kit|engine|) settings mess a bit so there's a
Web(Kit|Engine)Settings object for (non-static) settings set on a
QWeb(Engine)Settings object in Qt. Everything else is set on module-level a bit
less declaratively.

The whole inheritance mess is gone, and we can now also construct a
Web(Kit|Engine)Settings object for a given tab.

Fixes #2701
2018-02-23 09:51:28 +01:00
Ryan Roden-Corrent
22d7490126 Remove unused import and TODO from urlmarks test. 2018-02-12 19:25:24 -05:00
Ryan Roden-Corrent
d0ca54a0cf Add unit tests for urlmarks. 2018-02-11 16:40:20 -05:00
Florian Bruhin
3170e35b31 Simplify QtWebKit scheme handlers 2018-02-11 17:14:41 +01:00
Florian Bruhin
c112290664 Make QtNetwork download manager great^H^H^H^Hlobal again
We originally made it per-window in b502280c06 for
issue #228, but that was back when we still needed window IDs for stuff like
message.info.

Nowadays, there's no reason for it to be per-window anymore. The rest of the
download code can deal with one global download manager (because QtWebEngine has
one), and apart from QNAM code which wasn't used here anyways (as tab_id=None)
there was nothing using the window ID anymore.

Also see #3456 which was the original motivation for this change.
2018-02-11 16:15:29 +01:00
Florian Bruhin
6f028e9ad0 Update copyright years 2018-02-05 12:19:50 +01:00
Florian Bruhin
1dac05a7ac Fix test_tab.py 2018-01-26 11:58:02 +01:00
Florian Bruhin
24cc54a574 Simplify initializing of AbstractTab subclasses
If we already pass the tab object, no need to pass the window ID separately.
2018-01-26 09:47:26 +01:00
Marc Jauvin
eb888cc8d7 fix latest change requests 2018-01-25 13:35:23 -05:00
Florian Bruhin
e65c0dd8a7 pylint: Re-enable bad-continuation
And lots and lots of whitespace changes.
2017-12-15 19:16:55 +01:00
Florian Bruhin
f4ed31b295 Add an utils.Unreachable exception 2017-12-15 16:33:47 +01:00
Florian Bruhin
003ec31848 Merge remote-tracking branch 'origin/pr/3333' 2017-12-02 14:47:24 +01:00
Ryan Roden-Corrent
822f6bae2c Fix webkitelem test.
Now that it checks tab.is_deleted we need to mock that.
2017-12-01 07:28:02 -05:00
Florian Bruhin
af638ec430 Move hint unittests to their own file 2017-11-29 10:44:32 +01:00
Florian Bruhin
b5dd647678 Upgrade pydocstyle/flake8-docstrings
See #3320
2017-11-26 20:30:32 +01:00
Florian Bruhin
9744a3d0bc Skip test_webenginesettings without QtWebEngine 2017-11-21 17:58:32 +01:00
Florian Bruhin
6c9f496edf Add a test for setting content.cache.size to a big value 2017-11-21 14:09:38 +01:00
Florian Bruhin
b9aa5df5ed Add unit tests for UnicodeEncodeError handling 2017-11-08 07:47:11 +01:00
Michal Siedlaczek
9153bf8c19 Additional version() test 2017-11-05 20:12:29 -05:00
Michal Siedlaczek
855d0312b5 Review fixes 2017-11-05 18:12:15 -05:00
Michal Siedlaczek
3ac2cfdf73 Support updating dictionaries and removing old versions. 2017-11-04 18:16:05 -04:00
Michal Siedlaczek
2dc0115c81 Load the newest version of the dictionary. 2017-11-03 19:20:31 -04:00
Florian Bruhin
0b86b302a2 pylint: Turn off some more too-many-* stuff globally
Humans are just better at judging what's okay here than a machine.
2017-10-31 07:35:00 +01:00
Florian Bruhin
280dddda6b Set backend in TestRectOnView.test_zoomed 2017-10-20 08:07:10 +02:00
Florian Bruhin
354c3c8c9b Handle unknown filetypes with qute://help 2017-10-18 09:02:39 +02:00
Florian Bruhin
d6d13770a3 Add missing history tests 2017-10-09 16:17:55 +02:00
Florian Bruhin
6c3f90146f Make qtutils.version_check strict by default
This also renames 'strict' to 'compiled' to be more descriptive.
It also fixes a crash when starting qutebrowser with an older compiled Qt
version which was introduced recently (calling setSpellCheckEnabled).
2017-10-08 19:08:37 +02:00
Michał Siedlaczek
e20ad95666 Merge branch 'master' into spell 2017-10-04 09:47:42 -04:00
Florian Bruhin
6037d44d0e Remove unused imports 2017-10-04 08:56:32 +02:00
Florian Bruhin
7cbb2b079f Use existing tabbed_browser_stubs fixture in tests 2017-10-04 06:35:42 +02:00
Michal Siedlaczek
932e7a9ab9 Review fixes 2017-10-03 20:07:06 -04:00
Ryan Roden-Corrent
888a1b8c57 Append multiple history backups on import.
Previously, a successful import of the text history into sqlite would
move 'history' to 'history.bak'. If history.bak already existed, this
would overwrite it on unix and fail on windows.

With this patch, the most recently imported history is appended to
history.bak to avoid data loss.

Resolves #3005.

A few other options I considered:

1. os.replace:
    - fast, simple, no error on Windows
    - potential data loss
2. numbered backups (.bak.1, .bak.2, ...):
    - fast, no data loss, but more complex
3. append each line to the backup as it is read:
    - more efficient than current patch (no need to read history twice)
    - potentially duplicate data if backup fails
2017-09-23 13:06:11 -04:00
Michal Siedlaczek
b840b8066b Spell only when pyqt>=5.8 2017-09-22 11:16:59 -04:00
Michal Siedlaczek
2150154350 Skip end2end spell tests if a dictionary is/isn't installed 2017-09-21 16:36:47 -04:00
Michal Siedlaczek
9e620ce6e9 Fix spell with new config 2017-09-21 12:09:55 -04:00
Michal Siedlaczek
132b1f705e Revert requirements changes 2017-09-21 09:56:38 -04:00
Michal Siedlaczek
95592770a7 Fixing test dependencies and other test issues 2017-09-21 09:53:51 -04:00
Michal Siedlaczek
fac0e44a7e Test all available languages and getting installed langs when the dir doesn't exist 2017-09-21 09:52:31 -04:00
Michal Siedlaczek
82433e04ad Set default value for spelling settings and limit number of installed languages for testing 2017-09-21 09:52:09 -04:00
Michal Siedlaczek
c2197102a3 Enable spell checking and installing dictionaries for QtWebEngine 2017-09-21 09:51:52 -04:00
Florian Bruhin
53b1ffe953 Merge remote-tracking branch 'origin/pr/2965' 2017-09-21 09:12:56 +02:00
Ryan Roden-Corrent
5cd00f699e Resolve KeyError when deleting URL with space.
Resolves #2963.
2017-09-20 07:15:59 -04:00
Florian Bruhin
ef1c83862b Use utils.is_* for platform checks everywhere 2017-09-20 11:10:24 +02:00
Florian Bruhin
3a5241b642 Start using attrs
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin
7226750363 Bump up Hypothesis deadline globally 2017-09-19 15:08:56 +02:00
Florian Bruhin
bb073e1709 Bump up another hypothesis deadline 2017-09-19 13:38:44 +02:00
Florian Bruhin
a23492fe27 Bump up hypothesis deadline for Content-Disposition test 2017-09-19 11:16:03 +02:00
Florian Bruhin
51afe14965 Set backend to QtWebKit in cookie tests 2017-09-19 11:07:11 +02:00
Florian Bruhin
852baaa8c3 Drop support for Qt < 5.7.1
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
62b30af12a Fix unit tests for end2end SQL change 2017-09-17 11:49:42 +02:00