Commit Graph

8226 Commits

Author SHA1 Message Date
Marc Jauvin
68b12e6e9f add missing lines 2018-02-12 07:31:02 -05:00
Marc Jauvin
0a9c0a1385 on_load_finished() signal handler for scroll-pos
remove get_page()
2018-02-12 07:16:01 -05:00
Marc Jauvin
a0e028a851 Update tab scroll position when finished loading.
Resolves #3322
2018-02-11 22:32:03 -05:00
George Edward Bulmer
164b2a3eef Fix a lengthy line 2018-02-11 23:20:24 +00:00
George Edward Bulmer
72103ec730 Format error type in a different way 2018-02-11 23:16:04 +00:00
Ryan Roden-Corrent
4a8b23380c Trigger save on bookmark-add --toggle.
The toggle option was failing to fire the changed signal when it removed
a bookmark. This means the bookmark file would not be marked as dirty,
and would not be saved on exit/autosave (unless another change was
made).
2018-02-11 16:33:00 -05:00
Simon Doppler
ddc41d2fa4
Remove raw list of open tabs 2018-02-11 22:15:14 +01:00
George Edward Bulmer
21a50cf961 Use the repr() of the exception instead of str() 2018-02-11 17:46:09 +00: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
e10940100d Improve/regenerate docs 2018-02-11 11:17:37 +01:00
Florian Bruhin
9c4564fd70 Merge remote-tracking branch 'origin/pr/3581' 2018-02-11 11:16:20 +01:00
Florian Bruhin
0743094c2f Fix copyright year in __init__.py 2018-02-11 11:12:39 +01:00
Florian Bruhin
32ba5a5c95 Improve styling for qute://version and move button 2018-02-11 11:11:55 +01:00
Florian Bruhin
ab768d6f6a Merge remote-tracking branch 'origin/pr/3567' 2018-02-11 11:11:41 +01:00
Florian Bruhin
bba1eb0d76 Add missing QUrl.RemovePassword 2018-02-11 10:45:08 +01:00
Florian Bruhin
d306f81130 Merge remote-tracking branch 'origin/pr/3525' 2018-02-11 10:44:27 +01:00
Florian Bruhin
007aa8ab8d Add some newlines 2018-02-11 10:35:46 +01:00
Florian Bruhin
772f0025f1 Clean up netrc support 2018-02-11 10:29:02 +01:00
Florian Bruhin
b64eb8dfe6 Merge remote-tracking branch 'origin/pr/3505' 2018-02-11 10:27:00 +01:00
Florian Bruhin
f28ab5285c Merge remote-tracking branch 'origin/pr/3582' 2018-02-11 09:37:49 +01:00
Jay Kamat
f6eb8929c3
Fix incorrect scroll offset after tab pin 2018-02-11 00:20:39 -05:00
Florian Bruhin
70868e1d99 Make pylint shut up 2018-02-10 23:18:43 +01:00
Florian Bruhin
a472351423 Fix typing.Union check on Python 3.5.2
Apparently 3.5.4 has __origin__ for typing.Union, but 3.5.2 has not. Let's hope
this now works everywhere...
2018-02-10 21:27:40 +01:00
Jay Kamat
33d9d4fe90
Improve performance of startup and shutdown
We call 'update_tab_titles' a lot of times which calls 'setTabText' on
every tab. 'setTabText' calls tabSizeHint and minTabSizeHint on every
tab as well, meaning this is an n^2 operation repeated many times.

First, this prevents setTabText from being called unless it's needed,
removing most of the work done.

