Commit Graph

787 Commits

Author SHA1 Message Date
Florian Bruhin
e50f5ad55c tests: Get rid of TestTabData
Since we don't use __slots__ anymore, no need for those tests.
2016-08-11 16:47:28 +02:00
Florian Bruhin
f9db6b1d3d tests: Use mode_manager fixture in test_tab 2016-08-11 16:45:53 +02:00
Florian Bruhin
d6a3134b3e Remove unused imports 2016-08-11 16:38:45 +02:00
Florian Bruhin
1a94cb551c Move mouse wheel zooming to MouseEventHandler 2016-08-11 13:50:06 +02:00
Florian Bruhin
57896dc00e Merge branch 'clip' of https://github.com/blyxxyz/qutebrowser into blyxxyz-clip 2016-08-10 20:38:54 +02:00
Florian Bruhin
9d510d744a tests: Implement Tab._install_event_filter 2016-08-10 20:37:38 +02:00
Florian Bruhin
64afc562b6 Install MouseEventFilter on new WebEngine children
For some reason, when e.g. visiting duckduckgo and then heise.de,
QtWebEngine suddenly gets a new QOpenGLWidget as focusProxy.

We install an extra eventFilter observing the ChildAdded event and
re-adding the MouseEventFilter when that happens.
2016-08-10 19:44:06 +02:00
Florian Bruhin
29b778b6d6 Use javascript.assemble for all functions 2016-08-10 17:27:34 +02:00
Florian Bruhin
f908d29a5f Move mouse handling to an EventFilter 2016-08-10 16:44:40 +02:00
Florian Bruhin
f3c32308d3 Merge branch 'complete-hidden-commands' of https://github.com/rcorre/qutebrowser into rcorre-complete-hidden-commands 2016-08-10 15:38:46 +02:00
Florian Bruhin
bf3579d5b9 Fix test_history for WebKit/WebEngine split 2016-08-10 15:19:12 +02:00
Florian Bruhin
b488d7f9fd Make QtWebKit optional in utils.version 2016-08-10 15:05:15 +02:00
Florian Bruhin
ad5008152c Move browser.webkit.history to browser.history 2016-08-10 14:45:52 +02:00
Ryan Roden-Corrent
0c43ca9f09 Don't sort command completions in models.
The sortfilter already handles sorting, there is no reason to pre-sort
the entries in the model.
2016-08-10 06:58:34 -04:00
Ryan Roden-Corrent
97a971624b Show bindings for aliases in completion.
Command completions for `:bind` and `:` will now show bindings for
aliases. The binding is only included if it is bound to that alias, not
if it is bound to the command the alias points to.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
709470fbe6 Clean up miscmodels and test_models.
- Split up a long conditional into multiple variables.
- Fix a small typo in a related test.
- Remove a trailing comma from an argument list.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
8dbc368d08 Refactor duplicate code for command completion.
Consolidate the logic used to generate the command completion category
into one place. This is shared by CommandCompletionModel,
HelpCompletionModel, and BindCompletionModel.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
0ea61d5f15 Show hidden commands in completion for :bind.
There is a fair amount of duplicate code around command completion that
could probably be refactored.

Resolves #1707.
2016-08-10 06:56:44 -04:00
Ryan Roden-Corrent
dd9470af94 Show hidden commands in help completion.
Hidden commands are not shown in command completion as they typically
would not be run directly. However, a user might still might like to see
help for them if, for example, they are writing a script or creating a
binding.

Addresses #1707.
2016-08-10 06:55:46 -04:00
Florian Bruhin
cc0579bd1a Merge branch 'bind-alias' of https://github.com/rcorre/qutebrowser into rcorre-bind-alias 2016-08-10 09:35:28 +02:00
Florian Bruhin
a24391d40d Fix lint 2016-08-10 09:20:30 +02:00
Florian Bruhin
f0133624bf Add some tests for -OO logging 2016-08-10 09:05:04 +02:00
Ryan Roden-Corrent
91ec5cc356 Update command completion on setting an alias.
Wire up the config change event to update command completion on
changing aliases, so the new aliases will be included.

Fixes #1814.

Currently we do not have tests at a high enough level to test whether
signals are wired up correctly to update completions.
2016-08-09 21:37:12 -04:00
Florian Bruhin
fb3da578c5 Fix lint 2016-08-09 17:28:14 +02:00
Jan Verbeek
8e4733f483 Merge https://github.com/The-Compiler/qutebrowser into clip 2016-08-09 14:36:01 +02:00
Florian Bruhin
c8a92a0851 Fix test_assemble 2016-08-09 13:23:46 +02:00
Florian Bruhin
58fb41ab9d tests: Fix webkitelem test for tagName 2016-08-08 15:34:45 +02:00
Florian Bruhin
9d43becc25 Merge branch 'completion-item-focus' of https://github.com/rcorre/qutebrowser into rcorre-completion-item-focus 2016-08-08 15:21:35 +02:00
Florian Bruhin
0b16a36120 Clean up handling of focus element
Also fixes #1359.
2016-08-08 14:05:30 +02:00
Ryan Roden-Corrent
7038db6b17 Combine completion-item-{prev,next}.
- Use a single command completion-item-focus with a next/prev argument.
- Add a rule to translate old configs.
- Regenerate the docs.

