Florian Bruhin
5f5b395343
pylint: Ignore failing QtWebEngineWidgets import
2016-08-03 12:16:13 +02:00
Florian Bruhin
43c81cc3a4
Fix KeyError with unknown options
2016-08-03 11:58:42 +02:00
Florian Bruhin
11e7f7c334
Remove unused imports
2016-08-03 11:37:05 +02:00
Florian Bruhin
cae7eead6f
QtWebEngine: Basic settings support
2016-08-03 11:35:08 +02:00
Florian Bruhin
2ee95df9e7
Change the default hint implemenation to Python
...
This only affects drawing hints, JS is still used if possible to
actually click them.
It seems like for many people, the JS implementation was a lot slower
than the Python one...
2016-08-03 09:40:05 +02:00
Florian Bruhin
1fb4aa3532
Merge branch 'tab-open-implicit' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-open-implicit
2016-08-03 09:16:49 +02:00
Florian Bruhin
79d2116b18
Remove unneeded 'return'
2016-08-03 09:07:12 +02:00
Florian Bruhin
77dd2a105f
Add cmdutils.check_overflow in _set_current_index
2016-08-03 08:57:05 +02:00
Marshall Lochbaum
af9e956cb6
Remove config update code for --implicit flag
2016-08-02 15:29:18 -04:00
Marshall Lochbaum
299d4865d0
Move --implicit flag argument to the end of _open
2016-08-02 15:26:49 -04:00
Marshall Lochbaum
feed1ccda4
Change gO, xO, and ;O keybindings to open an implicit tab
2016-08-02 14:10:36 -04:00
Marshall Lochbaum
66adbc9323
Add --implicit flag to :open
2016-08-02 13:49:25 -04:00
Marshall Lochbaum
d30da4f905
Update tab_focus docstring
2016-08-02 11:50:21 -04:00
Marshall Lochbaum
8a127f2839
Remove cmdutils.arg_or_count
2016-08-02 11:31:03 -04:00
Florian Bruhin
a3047008dd
Bump up filename length limit to 50
...
The usual limit seems to be 255 bytes, so even when assuming 5-byte
UTF-8 chars for every letter, 50 should be fine.
http://serverfault.com/questions/9546/filename-length-limits-on-linux/9548#9548
2016-08-02 16:12:09 +02:00
Florian Bruhin
b8ef6fa44e
Merge branch 'open-download-fixes' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download-fixes
2016-08-02 16:11:34 +02:00
Florian Bruhin
43ff1b0d97
Tunnel private-browsing to QtWebKit correctly
2016-08-02 14:19:31 +02:00
Florian Bruhin
4a5b5c496f
Fix using a relative path with --basedir
2016-08-02 14:08:28 +02:00
Florian Bruhin
b17296db0d
Return with invalid index
2016-08-02 12:03:29 +02:00
Florian Bruhin
b8aeb9f80e
Fix lint
2016-08-02 12:03:29 +02:00
Ryan Roden-Corrent
a393adc6c7
Don't crash completion with auto-open/show False.
...
If both are false, the selectionModel may be None.
In this case, don't try to move the index.
Resolves #1722 .
2016-08-01 22:36:04 -04:00
Ryan Roden-Corrent
6e2d78b826
Don't crash on tab with no completions.
...
first_item and last_item return an invalid index when there are no
items in the completion, and the completionwidget will throw on an
invalid index. However, setting an invalid index on the selection view
is fine, so just remove the assertion.
Resolves #1731 .
2016-08-01 22:16:55 -04:00
Daniel Schadt
57ceaeeb55
open-download: don't crash on download cancel
...
Fixes #1728 .
2016-08-02 01:10:40 +02:00
Daniel Schadt
b187b680cb
open-download: force encoding for filename
...
Fixes #1726 .
2016-08-02 01:00:57 +02:00
Daniel Schadt
abcdaa9cce
open-download: make sure the name is not too long
...
Fixes #1725 .
Make sure that the temporary filename is not too long by restricting the
suggested part to 20 characters.
2016-08-02 00:57:22 +02:00
Daniel Schadt
9973cd5037
downloads: don't crash on OSError in open-download
...
Fixes the crash in #1725 , but does not provide a solution. The browser
won't crash, but the file won't be downloaded and opened either.
2016-08-02 00:46:59 +02:00
Florian Bruhin
ef439bb916
Fix ;o/;O default bindings
2016-08-01 18:19:34 +02:00
Florian Bruhin
49699be44e
Ignore TypeError on contents_size_changed cleanup
2016-08-01 17:40:41 +02:00
Florian Bruhin
81d0d64731
QtWebEngine: Fix crash when closing/reopening tabs
2016-08-01 17:25:55 +02:00
Florian Bruhin
5ec39b7540
Fix crash when opening http://foo%40bar@baz
2016-08-01 17:18:14 +02:00
Florian Bruhin
68b273de87
Merge branch 'generalize-list-type' of https://github.com/mlochbaum/qutebrowser into mlochbaum-generalize-list-type
2016-08-01 16:22:13 +02:00
Florian Bruhin
4414f5fea9
Merge branch 'tab-move-index' of https://github.com/mlochbaum/qutebrowser into mlochbaum-tab-move-index
2016-08-01 16:17:09 +02:00
Florian Bruhin
62f9161d03
Merge branch 'completer_tests' of https://github.com/rcorre/qutebrowser into rcorre-completer_tests
2016-08-01 16:02:53 +02:00
Florian Bruhin
86669600ff
Consider input elements without type for hinting
2016-08-01 15:49:50 +02:00
Marshall Lochbaum
5accef963d
Move _show_inner_type class variables before __init
2016-08-01 09:31:59 -04:00
Marshall Lochbaum
aa40ff6dd4
Remove none_ok from startpage config type
2016-08-01 09:30:26 -04:00
Florian Bruhin
c421f44f4e
Specify completion category font in HTML
...
It seems like specifying a font for QTreeView::item in a Qt stylesheet
doesn't actually do anything.
2016-08-01 14:56:51 +02:00
Florian Bruhin
1bba1e3ea9
Remove whitespace
2016-08-01 14:35:57 +02:00
Florian Bruhin
3d1f28ac9c
Merge branch 'master' of https://github.com/nanjekyejoannah/qutebrowser into nanjekyejoannah-master
2016-08-01 14:35:06 +02:00
nanjekyejoannah
3d4e76b1a4
commit resolving issue#1395
2016-08-01 15:20:44 +03:00
nanjekyejoannah
4d3cbe659d
refactor for configdatap.py resolving #1395
2016-08-01 14:30:20 +03:00
nanjekyejoannah
633c95bca6
resolving style things in commit resolving issue #1395
2016-08-01 14:14:15 +03:00
nanjekyejoannah
1e94685653
Refactoring to resolve issue #1395
2016-08-01 14:00:30 +03:00
Florian Bruhin
2baadaf565
Remove now useless pylint suppressions
2016-08-01 12:47:19 +02:00
Florian Bruhin
13269ef388
Wrap long lines
2016-08-01 12:46:47 +02:00
Florian Bruhin
a772e8a2c3
Mark :set-mark/:jump-mark as hidden
...
Fixes #1708 .
2016-08-01 12:21:18 +02:00
nanjekyejoannah
212d5fe932
commit resolving issue #1395
2016-08-01 11:28:27 +03: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
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
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
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
af704439d9
Remove trailing newline
2016-07-29 09:05:25 +02: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
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
Florian Bruhin
b48b7eddc8
Add no-cover pragma for _rect_on_view_js
2016-07-28 17:33:04 +02:00
Florian Bruhin
56515321dd
Handle failing javascript in webelem.rect_on_view
...
Fixes #1641 .
2016-07-28 17:10:31 +02:00
Florian Bruhin
5463e133ee
Split webelem.rect_for_view into two methods
2016-07-28 17:09:07 +02:00
Florian Bruhin
d6b6afdf11
Fix WebElementWrapper.__eq__
2016-07-28 15:57:25 +02:00
Florian Bruhin
1213b91b66
Fix ALL the contentsSizeChanged connections!
2016-07-28 15:29:56 +02:00
Florian Bruhin
9cbf9eaa76
Disconnect contents_size_changed during cleanup
2016-07-28 14:59:23 +02:00
Florian Bruhin
21c1dec59a
Actually handle contents_size_changed correctly
2016-07-28 14:56:42 +02:00
Florian Bruhin
d357ccf403
Add some more WebElementWrapper tests
2016-07-28 14:25:53 +02:00
Florian Bruhin
b0a0984fe7
Add missing check_vanished in remove_blank_target
2016-07-28 13:13:21 +02:00
Florian Bruhin
41e6a2392a
QtWebEngine: Add stub for find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
631109e5eb
Fix raising of WebTabError
2016-07-28 12:36:09 +02:00
Florian Bruhin
d87840e254
Fix lint
2016-07-28 12:36:09 +02:00
Florian Bruhin
540c62c232
Add only_visible to find_all_elements
2016-07-28 12:36:09 +02:00
Florian Bruhin
5b943a431e
Fix WebElementWrapper.text
2016-07-28 12:36:09 +02:00
Florian Bruhin
49f57a5d7e
Fix userscripts
2016-07-28 12:36:09 +02:00
Florian Bruhin
5eca6e11a5
Fix editor/paste-primary
2016-07-28 12:36:09 +02:00
Florian Bruhin
e051de4843
Fix word hinting
2016-07-28 12:36:09 +02:00
Florian Bruhin
ffdaf8d470
Move webelem.is_visible/.rect_on_view to methods
2016-07-28 12:36:09 +02:00
Florian Bruhin
4318604c57
Don't use javascript in webelem.set_text for hints
2016-07-28 12:36:09 +02:00
Florian Bruhin
193c755637
Refactor WebElement API, part 2
...
Now we don't get a crash, but not any hints either...
2016-07-28 12:35:59 +02:00
Florian Bruhin
c5a91004f5
Add contents_size_changed to tab API
2016-07-28 12:35:56 +02:00
Florian Bruhin
c764733472
Refactor QWebElement API, part 1
2016-07-28 12:35:49 +02:00
Florian Bruhin
016c13a998
Use repr() for rfc2622 logging
2016-07-28 07:28:21 +02:00
Florian Bruhin
caab826e8a
Use repr() for IPC logging messages
2016-07-28 07:14:54 +02:00
Marshall Lochbaum
2c37de3ac1
Revert startpage config type to String instead of Url
2016-07-27 14:21:25 -04:00
Florian Bruhin
73cd0e01ef
Fix deleting of quickmarks with ctrl-d
2016-07-27 19:44:34 +02:00
Marshall Lochbaum
642abac634
Remove BaseList type
2016-07-27 13:06:15 -04:00
Marshall Lochbaum
b205ad500b
Add tests for configtypes.Url
2016-07-27 12:44:10 -04:00
Marshall Lochbaum
b4fec256dc
Merge LengthList into List
2016-07-27 12:39:03 -04:00
Florian Bruhin
04aa98d7fb
Release v0.8.1
2016-07-27 12:41:40 +02:00
Florian Bruhin
0eb74dcc1b
Hide harfbuzz warning if frozen
2016-07-27 12:15:10 +02:00
Florian Bruhin
7b82d81784
Improve error message on OS X without QtWebEngine
2016-07-27 12:13:22 +02:00
Florian Bruhin
9ff006746f
Handle empty command in CommandRunner.parse_all
...
Sicne we now call self._get_alias there, we also need to make sure it's
not an empty string before that.
Introduced in #1577 . Fixes #1690 .
2016-07-27 11:19:01 +02:00
Florian Bruhin
be609d5779
Improve logging for BaseKeyParser
...
See #1653
2016-07-27 10:27:53 +02:00
Florian Bruhin
ccbd47a0cd
Merge branch 'savefile_open-flush' of https://github.com/flv0/qutebrowser into flv0-savefile_open-flush
2016-07-27 10:11:33 +02:00
Marshall Lochbaum
a3c7ed51d4
Create LengthList to remove WebKitBytesList and refactor Padding
2016-07-26 23:59:55 -04:00
Marshall Lochbaum
083baf1222
Remove unnecessary List subclasses
2016-07-26 23:05:42 -04:00
Marshall Lochbaum
9e86933913
Replace List with BaseList and rename GenList to List
2016-07-26 23:02:10 -04:00
Marshall Lochbaum
d77145a5b8
Add GenList type and refactor *List types to use GenList
2016-07-26 21:34:50 -04:00
Florian Bruhin
cd905841e0
Don't log on_focus_changed warning if new is None
2016-07-26 23:27:20 +02:00
Florian Bruhin
2121865bdd
Show jsret value in update_scroll_pos callback
2016-07-26 23:26:20 +02:00
Marshall Lochbaum
b2c2d5a4f4
Add --delete option to bookmark-load
2016-07-26 13:49:17 -04:00
Marshall Lochbaum
d9247c15a4
Coding style fixes
2016-07-26 09:48:35 -04:00
Marshall Lochbaum
28842c90b6
Add --toggle flag to bookmark-add ( fixes #1667 )
2016-07-26 09:07:21 -04:00
Florian Bruhin
b12c984846
Release v0.8.0
2016-07-26 13:30:41 +02:00
Florian Bruhin
07e0ae5584
Un-hide --backend argument
2016-07-26 13:30:41 +02:00
Florian Bruhin
3ccb691e9f
tab API: Rename scroll to scroller
...
The scroll attribute did overwrite QWidget.scroll which is unfortunate.
2016-07-26 13:19:07 +02:00
Florian Bruhin
878fa26247
Use real slots for QtWebKit signals
...
Otherwise we can get this when immediately quitting:
Traceback (most recent call last):
File ".../qutebrowser/browser/webkit/webkittab.py", line 580, in <lambda>
not self._widget.page().error_occurred))
RuntimeError: wrapped C/C++ object of type WebView has been deleted
2016-07-26 12:55:40 +02:00
Florian Bruhin
49977a32c4
Remove unused imports
2016-07-26 11:09:24 +02:00
Florian Bruhin
70d6f90f08
Display key hint for :prompt-download-open
...
This also splits up _display_question into one method per mode.
2016-07-26 11:08:03 +02:00
Florian Bruhin
d70f3a0417
Merge branch 'Kingdread-open-download'
2016-07-26 10:54:59 +02:00
Florian Bruhin
36b0054238
Add keyconf.get_reverse_bindings_for
2016-07-26 10:50:50 +02:00
Florian Bruhin
f4f6a3dac1
Merge branch 'open-download' of https://github.com/Kingdread/qutebrowser into Kingdread-open-download
2016-07-26 10:32:34 +02:00
Florian Bruhin
da64db853e
Update docs
2016-07-26 08:36:16 +02:00
Florian Bruhin
dab17b801e
Merge branch 'mark-del-no-args' of https://github.com/mlochbaum/qutebrowser into mlochbaum-mark-del-no-args
2016-07-26 08:33:17 +02:00
Florian Bruhin
1564563662
Don't enable warnings if log was never inited
...
Otherwise, anything importing qtutils (which uses ignore_py_warnings
on module level) would enable warnings. This means pylint showed its own
warnings because of qute_pylint.config.
2016-07-25 13:03:58 +02:00
Florian Bruhin
c3f53312af
Fix 'is not' string comparison
2016-07-23 19:51:13 +02:00
Florian Bruhin
e887d9a381
Remove useless super-calls
2016-07-23 18:39:27 +02:00
Marshall Lochbaum
3ffb726b98
Merge branch 'master' into mark-del-no-args
2016-07-23 12:12:19 -04:00
Marshall Lochbaum
1781d0fba3
Use DoesNotExistError rather than CommandError in get_by_qurl
2016-07-23 12:05:21 -04:00
Marshall Lochbaum
9758b52d91
Assume _current_url is valid (remove try/except)
2016-07-23 12:05:21 -04:00
Marshall Lochbaum
02731743c0
Use qtutils.ensure_valid instead of testing isValid in get_by_qurl
2016-07-23 12:05:11 -04:00
Marshall Lochbaum
cba25d2bbb
Remove quickmark_del and bookmark_del from the urlmark classes (use delete instead)
2016-07-23 10:55:57 -04:00
Florian Bruhin
91b754d6ea
Merge branch 'issue_1033_bookmark_display' of https://github.com/winged/qutebrowser into winged-issue_1033_bookmark_display
2016-07-23 15:42:33 +02:00
David Vogt
1f320b8686
Various fixes after code review.
...
* Move documentation changes of bookmark / quickmarks to docstrings, as the
asciidoc is autogenerated from those
* Fix some whitespaces in the BDD test cases
* Improved docstring in qute_bookmarks handler
2016-07-23 14:50:28 +02:00
Florian Bruhin
02a06732ff
Also ignore ImportWarning for pkg_resources import
2016-07-23 14:15:39 +02:00
David Vogt
11bf5c8809
Minor cleanups. Whitespace / indentation CSS.
...
There were some CSS classes that were not used in the bookmarks page.
Also, fixes a small indentation / code alignment issue
2016-07-23 13:06:56 +02:00
Florian Bruhin
40a3e24b05
Ignore warning when importing pkg_resources
...
On Debian Jessie we get a PendingDeprecationWarning which we now see
since the log is init'ed earlier.
2016-07-23 13:04:53 +02:00
Florian Bruhin
64f208486e
Add log.ignore_py_warnings()
2016-07-23 13:04:45 +02:00
Florian Bruhin
36bb5cf285
Merge branch 'issue_1670_tests_fail_due_to_SSL_error' of https://github.com/ganwell/qutebrowser into ganwell-issue_1670_tests_fail_due_to_SSL_error
2016-07-23 12:46:16 +02:00
David Vogt
8bbfcc01be
Sort bookmarks / quickmarks by title or name respectively.
2016-07-23 12:32:05 +02:00
David Vogt
85be6565fc
Implement feature request #1033 : Bookmark display
...
There is a new page now, qute:bookmarks that will display all bookmarks and
quickmarks. It's still missing a search / filter feature, but you can use
the built-in search / navigation just as easily for now.
2016-07-23 12:09:49 +02:00
Jean-Louis Fuchs
f040fd5a6d
Ignore missing SSLv3 messages from Qt
2016-07-23 10:01:56 +00:00
Jean-Louis Fuchs
ef01566621
Initialize qt logging to qutebrowser as early as possible
2016-07-23 09:54:13 +00:00
Florian Bruhin
76eab7617b
Remove @pyqtSlot for functions and non-QObjects
...
Fixes #1669
2016-07-23 11:42:50 +02:00
Marshall Lochbaum
19949101c6
Make quickmark_del with no argument delete the current page's mark ( fixes #1661 )
2016-07-21 22:32:04 -04:00
Marshall Lochbaum
83005bc072
Make bookmark_del with no argument delete the current page's mark
2016-07-21 21:14:54 -04:00
Florian Bruhin
63e466f019
Remove @pyqtSlot for some non-QObject classes
...
Not sure if I got all, but at least I got the ones which fail
immediately on start.
See #1669 .
2016-07-21 14:56:12 +02:00
Jakub Klinkovský
202883fc03
fix #1657
...
The _filterstr attribute was not cleaned up properly and persisted
between hintings. In this case, it was set to something representing the
Escape key.
2016-07-17 17:36:35 +02:00
Florian Bruhin
d867a789c2
Re-enable crash reports for QtWebEngine
2016-07-17 14:27:01 +02:00
Florian Bruhin
d710a98f46
Fix lint
2016-07-15 15:52:48 +02:00
Florian Bruhin
e2c4e6301f
QtWebEngine: Implement scroll.at_top()
2016-07-15 14:00:41 +02:00
Florian Bruhin
695864281b
QtWebEngine: Implement pixel scroll position in JS
2016-07-15 13:04:44 +02:00
Florian Bruhin
7adc8ab2d6
QtWebEngine: Implement scroll position based on JS
2016-07-15 12:52:27 +02:00
Florian Bruhin
d079caafa8
Add possibility to disable spellcheck
2016-07-15 00:07:37 +02:00
Florian Bruhin
a8dc940b73
test/vulture reqs: Update vulture to 0.10
...
* Detect unused function and method arguments.
* Detect unused *args and **kwargs parameters.
* Change license from GPL to MIT.
2016-07-14 23:17:39 +02:00
Florian Bruhin
675e6eca23
Add old tab.seperator spellings to DELETED_OPTIONS
...
This was never caught due to the bug in the last commit, but now makes
reading very old configs fail.
2016-07-14 16:59:33 +02:00
Florian Bruhin
7b9d38e438
Fix config values being lost with DELETED_OPTIONS
...
When an option was deleted, we accidentally stopped reading instead of
ignoring that one option and then resuming.
2016-07-14 16:58:54 +02:00
Daniel Schadt
b995b9d5da
downloads: fix docstrings for new return value
2016-07-13 22:25:23 +02:00
Florian Bruhin
ff89ae7839
Merge branch 'master' of https://github.com/blyxxyz/qutebrowser into blyxxyz-master
2016-07-13 21:21:37 +02:00
Florian Bruhin
c9176b7c58
QtWebEngine: Fix 'unset' with run_js_blocking
2016-07-13 18:17:37 +02:00
Florian Bruhin
a7509d5978
Fix lint
2016-07-13 16:01:12 +02:00
Jan Verbeek
13cbdbb8bd
Record mode for :repeat-command before executing
2016-07-13 15:24:45 +02:00
Florian Bruhin
5b1cca92ab
Add run_js_blocking to tab API
2016-07-13 13:47:30 +02:00
Florian Bruhin
c83a8a64dc
QtWebEngine: Implement scroll.delta_page
2016-07-13 11:26:53 +02:00
Florian Bruhin
602d10c495
QtWebEngine: Implement scroll.to_point/.delta
2016-07-13 11:21:50 +02:00
Florian Bruhin
b78b89f04f
QtWebEngine: Implement :scroll-perc via JS
2016-07-13 10:55:04 +02:00
Florian Bruhin
9c49900f9e
QtWebEngine: Add JS logging
2016-07-13 10:55:04 +02:00
Daniel Schadt
7597221776
fix lint
2016-07-12 22:39:21 +02:00
Daniel Schadt
940b124253
switch set literal to list literal
...
See PR #1642 .
😗 🎶
2016-07-12 22:31:43 +02:00
Jan Verbeek
0cd39ae4ff
Change sets to lists
2016-07-12 22:21:05 +02:00
Jan Verbeek
bbc46d28ff
Use lists instead of tuples for comparing
...
Per one of the diff comments on #1597 :
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
2016-07-12 22:05:32 +02:00
Florian Bruhin
40455b2692
Always set FindWrapsAroundDocument in WebKitSearch
...
We accidentally set it to never wrap with the wrap-search option
removal, but we want to *always* wrap.
2016-07-12 17:28:59 +02:00
Florian Bruhin
54c00deb5b
Remove checking of 'wrap' in WebEngineSearch
...
wrap functionality was removed, so no point in doing this here.
2016-07-12 17:28:28 +02:00
Daniel Schadt
a088f238e5
usertypes: remove Frankenstein's enum
...
This approach is not as weird in Python and still works.
DownloadTarget.OpenDownload has been renamed to OpenFileDownloadTarget,
since OpenDownloadDownloadTarget didn't look as nice.
2016-07-12 17:10:36 +02:00
Daniel Schadt
ed5fb4de4a
downloads: make get_tmpdir private
2016-07-12 17:06:40 +02:00
Daniel Schadt
17175ec3d4
mhtml: remove duplicated usertypes import
2016-07-12 17:06:40 +02:00
Daniel Schadt
d42d980dda
downloads: introduce target= param for .get/.fetch
...
This parameter replaces the filename and fileobj parameters. This makes
it easier to add more download targets, since only one may be "chosen".
With the OPEN_DOWNLOAD special case added, handling of filename got a
bit ugly, since it may be either None, OPEN_DOWNLOAD or a str with the
file path, and we had to make sure only one target was chosen.
With the new target enum, this handling can be simplified and we
automatically get the guarantee that only one target is chosen.
2016-07-12 17:06:40 +02:00
Daniel Schadt
16e1f8eac9
downloads: fix docstring for .get()
...
An earlier commit removed the prompt_download_directory parameter, it is
now passed via **kwargs and should thus be removed from the docstring.
2016-07-12 16:52:01 +02:00
Daniel Schadt
203dad0004
fix lint
2016-07-12 16:52:01 +02:00
Daniel Schadt
8795f89c88
tests: fix tests for downloads bdd test
...
The test was failing because of two reasons:
First, the old code had filename questions in DownloadManager.get and
DownloadManager.fetch which were almost identical, thus the part in
DownloadManager.get was removed in an earlier commit. All filename
asking is now done by DownloadManager.fetch. The good part is code
deduplication, the bad part is slightly modified behavior: The new code
doesn't wait for a filename to start the download, instead it tries to
fill the buffer immediately. This made the test fail because qute:// has
no registered handler, so in order for the test to pass now, the "no
crash" part is not enough, we also need to expect the "No handler"
error.
Secondly, and a rather rare (race) condition was the handling of errors
in the DownloadItem. If an error occured after the registration of
self.on_reply_error as error handler and before the check
reply.error() != QNetworkReply.NoError
at the end of the function, the error signal would be emitted twice:
Once by _die() (called by on_reply_error), and once by the init_reply
function directly (in the last if block). This lead to duplicated error
messages. This is also explained in a comment in the file (with small
"stack traces").
2016-07-12 16:52:01 +02:00
Daniel Schadt
b130c2a284
keybindings: add default for prompt-open-download
2016-07-12 16:52:01 +02:00
Daniel Schadt
81b2688c70
downloads: use global TempDownloadManager
...
This way, all temporary downloads will end up in the same directory and
everything is cleaned up at program exit, not when the corresponding
window is closed.
2016-07-12 16:52:01 +02:00
Daniel Schadt
c060f9e5c2
allow downloads to be openened directly
...
The file is saved in a temporary directory, which is cleaned up when the
window is closed.
2016-07-12 16:52:01 +02:00
Jan Verbeek
cafe7181c7
Blacklist command-accept, hide repeat-command
...
prompt-accept was blacklisted instead of command-accept.
2016-07-12 16:48:33 +02:00
Florian Bruhin
64b32ec87d
Remove general -> wrap-search
2016-07-12 16:47:57 +02:00
Florian Bruhin
f0da508c21
Move searching out of WebView subclass
...
This also makes it work for QtWebEngine.
It also seems to fix #1050 though I'm not 100% sure why.
2016-07-12 16:29:50 +02:00
Florian Bruhin
cd4eff364a
Add printing to tab API
...
This fixes printing for QtWebKit, and hopefully will make printing to
PDF work with QtWebEngine with Qt >= 5.7
2016-07-12 12:54:11 +02:00
Jan Verbeek
ee4b24a5dc
Blacklist leave-mode, use "not in"
2016-07-12 11:03:36 +02:00
Florian Bruhin
7a39021d41
Merge branch 'issues/1630' of https://github.com/jdkaplan/qutebrowser into jdkaplan-issues/1630
2016-07-12 10:07:59 +02:00
Jeremy Kaplan
6b2b096f3c
Add test for :print --pdf
2016-07-11 20:08:24 -04:00
Jeremy Kaplan
62ae793a24
Generate docs
2016-07-11 20:07:54 -04:00
Jan Verbeek
508c0f21fa
Blacklist prompt-accept, remove mode_allowed
2016-07-12 00:23:34 +02:00
Florian Bruhin
d315a3131d
Require QtWebEngine with --backend webengine
2016-07-11 22:51:05 +02:00
Florian Bruhin
4f9be56d7d
Merge branch 'add-bookmark-by-url' of https://github.com/ismail-s/qutebrowser into ismail-s-add-bookmark-by-url
2016-07-11 20:54:09 +02:00
Florian Bruhin
3d4cf1fc92
QtWebEngine: Fix icon access on Qt < 5.7
2016-07-11 18:24:38 +02:00
Florian Bruhin
ed5af29ac9
Fix lint
2016-07-11 16:43:06 +02:00
Florian Bruhin
f2c52f96a1
Fix _on_url_changed
2016-07-11 16:33:19 +02:00
Florian Bruhin
8b67d68d4a
Move qtutils.ensure_valid in WebView.openurl
2016-07-11 16:32:24 +02:00
Florian Bruhin
e80475ed57
Remove support for showing JS statusbar messages
...
Closes #1579 .
2016-07-11 16:19:44 +02:00
Florian Bruhin
d0aea24568
Remove WebView.linkHovered signal
2016-07-11 16:09:17 +02:00
Florian Bruhin
914f9db8ca
Actually connect _on_url_changed slot
2016-07-11 16:05:09 +02:00
Florian Bruhin
f46d6cbe27
Fix url_text, take 3
2016-07-11 15:06:36 +02:00
Florian Bruhin
9b75e661e2
Fix missed url_text substitutions
2016-07-11 14:59:35 +02:00
Florian Bruhin
5d6eedcd49
Move URL/title handling to AbstractTab
2016-07-11 14:36:57 +02:00
Florian Bruhin
a470bfc3f3
Get rid of url_text_changed signal
...
Instead we simply use url_changed which (similar to Qt's urlChanged)
simply has a QUrl argument.
2016-07-11 14:28:51 +02:00
Florian Bruhin
5cbd540e15
Get rid of WebView.cur_url attribute
...
The only thing which differs from url() is that it got set immediately
after openurl() was called, which might or might not have improved
something.
Let's see if things still work the same without it.
2016-07-11 14:20:46 +02:00
Florian Bruhin
7e36884cbd
Add some debug logging to early QWEW import
...
See #1640
2016-07-11 13:49:24 +02:00
Florian Bruhin
6a07d231f4
pykint: Add some disable=unused-variable
2016-07-11 13:18:31 +02:00
Florian Bruhin
a64937122d
Drop unneeded .keys()
2016-07-11 13:13:16 +02:00
Florian Bruhin
1d237b0569
pylint: ignore wrong-import-position project-wide
...
While it's more accurate with isort now, we get a wrong-import-position
for everything in scripts/ where we have to do the sys.path magic first.
2016-07-11 13:00:37 +02:00
Florian Bruhin
c558a8b4ad
Add missing docstring
2016-07-11 12:42:51 +02:00
Florian Bruhin
e9d606a782
Move load_status / SSL errors to AbstractTab
2016-07-11 12:09:41 +02:00
Florian Bruhin
6ae232d8fc
Move 'progress' to AbstractTab
...
This makes load progress work with QtWebEngine.
2016-07-11 11:31:59 +02:00
Florian Bruhin
8567fffdad
Merge branch 'qtwebengine'
2016-07-11 10:56:20 +02:00
Florian Bruhin
b4f993e2ab
Add an early-import for QtWebEngineWidgets
2016-07-11 09:18:05 +02:00
Jeremy Kaplan
a6a030e92f
Add :print --pdf flag to skip printing dialog
2016-07-10 21:58:54 -04:00
Florian Bruhin
01b7b27bda
Fix lines which are now too long
2016-07-10 17:33:36 +02:00
Florian Bruhin
b791095324
Rename browser.tab module and classes
2016-07-10 17:27:02 +02:00
Florian Bruhin
d2ece6b542
Move Backend enum to usertypes
...
Otherwise we have a cyclic import
2016-07-10 17:04:26 +02:00
Florian Bruhin
34e39bed4e
Add a test for cmd instance with wrong backend
2016-07-10 17:04:25 +02:00
Florian Bruhin
b07cca023b
Fix Command.run with no arguments
2016-07-10 17:04:25 +02:00
Florian Bruhin
0ab601aaf3
Make it possible to limit commands to backends
2016-07-10 16:57:02 +02:00
Florian Bruhin
11cd5f8653
Don't register webview in objreg
...
All places now should use the tab API instead.
2016-07-08 17:21:33 +02:00
Florian Bruhin
67eea1678e
Move tab registry from webview to tab
2016-07-08 17:13:18 +02:00
Florian Bruhin
dcf39538a3
Improve objreg error message if no window is given
2016-07-08 17:09:20 +02:00
Ismail S
fd7342b055
Move """ to separate line
2016-07-08 15:58:47 +01:00
Ismail S
5ad66c29e1
Update docstring
2016-07-08 15:38:58 +01:00
Ismail S
babbd0771c
Refactor code
2016-07-08 15:33:13 +01:00
Florian Bruhin
7360ea69ba
Fix lint
2016-07-08 13:08:31 +02:00
Florian Bruhin
06a6daee34
Add stubs for QtWebEngine
2016-07-08 12:53:48 +02:00
Florian Bruhin
cc11af5e28
Fix lint
2016-07-08 11:21:00 +02:00
Florian Bruhin
b1fda1b0ef
Get rid of tab.run_webaction
...
As mentioned here:
e4b0b7fffd (r70002693)
It makes no sense to add a backend-specific run_webaction method to
AbstractTab - better to just access _widget directly in this one place
instead of adding something backend-speficic to the API.
2016-07-08 10:42:54 +02:00
Florian Bruhin
55784f9783
Add tab.create() helper function
2016-07-08 10:38:52 +02:00
Florian Bruhin
334f6cda4f
tab: Rename modeman to mode_manager
...
To avoid it being mixed up with the modeman module
2016-07-08 10:38:51 +02:00
Florian Bruhin
f9eecaf584
Fix typo
2016-07-08 10:09:49 +02:00
Florian Bruhin
09f4c2199e
Rename widget to tab in some places
...
This also fixes the cur_url access.
2016-07-08 10:08:44 +02:00
Florian Bruhin
b8086d1d13
mhtml: web_view -> tab rename
...
Otherwise this sounds like we still have a QWebView.
This also fixes the cur_url access.
2016-07-08 10:08:11 +02:00
Florian Bruhin
2befebaf3a
Don't use properties for AbstractTab
...
Otherwise exceptions in there could be hidden by Python/PyQt.
Some places are not changed yet, as there are also other renames in the
next commits.
2016-07-08 10:05:46 +02:00
Florian Bruhin
ecd399181d
Fix AbstractSearch attribute docs
2016-07-08 09:15:28 +02:00
Jan Verbeek
a8c55ffe08
Stop downloads bar from pushing away status bar
2016-07-07 23:11:08 +02:00
Ismail S
3b0fb84c47
Allow adding bookmarks by url
2016-07-07 20:16:19 +01:00
Florian Bruhin
e4b0b7fffd
Fix lint
2016-07-07 20:12:17 +02:00
Florian Bruhin
dde8ac6844
Use __slots__ for tab.TabData
2016-07-07 19:36:27 +02:00
Florian Bruhin
b999090a51
Hide --backend argument for now
2016-07-07 19:28:00 +02:00
Florian Bruhin
0207f8758b
Only disable reports with --backend webengine
2016-07-07 18:32:52 +02:00
Florian Bruhin
2fd01e57e6
Add default value for --backend argument
2016-07-07 18:32:52 +02:00
Florian Bruhin
ee7b4256a9
Fix AbstractTab repr() with no URL available
2016-07-07 18:32:52 +02:00
Florian Bruhin
d9516b9c1d
Adjust various comments
2016-07-07 18:32:52 +02:00
Florian Bruhin
3c99436950
Make on_* methods in tab private
2016-07-07 18:32:52 +02:00
Florian Bruhin
868f781f4d
Rename zoom._set_default_zoom to zoom.set_default
2016-07-07 18:32:52 +02:00
Florian Bruhin
1c9d0857cb
Various cleanups
2016-07-07 18:32:52 +02:00
Florian Bruhin
40f0aa0023
Fix pylint without QtWebEngine available
2016-07-07 18:32:52 +02:00
Florian Bruhin
7e3e9618b2
Revert "Adjust QtWebKit _key_press to QtWebEngine one"
...
This reverts commit f52326c5eea83e58d95afb696480600c6a8a5b7b.
For some reason this causes a lot of segfaults...
2016-07-07 18:32:52 +02:00
Florian Bruhin
e1bad17f2a
Split up SessionManager._save_tab_item
2016-07-07 18:32:52 +02:00
Florian Bruhin
b23ddb31c9
Fix lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
be02bfb37d
Unify arguments for on_mode_* slots in Caret
2016-07-07 18:32:52 +02:00
Florian Bruhin
df2c50aa60
Add class docstrings for webkittab/webenginetab
2016-07-07 18:32:52 +02:00
Florian Bruhin
de60ad04dc
Fix mouse wheel zooming
2016-07-07 18:32:52 +02:00
Florian Bruhin
f72f82fb0c
QtWebEngine: Fix userData() call on session saving
2016-07-07 18:32:52 +02:00
Florian Bruhin
b78de501c2
Adjust QtWebKit _key_press to QtWebEngine one
2016-07-07 18:32:52 +02:00
Florian Bruhin
47ce6aff89
Send QtWebEngine fake key events to focus proxy
...
This fixes simple scrolling with QtWebEngine.
2016-07-07 18:32:52 +02:00
Florian Bruhin
ec053f8007
Simplify TabData implementation
...
This uses direct attributes instead of self._data which means we can
only override __setattr__, and pylint will better understand what's
happening.
2016-07-07 18:32:52 +02:00
Florian Bruhin
40d28b80bf
Fix typo
2016-07-07 18:32:52 +02:00
Florian Bruhin
2bd07937e5
Remove unnecessary TabData.__getattr__ code
...
__getattribute__ is used in that case; see
https://github.com/PyCQA/pylint/issues/979
2016-07-07 18:32:52 +02:00
Florian Bruhin
09f025628f
Use tab.AbstractTab for signals/slots
2016-07-07 18:32:52 +02:00
Florian Bruhin
7444f83dbf
Fix importing of QtWebEngine specific code
2016-07-07 18:32:52 +02:00
Florian Bruhin
17466b4f26
Fix some lint
2016-07-07 18:32:52 +02:00
Florian Bruhin
7b37d85150
Pass modeman as argument to AbstractTab
2016-07-07 18:32:52 +02:00
Florian Bruhin
e0cd878606
Fix/tunnel mhtml downloads
2016-07-07 18:32:52 +02:00
Florian Bruhin
0719101b6f
Also tunnel :paste-primary
2016-07-07 18:32:52 +02:00
Florian Bruhin
21b282ce29
Get rid of _DummyUserscriptRunner
...
This simplifies the code a bit and only provides
userscript.run_async (and not the UserscriptRunner class) as entrypoint.
2016-07-07 18:32:52 +02:00
Florian Bruhin
a6307497c0
Rewrite userscripts to work with async dumping
2016-07-07 18:32:52 +02:00
Florian Bruhin
edafa7c99f
Tunnel a few features until we have a proper API
2016-07-07 18:32:52 +02:00
Florian Bruhin
3c71337698
Handle OverflowError when scrolling
2016-07-07 18:32:52 +02:00
Florian Bruhin
0937a64f1c
Fix :inspect
2016-07-07 18:32:52 +02:00
Florian Bruhin
675f95a2e4
Add stubs for on_mode_{entered,left} for WebEngine
...
This means at least we won't get a crash when using the commandline.
2016-07-07 18:32:52 +02:00
Florian Bruhin
12fc0821c0
Try to implement some QtWebEngine scrolling
2016-07-07 18:32:52 +02:00
Florian Bruhin
9c5143786c
Implement scroll.pos_perc for QtWebEngine
2016-07-07 18:32:52 +02:00
Florian Bruhin
a1f4dcd542
Add QWebEngineView subclass
2016-07-07 18:32:52 +02:00
Florian Bruhin
822e193682
Fix :view-source
2016-07-07 18:32:52 +02:00
Florian Bruhin
04ee021bdb
Add AbstractTab.set_html
2016-07-07 18:32:52 +02:00
Florian Bruhin
78f425c98b
Add AbstractTab.data
2016-07-07 18:32:52 +02:00
Florian Bruhin
70b7314b76
Fix :debug-webaction
2016-07-07 18:32:52 +02:00
Florian Bruhin
deb0a10973
Add AbstractTab.backend attribute
2016-07-07 18:32:52 +02:00
Florian Bruhin
4de48620e3
Fix loading of sessions
2016-07-07 18:32:52 +02:00
Florian Bruhin
a62e2a0c27
Fix :undo
2016-07-07 18:32:52 +02:00
Florian Bruhin
09c3528585
Fix loading of marks
...
This probably broke when merging from master.
2016-07-07 18:32:52 +02:00
Florian Bruhin
5dfd8d68bf
Set focus proxy for AbstractTab
...
By default, the AbstractTab object got the focus, which means things
like key events passed to it didn't actually get passed through to the
web view, causing these tests to fail:
tests/end2end/features/test_keyinput_bdd.py::test_forwarding_all_keys
tests/end2end/features/test_keyinput_bdd.py::test_forwarding_special_keys
Now we make sure the real underlying WebView always gets the keyboard
focus.
2016-07-07 18:32:52 +02:00
Florian Bruhin
3c3043eeae
Add tab.clear_ssl_errors()
...
This fixes :debug-clear-ssl-errors
2016-07-07 18:32:52 +02:00
Florian Bruhin
86f63e1ae6
Add tab.new_tab_requested signal
2016-07-07 18:32:52 +02:00
Florian Bruhin
4d650c8dfd
Add tab.caret.follow_selected()
2016-07-07 18:32:52 +02:00
Florian Bruhin
1148184892
Add tab.set_open_target
...
This fixes :follow-selected
2016-07-07 18:32:52 +02:00
Florian Bruhin
5dd4b2d56a
Fix :buffer completion
2016-07-07 18:32:52 +02:00
Florian Bruhin
52efa9f185
Make AbstractHistory.history private
2016-07-07 18:32:52 +02:00
Florian Bruhin
b0ba2125a3
Fix :undo
2016-07-07 18:32:52 +02:00
Florian Bruhin
aebc29337a
Move __iter__ to AbstractHistory
2016-07-07 18:32:52 +02:00
Florian Bruhin
59c9ee88e5
Quick fix for createWindow
2016-07-07 18:32:52 +02:00
Florian Bruhin
94b856c565
Make self._widget private in wrappers
...
While we need to set it from the outside (from AbstractTab) this still
is not considered public API for the rest of the code, so let's make it
private.
2016-07-07 18:32:52 +02:00
Florian Bruhin
0b88c5d413
Re-implement searching for QtWebKit
2016-07-07 18:32:52 +02:00