Commit Graph

9553 Commits

Author SHA1 Message Date
Florian Bruhin
7f311a46ae Merge branch 'unix_filename_rubout' of https://github.com/rcorre/qutebrowser into rcorre-unix_filename_rubout 2016-08-01 10:40:34 +02:00
Florian Bruhin
4c02717fa3 Merge branch 'LadyClaire-master' 2016-08-01 10:35:49 +02:00
Florian Bruhin
858fb77e19 Regenerate authors 2016-08-01 10:34:58 +02:00
Florian Bruhin
0865527631 Merge branch 'master' of https://github.com/LadyClaire/qutebrowser into LadyClaire-master 2016-08-01 10:29:58 +02:00
nanjekyejoannah
212d5fe932 commit resolving issue #1395 2016-08-01 11:28:27 +03:00
Florian Bruhin
12f506073a flake8/pylint reqs: Update mccabe to 0.5.2
When opening files ourselves, make sure we always name the file variable
2016-08-01 10:06:08 +02:00
Claire C.C
046eec9136 Remove extra "available" 2016-08-01 00:43:46 -07:00
Claire Cavanaugh
f261490dab Fix minor errors and improve flow of text 2016-07-31 21:43:54 -07:00
Ryan Roden-Corrent
86a08d17c2 Dedupe code in test_readline.
Many of the tests repeated the same block of logic, so consolidate it
into one function.
2016-07-30 22:00:12 -04:00
Ryan Roden-Corrent
a086095954 Implement unix_filename_rubout.
unix_filename_rubout deletes to the previous slash or whitespace,
unlike the previously implemented backwards-kill-word which treats and
non-alphanumeric character as a boundary.

To illustrate, given the text 'foo/bar.baz', unix_filename_rubout will
delete 'bar.baz' while backwards-kill-word will delete only 'baz'.

See #1710.
2016-07-30 19:34:38 -04:00
Florian Bruhin
57f256e80d Merge branch 'rcorre-backward-kill-word' 2016-07-30 18:49:58 +02:00
Florian Bruhin
09418d77a0 Update changelog 2016-07-30 18:49:10 +02:00
Ryan Roden-Corrent
6bcdacf1ce Implement readline's backward-kill-word.
This restores the previous behavior of `unix-word-rubout` as
`backward-kill-word`, which is closer to the naming used in readline.
It is bound to <Alt-Backspace> by default, though <Ctrl-Backspace> will
also work due to a builtin binding.