Second, I remove tabs in reverse, to avoid recomputing the above for
every tab on shutdown (which is at least n^3)
2018-02-10 13:23:35 -05:00
Florian Bruhin
63766c1711 Fix typing.Union checks with Python 3.7 2018-02-10 17:22:21 +01:00
Florian Bruhin
c9bc72a539 Fix docstring 2018-02-10 16:54:45 +01:00
Florian Bruhin
6d750aff8b Merge remote-tracking branch 'origin/pr/3430' 2018-02-10 16:27:41 +01:00
George Edward Bulmer
ffddf9a15f Code style review changes 2018-02-10 15:14:07 +00:00
Marc Jauvin
e6749dcf9f [count] overrides win_id for tab-give cmd
- Resolves #3548
2018-02-10 10:13:07 -05:00
Marc Jauvin
e8cc74f499
Merge branch 'master' into issue#2785 2018-02-10 08:17:47 -05:00
715cc7b7dd
Make statusbar widgets configurable 2018-02-10 13:15:11 +01:00
Florian Bruhin
4ac4833c93 Clean up YamlConfig._handle_migrations 2018-02-10 11:44:18 +01:00
Florian Bruhin
c7133a662c Merge remote-tracking branch 'origin/pr/3577' 2018-02-10 11:40:49 +01:00
Florian Bruhin
995e563352 Update docs 2018-02-10 10:36:58 +01:00
Florian Bruhin
92bc61d08d Merge remote-tracking branch 'origin/pr/3563' 2018-02-10 10:19:52 +01:00
Marc Jauvin
c6ad23f921 address all mentionned issues except for file://
- re-encode url using QUrl.RemovePassword | QUrl.FullyEncoded
- improve readability for clipboard / primary selection code block
2018-02-10 00:38:27 -05:00
Marc Jauvin
504e29c004 fix configfiles tests
- fix test_renamed_key()
- fix test_deleted_key()
- combine both test_merge_persist tests using @pytest.mark.parametrize
- fix _handle_migrations(): mark data dirty for renamed and deleted
2018-02-09 21:25:11 -05:00
Marc Jauvin
d88a13598a syntax improvements and use real class attributes 2018-02-09 17:14:40 -05:00
Florian Bruhin
47ec052194 Merge remote-tracking branch 'origin/pr/3558' 2018-02-09 22:50:00 +01:00
Florian Bruhin
30994b1154 Merge remote-tracking branch 'origin/pr/3555' 2018-02-09 22:48:25 +01:00
Florian Bruhin
207107082d Merge commit '74759fe04c0fa1d465cb36d3f8b00d6ebd9ef49d' 2018-02-09 22:31:34 +01:00
Florian Bruhin
16a3bece34 Add missing import 2018-02-09 22:28:14 +01:00
Florian Bruhin
1ea1c1ac78 Merge remote-tracking branch 'origin/pr/3549' 2018-02-09 22:27:31 +01:00
Florian Bruhin
3a5baa1956 Merge remote-tracking branch 'origin/pr/3554' 2018-02-09 22:22:18 +01:00
Marc Jauvin
74759fe04c add missing decorator to _on_proc_finished 2018-02-09 15:33:02 -05:00
Marc Jauvin
9f49ac8e59 revert "fix shorten line" from origin/master 2018-02-09 15:25:20 -05:00
Florian Bruhin
80650d4c96 Merge remote-tracking branch 'origin/pr/3544' 2018-02-09 21:04:21 +01:00
Marc Jauvin
44af6f3f1b Merge branch 'master' of https://github.com/qutebrowser/qutebrowser into tabs.mode_on_change 2018-02-09 14:57:41 -05:00
Marc Jauvin
9b7db8ee8a Need to mark config as dirty in _handle_migrations()
Add tests for tabs.persist_mode_on_change migration
2018-02-09 14:41:33 -05:00
Marc Jauvin
85dfe5c403 add special code to migrate tabs.persist_mode_on_change setting to tabs.mode_on_change. 2018-02-09 11:28:21 -05:00
Marc Jauvin
a3ce03e0bd address requested changes
- syntax cleanup
- use attr.ib when declaring class attributes
- remove unnecessary comments
- code simplification
2018-02-09 10:39:02 -05:00
Marc Jauvin
fecb551c5e shorten lines 2018-02-09 10:39:02 -05:00
Marc Jauvin
91b70fab70 fix pylint/flake8 errors 2018-02-09 10:39:02 -05:00
Marc Jauvin
f3b52aaf23 fix asciidoc for tabs.mode_on_change 2018-02-09 10:39:02 -05:00
Marc Jauvin
21fc848839 document code a bit more 2018-02-09 10:39:02 -05:00
Marc Jauvin
a7db197e45 replace persist_mode_on_change with mode_on_change
supports old persist_mode_on_change functionality or new save/restore mode
2018-02-09 10:39:02 -05:00
Marc Jauvin
eb7e114e5f add propery to save tab input mode 2018-02-09 10:39:02 -05:00
Marc Jauvin
9e524e4be8 use tabs.mode_on_change to persist or restore mode 2018-02-09 10:39:02 -05:00
Florian Bruhin
5d8b48a2ed Show where a command handler is defined 2018-02-09 16:32:59 +01:00
Florian Bruhin
3e38aab0f6 Document configdata.Migrations 2018-02-09 11:31:25 +01:00
Florian Bruhin
1a81f7231b Make sure multiple wrong keys are reported 2018-02-08 22:02:22 +01:00
Florian Bruhin
298dcb4c90 Validate config separately from migrations
It makes for cleaner code, and it makes sure the target of renamed options
actually exists.
2018-02-08 21:49:41 +01:00
George Edward Bulmer
950e4227e3 Pylint fix 2018-02-08 14:01:51 +00:00
Florian Bruhin
9d32807e33 Don't try to remove watched files if none exist
If we try to remove watched files but we couldn't actually watch any earlier,
we'd get a Qt warning message:

