Florian Bruhin
c0fdf19756
Merge remote-tracking branch 'origin/pr/3704'
2018-03-14 08:06:24 +01:00
Jay Kamat
35beff98a9
Add test for #3711
2018-03-13 19:18:42 -04:00
Florian Bruhin
b88ac51d25
Fall back to non-keypad keys without any keypad bindings
...
Fixes #3701
2018-03-13 14:40:54 +01:00
Ryan Roden-Corrent
73517f0a51
Fix test_backup_error.
...
- Need caplog at level error
- Rename test to be unique
2018-03-13 08:50:34 -04:00
Ryan Roden-Corrent
27966c94a6
Fix up editor backup patch.
...
- Use qutebrowser-editor-backup as the backup file prefix
- Consistently use message.error instead of cmdexc
- Improve test coverage for the backup function
- Fix lint errors in the unit test code
2018-03-13 07:34:18 -04:00
Florian Bruhin
dcd6bcd2f4
Apply changes from PR review
2018-03-13 08:47:41 +01:00
Florian Bruhin
c590648077
Merge remote-tracking branch 'origin/pr/3613'
2018-03-13 08:39:36 +01:00
Florian Bruhin
14d6e737fa
Merge remote-tracking branch 'origin/pr/3606'
2018-03-13 07:37:57 +01:00
Ryan Roden-Corrent
38bb3673db
Preserve a backup if editor callback fails.
...
Currently the editor deletes its temp file whenever editing is finished.
With this patch, the file will not be deleted if the editor callback
encounters an exception.
One example is if the tab containing the edited element is closed. The
editor errors with "Edited element vanished", but with this patch it
will also print "Backup at ..." so the user does not lose their work.
Resolves #1596 .
Supersedes #3641 , using the cleaner approach started in #1677 .
2018-03-12 08:34:50 -04:00
Florian Bruhin
8c5b7bcd03
Fix lint
2018-03-12 08:51:36 +01:00
Florian Bruhin
9941812127
Normalize keys read from the config
...
This makes sure the internal bindings.commands object only contains normalized
key sequences.
Fixes #3699
2018-03-12 08:00:56 +01:00
Florian Bruhin
990c0707f4
Make from_obj() work for List/Dict configtypes
...
We can't easily make it work for ListOrValue as we don't know which of both we
get at this point.
2018-03-12 08:00:18 +01:00
Florian Bruhin
c03ef10d54
tests: Add a yaml_config_stub fixture
2018-03-12 07:39:20 +01:00
Florian Bruhin
b6e29d8eae
Be explicit about expected output in test
2018-03-11 14:35:15 +01:00
Florian Bruhin
591883656e
Merge remote-tracking branch 'origin/pr/3700'
2018-03-11 14:34:06 +01:00
Florian Bruhin
f0a649e101
Mark another GreaseMonkey test as flaky
...
See #3238
2018-03-11 14:29:54 +01:00
Roman Bogorodskiy
d0342bffc4
Show version for POSIX OSes
...
For POSIX OSes other than Linux and macOS set OS Version to
platform.uname() instead of showing 'OS Version: ?'.
2018-03-11 13:28:53 +04:00
Johannes Wegener
cf4e472461
add basic completion to file dialog
2018-03-09 16:21:57 +01:00
Florian Bruhin
ebb373ccad
Make sure keys with modifiers get handled as special
2018-03-09 09:04:28 +01:00
Florian Bruhin
66b06ed84c
Add first tests for HintKeyParser
2018-03-09 07:38:16 +01:00
Florian Bruhin
482b622b1b
Fix handling of empty bindings without breaking :unbind
...
1899e313fd
as a fix for #3631 broke :unbind, as
the config system treats None and '' equally.
Instead, allow None/'' again, but just handle it as "no binding".
2018-03-08 11:42:27 +01:00
Florian Bruhin
d5c04318b2
Fix test/lint
2018-03-08 06:41:15 +01:00
Florian Bruhin
9b9d7647a4
Show the keystring correctly when entering a count
2018-03-07 22:47:31 +01:00
Florian Bruhin
514138aad2
Allow to bind numbers in keybindings
...
This mostly reverts 4ef5db1bc4
for #1966 , but
fixes #3684 by allowing numbers to be bound again. If the user wants to bind
numbers instead of using them for a count, why not let them.
2018-03-07 22:37:10 +01:00
Florian Bruhin
34815f5cf8
Make bindings.default only settable in autoconfig.yml
...
Fixes #3131
2018-03-07 18:30:44 +01:00
Florian Bruhin
8a60855b88
Fix lint
2018-03-06 21:44:37 +01:00
Florian Bruhin
0d94c17edc
Apply key_mappings to KeySequences correctly
...
Fixes #3678
2018-03-06 21:39:57 +01:00
Florian Bruhin
db7ccb0434
Update config tests for pattern changes
2018-03-06 13:26:22 +01:00
Florian Bruhin
06bccfeb78
Improve error message for QtWebEngine inspector
2018-03-06 12:57:38 +01:00
Florian Bruhin
69a58c9597
Remove Qt 5.8 support and tests
...
With QtWebKit it's probably okay to still use it (*cough* Hyperbola
GNU/Linux-libre^tm *cough*), and only blacklisting it with QtWebEngine would be
quite some effort.
Fixes #3608
2018-03-06 11:04:59 +01:00
Florian Bruhin
257753841b
Allow lightweight URL patterns without a scheme
...
See #3622
2018-03-06 10:33:55 +01:00
Florian Bruhin
7fc53ae78a
Make path optional in URL patterns
...
See #3622
2018-03-06 09:45:06 +01:00
Florian Bruhin
8c0bca90d3
Merge remote-tracking branch 'origin/pr/3456'
2018-03-06 09:32:39 +01:00
Florian Bruhin
0e2a39da2a
Fix tests for keyboard parsing change
2018-03-06 07:39:41 +01:00
Florian Bruhin
41dfa29648
Improve parsing of invalid keys
...
This should handle "<>" and "\x1f" correctly.
2018-03-06 06:29:38 +01:00
Florian Bruhin
7a9f8fda72
Get rid of unnecessary lambda
2018-03-05 23:07:03 +01:00
Florian Bruhin
2b84ea9dbe
Make sure we have plain keys/modifiers where needed
2018-03-05 23:01:24 +01:00
Florian Bruhin
0ee7fac727
Update test_init_unknown/test_init_invalid for KeyboardModifierMask
...
-1 & Qt.KeyboardModifierMask == Qt.Key_unknown
2018-03-05 22:56:58 +01:00
Florian Bruhin
8deb38e22d
Add test for :bind completion with invalid binding
2018-03-05 22:21:57 +01:00
Florian Bruhin
29fdd1acc4
Make sure all keyboard modifiers are handled correctly
...
This handles Qt.KeypadModifier (Num+...) correctly, adds tests for converting
modifiers to strings, and strips Qt.GroupSwitchModifier as QKeySequence doesn't
know about it.
Fixes #3675
2018-03-05 22:11:26 +01:00
Florian Bruhin
333a37ffb2
Fix old macOS-specific test code
2018-03-05 18:30:34 +01:00
Florian Bruhin
d1854eddaf
Handle invalid keys coming from Qt
...
When pressing a key which doesn't exist as Qt.Key, we don't get Qt.Key_unknown
like we'd expect, but we get 0x0 instead...
Let's add that as a new "nil" key (to not conflict with None/unknown/zero/...)
and handle it appropriately.
This can be reproduced by doing:
setxkbmap -layout us,gr -option grp:alt_shift_toggle
and pressing Alt-Shift/Shift-Alt.
2018-03-05 15:42:52 +01:00
Florian Bruhin
52c280ec12
Add unit tests for BaseKeyParser.handle with dry_run=True
2018-03-05 15:33:56 +01:00
Florian Bruhin
67b4502fdb
Fix test_version without cssutils
2018-03-05 11:36:50 +01:00
Florian Bruhin
2f8686ec70
Fix test_mhtml_e2e with Qt 5.11
...
See #3661
2018-03-05 11:36:29 +01:00
Florian Bruhin
cc5da4d1fe
Fix test_modeman.py
2018-03-05 11:08:21 +01:00
Florian Bruhin
b4a2352833
Cache HTML/JS resource files when starting
...
This mostly reverts 9edc5a665e
(see #1362 ).
Fixes #1943
2018-03-05 09:08:06 +01:00
Florian Bruhin
274f2a9d19
Rename eventFilter methods in modeman
2018-03-05 06:36:01 +01:00
Florian Bruhin
4ef5db1bc4
Disallow numbers in keybindings
...
Fixes #1966
2018-03-04 23:17:51 +01:00
Florian Bruhin
155a1901c0
Merge branch 'keys'
2018-03-04 22:50:41 +01:00