Resolves #1698.
2016-07-30 07:27:29 -04:00
Marshall Lochbaum
a7438f4f15 Extend tab-move's direction argument to take an index (fixes #1701) 2016-07-29 23:06:51 -04:00
Marshall Lochbaum
b22634e2eb Correct qutebrowser.conf documentation for list types 2016-07-29 16:08:42 -04:00
Ryan Roden-Corrent
fbadc5e668 Remove second arg from on_selection_changed.
The deselected argument was unused, so remove it from the signal and
the slot.
2016-07-29 08:48:24 -04:00
Florian Bruhin
f9c09a1f43 Merge branch 'lahwaacz-completion_trivial' 2016-07-29 12:08:28 +02:00
Florian Bruhin
b80ea14557 Regenerate authors 2016-07-29 12:08:23 +02:00
Florian Bruhin
14eabc7160 Merge branch 'completion_trivial' of https://github.com/lahwaacz/qutebrowser into lahwaacz-completion_trivial 2016-07-29 12:08:10 +02:00
Florian Bruhin
066c9bf4dc Split websettings into web{kit,engine,}settings 2016-07-29 12:01:22 +02:00
Florian Bruhin
c40059715a Fix long line 2016-07-29 10:43:53 +02:00
Florian Bruhin
08a9786a73 Add a stub for WebEnginePage.createWindow
See #1699.
2016-07-29 10:35:14 +02:00
Florian Bruhin
cffe2281b1 Use qtmodeltester for completion model tests
See http://pytest-qt.readthedocs.io/en/latest/modeltester.html
See #1702
2016-07-29 10:26:55 +02:00
Jakub Klinkovský
2a70146db1 Remove unneeded invalidateFilter call.
First done in b5781f0ed3 and later
reverted in a6f1bf29ae because it had
broken "completion->shrink", but that is no longer the case.
2016-07-29 10:15:21 +02:00
Jakub Klinkovský
119f9c0e18 completion: get rid of model-specific sort method (see #545) 2016-07-29 10:13:32 +02:00
Jakub Klinkovský
49327dfcbb completion: highlight only the matched terms
closes #1650
2016-07-29 10:13:32 +02:00
Jakub Klinkovský
caf5937585 completion: get rid of custom_filter (see #545) 2016-07-29 10:13:27 +02:00
Florian Bruhin
4bf94f3c24 Use order='strict' with qtbot.waitSignals
See #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
a7e9b4e5d7 Get rid of extend=True for qt_log_ignore
This is now the default, see #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
e5e2a6a943 pytest.ini: Get rid of qt_wait_signal_raising
This is now the default; see #1702
2016-07-29 09:12:06 +02:00
Florian Bruhin
2e40bd3a36 tox: Update pytest-qt to 2.0.0
See #1702.

Breaking Changes

With pytest-qt 2.0, we changed some defaults to values we think are much
better, however this required some backwards-incompatible changes:

- pytest-qt now defaults to using PyQt5 if PYTEST_QT_API is not set.
  Before, it preferred PySide which is using the discontinued Qt4.
- Python 3 versions prior to 3.4 are no longer supported.
- The @pytest.mark.qt_log_ignore mark now defaults to extend=True, i.e.
  extends the patterns defined in the config file rather than overriding
  them. You can pass extend=False to get the old behaviour of overriding
  the patterns.
- qtbot.waitSignal now defaults to raising=True and raises an exception
  on timeouts. You can set qt_wait_signal_raising = false in your config
  to get back the old behaviour.
- PYTEST_QT_FORCE_PYQT environment variable is no longer supported. Set
  PYTEST_QT_API to the appropriate value instead or the new qt_api
  configuration option in your pytest.ini file.

New Features

- From this version onward, pytest-qt is licensed under the MIT license.
- New qtmodeltester fixture to test QAbstractItemModel subclasses.
- waitSignal and waitSignals can receive an optional callback that can
  evaluate if the arguments of emitted signals should resume execution
  or not.
- Now which Qt binding pytest-qt will use can be configured by the
  qt_api config option.
- While pytestqt.qt_compat is an internal module and shouldn't be
  imported directly, it is known that some test suites did import it.
  This module now uses a lazy-load mechanism to load Qt classes and
  objects, so the old symbols (QtCore, QApplication, etc.) are no longer
  available from it.

Other Changes

- Exceptions caught by pytest-qt in sys.excepthook are now also printed
  to stderr, making debugging them easier from within an IDE.
2016-07-29 09:12:06 +02:00
Florian Bruhin
baca1bcde2 travis: Remove testing on Ubuntu Wily 2016-07-29 09:10:02 +02:00
Florian Bruhin
81ca5cbe44 Merge branch 'LadyClaire-master' 2016-07-29 09:06:16 +02:00
Florian Bruhin
88b2c20421 Update docs 2016-07-29 09:06:04 +02:00
Florian Bruhin
af704439d9 Remove trailing newline 2016-07-29 09:05:25 +02:00
Florian Bruhin
943cd6ff48 Merge branch 'master' of https://github.com/LadyClaire/qutebrowser into LadyClaire-master 2016-07-29 09:04:52 +02:00
Florian Bruhin
f218d5d4b6 Try harder to pin pip/setuptools 2016-07-29 09:03:31 +02:00
Claire Cavanaugh
e409eafe2a Add test for opening a quickmark 2016-07-28 23:36:05 -07:00
Claire Cavanaugh
3d258df23a Heil PEP8 :P 2016-07-28 23:24:34 -07:00
Claire Cavanaugh
bf44636a24 :open opens quickmark when given a quckmark name 2016-07-28 22:50:10 -07:00
Ryan Roden-Corrent
e8f73b0fe6 Break up MainWindow.__init__.
Split out initialization of a few areas into private functions so
pylint won't complain about a long method.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
dd827332c0 Clean up unused imports from completion refactor. 2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
f31e890862 Move completion_item_{next,prev} to CompletionView.
These commands are more closely tied to the CompletionView than
Completer. This removes the need for an extra signal tying the
CompletionView to the Completer.

The call to _open_completion_if_needed was moved to
on_selection_changed, as this will already be called when a new item is
selected.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
ffc5a42d04 Don't use objreg to get CompletionView.
The CompletionView is the parent of the Completer, so there's no need
to use objreg to get it.
See #640.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
b9cf9d180b Decouple Completer and CompletionView.
Rather than having a CompletionView instantiate and register a
Completer, instantiate both in MainWindow. The CompletionView is the
parent of the Completer, and communicates by emitting
selection_changed, meaning it no longer needs to contain a reference to
the Completer.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
d836fcb118 Code review for completion tests.
- clean up docstring typos
- use _ to name an unused loop variable
- parent the filter model to avoid an issue with disposal
- use mocker.patch instead of monkeypatch to mock Completer creation
- use is instead of == to compare by identity
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
415ad7a638 Unit test completion view. 2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
a740f99607 Register the fake statusbar command in objreg.
The CompletionView looks in objreg for 'status-cmd', so move it from a
private fixture in test_completer to a public fixture that handles
objreg registration/deletion.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
e5da179ebf Limit the public interface of Completer.
Only schedule_completion_update and selection_changed are used
externally, so mark the rest of the API as private.
2016-07-28 12:20:24 -04:00
Ryan Roden-Corrent
aedf5b930a Test Completer.schedule_completion_update.
update_completion is only used internally, so instead test the real
public entry point which is schedule_completion_update.

This required mocking out QTimer to fire immediately so the test didn't
have to do flaky artificial delays.
2016-07-28 12:20:24 -04:00