QtWarningMsg: QFileSystemWatcher::removePaths: list is empty
2018-02-08 10:29:17 +01:00
Florian Bruhin
1da58b6a4c Break long line 2018-02-08 09:54:20 +01:00
Florian Bruhin
b6f311f4b2 Remove workaround for old pylint issue 2018-02-08 09:52:14 +01:00
Florian Bruhin
35b56f2659 Remove eslint max-lines suppression
We already turn that off globally now.
2018-02-08 09:51:06 +01:00
Florian Bruhin
f51ac8ab6e Log QFileSystemWatcher errors 2018-02-08 00:32:02 +01:00
George Edward Bulmer
a9dfed948a Remove extraneous function 2018-02-07 22:55:42 +00:00
Florian Bruhin
37a9691e29 Only focus qutebrowser again after editing finished
See #3431, #3432
2018-02-07 23:14:16 +01:00
Florian Bruhin
3306247ae5 Merge branch 'editor-watch' 2018-02-07 22:31:49 +01:00
Florian Bruhin
01ccbc679d Fix lint 2018-02-07 22:26:32 +01:00
George Edward Bulmer
0ee5302836 Pylint fixes 2018-02-07 20:03:46 +00:00
George Edward Bulmer
682c3462f1 Ensure version info only gets pasted once 2018-02-07 19:21:53 +00:00
George Edward Bulmer
9128afa01d Move pastebin_version() to version.py
This also fixes the introduced cyclic dependencies
2018-02-07 19:03:05 +00:00
George Edward Bulmer
a3d62c86df Fix style for linter 2018-02-07 17:28:57 +00:00
George Edward Bulmer
d0ec33730e Add deleteLater to the paste callbacks 2018-02-07 17:28:57 +00:00
George Edward Bulmer
86d3abc0c4 Additional code review changes from PR #3480 2018-02-07 17:28:57 +00:00
George Edward Bulmer
f45d572677 Some style fixes in PR #3480's review 2018-02-07 17:28:57 +00:00
Bryan Kok
1d568a5cf4 Add feature to pastebin version string
Added a --paste flag to the :version command and a JS button with corresponding qutescheme URL in the Version debug page to enable pastebinning version.
2018-02-07 17:28:57 +00:00
Florian Bruhin
aa3970c83e Merge branch 'pr/3371' 2018-02-07 18:26:19 +01:00
Florian Bruhin
054b92bbe8 Support retrying downloads with Qt 5.10
Fixes #2787
2018-02-07 11:19:41 +01:00
Florian Bruhin
5fd3943ebc Make callback mandatory for tab.selection() 2018-02-06 23:33:37 +01:00
Florian Bruhin
ce8d15d2b0 Simplify selection handling and remove QUTE_SELECTED_HTML
It was broken at least since caret support was introduced and it was only
available for QtWebKit anyways, so let's just drop it. This also makes the tab
API a bit simpler.
2018-02-06 22:48:00 +01:00
Florian Bruhin
16375f20d5 Always use JavaScript to get selection
It looks like getting the selection via the widget has issues even with Qt 5.10.

On Windows, we always get wrong results.

On Linux, it seems to be flaky. I first thought this was because of a race
between JavaScript setting the selection and Qt getting it, as now we don't use
JS to get the selection anymore, so it's possible that we get it before the
older JS code finished running. However, even calling selectedText() from a JS
callback didn't seem to help...

Since has_selection also is flawed and it taking a callback would make code more
complex as well, let's just assume there is a selection if the text is not
empty. In fact, that is exactly what QtWebEngine does for hasSelection anyways!

Fixes #3523
2018-02-06 21:58:31 +01:00
George Edward Bulmer
5ceecc2b04 Add docstring for new argument 2018-02-06 18:53:45 +00:00
George Edward Bulmer
9c47128799 Use provided methods instead of protected members 2018-02-06 18:25:15 +00:00
George Edward Bulmer
0893e3a038 Fix boolean variable name 2018-02-06 17:35:24 +00:00
George Edward Bulmer
26810e02c1 Add a way to view source in editor 2018-02-06 17:22:59 +00:00
Florian Bruhin
6f028e9ad0 Update copyright years 2018-02-05 12:19:50 +01:00
seebye
8dbf506916 Fix #3542 going back twice on lazy loading a tab 2018-02-05 01:20:56 +01:00
Florian Bruhin
c8de4675db Various spelling fixes 2018-02-04 21:30:59 +01:00
Jay Kamat
0ebde6f2e9
Delete QWebEngineDownloadItem objects when wrapper object is deleted 2018-02-04 13:41:23 -05:00
Ryan Roden-Corrent
833df95485 Only detect save for open-editor and config-edit.
Scope down the new trigger-on-save behavior to only open-editor and
config-edit. Other uses of the editor such as edit-url and edit-command
will behave as before.
2018-02-03 19:57:47 -05:00
Marc Jauvin
989e60b01f Revert "fix line length"
This reverts commit def2920a35.
2018-02-03 19:10:19 -05:00
Jay Kamat
d7a436568c
Add a new --no-last flag to :tab-focus
--no-last prevents going to the last focused tab if a new tab does not
need to be focused.
2018-02-03 14:31:44 -05:00
Ryan Roden-Corrent
ceab4a4c1f Fix pylint warnings 2018-02-03 08:12:45 -05:00
Ryan Roden-Corrent
eab9b70f28 Fix pylint for editor.py.
Notate unused parameter.
2018-02-01 20:43:35 -05:00
Marc Jauvin
132095c98c only open the tab for output once the job has finished running 2018-01-31 18:05:23 -05:00