See #1095.
2016-08-08 07:37:53 -04:00
Florian Bruhin
dfbadaf7c2 Split WebElementWrapper into abstract/webkit parts 2016-08-08 13:04:53 +02:00
Florian Bruhin
627f743c26 Handle float in _convert_js_arg
This fixes 'gg' with QtWebEngine.
2016-08-08 08:04:55 +02:00
Jan Verbeek
ebfe23c376 Merge https://github.com/The-Compiler/qutebrowser into clip
Also make it possible to use multiple variables in one argument.
2016-08-07 13:14:46 +02:00
Florian Bruhin
26e0383d45 Merge branch 'refactor_command_completion' of https://github.com/rcorre/qutebrowser into rcorre-refactor_command_completion 2016-08-07 11:29:50 +02:00
Florian Bruhin
eb2f682e20 Merge branch 'fix-windows-editor' of https://github.com/Kingdread/qutebrowser into Kingdread-fix-windows-editor 2016-08-07 11:17:21 +02:00
Florian Bruhin
efada0a44c Merge branch 'yank-refactor' of https://github.com/mlochbaum/qutebrowser into mlochbaum-yank-refactor 2016-08-07 11:02:24 +02:00
Florian Bruhin
0b93272786 Merge branch 'sortfilter_tests' of https://github.com/rcorre/qutebrowser into rcorre-sortfilter_tests 2016-08-07 10:46:28 +02:00
Marshall Lochbaum
7bfa46fb50 Add tests for yank migrations 2016-08-06 20:36:13 -04:00
Jan Verbeek
38508274e0 Improve clipboard exceptions, migrate bindings 2016-08-07 00:46:23 +02:00
Daniel Schadt
4d00b8fce9 tests: fix tests for misc.editor
Due to the change to NamedTemporaryFile, the _filename attribute was
removed. We now have to use _file.name.
2016-08-07 00:18:22 +02:00
Ryan Roden-Corrent
66358e5b0f Remove usertypes.Completion.empty.
Completion.empty existed to fill a slot in the old Command.completions
interface if the first positional arg had no completions but the second
did, as is the case for the `bind` command. Now that
`Command.completions` is replaced by `Command.get_pos_arg_info`, this
is no longer needed.
2016-08-06 12:01:09 -04:00
Ryan Roden-Corrent
c792ffda67 Remove Command.completion.
Command completion types are now identified by ArgInfo, so just use
that directly and cut out the middle-man. This shouldn't change any
completion behavior.

Adds a test for get_pos_arg_info to test_cmdutils.

Modifies test_completer to test the use of get_pos_arg_info. Instead of
using FakeCommand, real Command objects are used, to validate that the
Completer works with the real Command interface. This also cleans out
some test cases that were testing things already covered by other cases.
2016-08-06 11:59:04 -04:00
Florian Bruhin
68595e1736 Make sure base URL for resolve_url is absolute 2016-08-05 17:12:09 +02:00
Florian Bruhin
7a65559cce Move hints._resolve_url to a WebElement method 2016-08-05 17:09:52 +02:00
Florian Bruhin
4541f19195 Fix crash when doing :<space><enter>
Introduced in #1577.
Fixes #1773.
2016-08-05 15:42:03 +02:00
Ryan Roden-Corrent
3e1409b1f5 Dedupe code in test_sortfilter.
Add helper functions to create and parse completion models, as this was
repeated in many tests.
2016-08-05 08:47:52 -04:00
Ryan Roden-Corrent
ed69ef86ab Unit test CompletionFilterModel.sort. 2016-08-05 08:29:29 -04:00
Ryan Roden-Corrent
83b621b0e6 Test CompletionFilterModel.set_pattern.
This is a more rigorous test than filterAcceptsRow as it tests behavior
with multiple columns and different sort settings. In addition, it
tests intelligentLessThan which is not tested in the filterAcceptsRow
test (as lessThan is never called if there is only 1 item to filter).
2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
8e7002db7a Test CompletionFilterModel.count 2016-08-05 07:20:31 -04:00
Ryan Roden-Corrent
f19b818b58 Test CompletionFilterModel.set_source_model 2016-08-05 07:20:31 -04:00