Florian Bruhin
e78fa431c5
Hide Qt warning when aborting download reply.
2015-03-09 07:49:02 +01:00
Florian Bruhin
6a16875f50
Fix retrying of downloads from closed tabs.
...
Fixes #502 .
2015-03-09 07:39:40 +01:00
Florian Bruhin
bfc114ae35
Fix lint
2015-03-08 23:15:35 +01:00
Florian Bruhin
181bcc4f8d
Add tests for lineparser.
2015-03-08 22:13:29 +01:00
Florian Bruhin
60b6519b04
lineparser: Call _prepare_save() properly.
2015-03-08 21:53:42 +01:00
Florian Bruhin
181426b50a
AppendLineParser: Strip newlines in __iter__.
2015-03-08 21:53:42 +01:00
Florian Bruhin
2010e8115b
lineparser: Rename _open_for_reading to _open.
2015-03-08 21:53:42 +01:00
Florian Bruhin
27f4ada799
Add AppendLineParser and use it in WebHistory.
...
The former approach (always reading the whole history from disk) was rather
inefficient, and we had performance problems e.g. when marking text in Qt
documentation.
2015-03-08 21:53:42 +01:00
Florian Bruhin
5b4b793538
Split LineParser into multiple classes.
...
There is now:
- BaseLineParser
- LineParser
- LimitLineParser
2015-03-08 21:53:42 +01:00
Florian Bruhin
99de995813
Rename/move config.parsers.line.LineConfigParser.
...
It's now misc.lineparser.LineParser since it handles other stuff than just
config.
2015-03-08 21:53:42 +01:00
Florian Bruhin
ee8beb174d
Fix :tab-clone -w (i.e. back -w). Fixes #536 .
2015-03-08 15:02:18 +01:00
Florian Bruhin
cd34562d34
Fix :tab-clone with tabs -> tabs-are-windows=true.
...
See #536 .
2015-03-08 14:54:42 +01:00
Florian Bruhin
f7b036cf15
Merge branch 'oed-download_filename_handling'
2015-03-06 17:06:01 +01:00
Florian Bruhin
edf762e210
Avoid pylint duplicate-code warning.
2015-03-06 17:04:56 +01:00
Florian Bruhin
858131c9bc
Merge branch 'download_filename_handling' of https://github.com/oed/qutebrowser into oed-download_filename_handling
2015-03-06 16:39:44 +01:00
Florian Bruhin
0827ddec86
utils.log: Simplify stack printing on Qt warnings.
2015-03-06 16:33:22 +01:00
Florian Bruhin
3e5b9a4a4a
log.utils: Add Qt warning filter context manager.
2015-03-06 16:32:26 +01:00
Florian Bruhin
2c9b5f24fc
Use _shutting_down instead of disconnecting signal
...
This will most likely cause less pain than disconnecting the signal, which
seems to be broken on OS X.
2015-03-06 16:29:04 +01:00
Florian Bruhin
034f1136d3
Add missing qutebrowser.test.log module.
2015-03-06 16:28:30 +01:00
Joel Torstensson
0fb74da4ff
Can now handle relative paths.
2015-03-05 23:44:12 +01:00
Florian Bruhin
7ed8f3d4ac
unittests: Set up logging properly.
2015-03-05 23:41:46 +01:00
Florian Bruhin
7c125642b9
Hide "Error while shutting down tabs" message.
...
This makes no sense at all, yet seems to happen when closing qutebrowser on OS
X via Cmd+Q.
2015-03-05 21:46:56 +01:00
Joel Torstensson
d449a60078
Fixed bug using download dirs with trailing slash.
2015-03-05 20:33:02 +01:00
Joel Torstensson
9cfa34c009
Readded suggested_filename fallback.
2015-03-05 20:17:48 +01:00
Florian Bruhin
61a52f3b91
command: Check the completion/argument counts.
...
See #531 .
2015-03-05 06:20:55 +01:00
Joel Torstensson
7d48845afa
Made static functions private.
2015-03-04 23:05:23 +01:00
Florian Bruhin
ebae77e8c5
Fix lint.
2015-03-04 20:52:33 +01:00
Florian Bruhin
e5ebea80b3
Add qApp.quit atexit handler in tests.
...
This FINALLY fixes the test segfaults on Windows 8.
2015-03-04 20:48:58 +01:00
Florian Bruhin
be6ea2f0e8
Call QApplication.processEvents on exit.
2015-03-04 20:26:19 +01:00
Florian Bruhin
e431f09fab
test_editor: Fix handling of statusbar messages.
2015-03-04 20:25:57 +01:00
Joel Torstensson
4e7e97232e
Downloads using get_request specifying only path now works.
2015-03-04 12:24:26 +01:00
Joel Torstensson
49c666a4a8
get_request is now correct.
2015-03-04 12:06:08 +01:00
Joel Torstensson
68774a2c75
Style fixes.
2015-03-04 11:31:54 +01:00
Joel Torstensson
8e0c1cff7b
Made download suggestion configurable.
...
Fix #505
2015-03-04 11:31:54 +01:00
Joel Torstensson
82deaeed2e
Downloads now shows path in question.
2015-03-04 11:29:36 +01:00
Florian Bruhin
40af99bacc
Clear open target in acceptNavigationRequest.
...
This is a regression introduced in a76868c0f4
.
Fixes #530 .
2015-03-03 23:28:45 +01:00
Florian Bruhin
801f6b2667
Fix handling of signals with deleted tabs.
2015-03-03 23:22:29 +01:00
Gregor Pohl
c8c095d499
Add Opera-like mouse rocker gestures.
2015-03-03 12:58:32 +01:00
Florian Bruhin
f19eba3b40
Don't log cur_link_hovered signals.
2015-03-03 09:07:30 +01:00
Florian Bruhin
21ab5f8685
Add logging for acceptNavigationRequest.
2015-03-03 09:06:43 +01:00
Florian Bruhin
65f21fc8ee
Use unittest.mock.patch for tests. Closes #76 .
2015-03-01 22:10:16 +01:00
Florian Bruhin
c0eb8daff7
Add tests for keyinput->partial-timeout.
2015-03-01 21:35:14 +01:00
Florian Bruhin
003f7fd957
tests: Improve FakeTimer.
2015-03-01 21:30:22 +01:00
Florian Bruhin
bb2caaa11d
Suppress Qt warning in unittests.
2015-03-01 21:30:22 +01:00
Florian Bruhin
84643b4a39
Various unittest fixes and improvements.
2015-02-27 12:43:54 +01:00
Florian Bruhin
072210c47b
Log rfc6266 UnicodeDecodeError to correct logger.
2015-02-27 12:35:46 +01:00
Florian Bruhin
e696898c4a
Add input -> partial-timeout option to clear partial keystrings.
2015-02-27 10:59:03 +01:00
Florian Bruhin
42e2438efb
Return Match instead bool in _handle_single_key.
2015-02-27 10:59:03 +01:00
Florian Bruhin
d66997610b
Use a single Timer for ambigious keybindings.
2015-02-27 10:59:03 +01:00
Florian Bruhin
bfd0a3fbc2
Fix AttributeError when doing extended hinting.
2015-02-27 08:44:44 +01:00
Florian Bruhin
561ebd07f9
Make it possible to use :open -[twb] without url.
2015-02-27 08:10:00 +01:00
Florian Bruhin
5f46870594
Add a FuzzyUrl config type.
2015-02-27 08:08:46 +01:00
Florian Bruhin
6d51fcfb2e
Add a do_search argument to fuzzy_url.
...
This turns off searching no matter what autosearch is set to, and also makes it
possible to use fuzzy_url before the config is up.
For now, we use this for quickmarks and the startpage.
2015-02-27 08:07:40 +01:00
Florian Bruhin
a76868c0f4
Refactor how click/hint open targets are handled.
2015-02-26 20:41:04 +01:00
Florian Bruhin
fa0bfaa49e
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-26 20:21:00 +01:00
Florian Bruhin
eb8bad3d18
Reset open_target in acceptNavigationRequest.
...
After ddb39275eb
, when something was opened via
hints in a new tab, the open_target still was set afterwards and the next
regular open did open in a new tab.
2015-02-26 20:17:01 +01:00
Florian Bruhin
a12dee8898
hints: Include button in buttons().
...
From the QMouseEvent::buttons documentation:
For mouse move events, this is all buttons that are pressed down. For mouse
press and double click events this includes the button that caused the
event. For mouse release events this excludes the button that caused the
event.
2015-02-26 20:12:48 +01:00
Florian Bruhin
ddb39275eb
Simulate Ctrl-click when hinting in new tab/win.
...
This works around the fact some pages (e.g. github) load their content via AJAX
on a normal left click, so we'll never get acceptNavigationRequest and thus
can't open them in a new tab.
Fixes #488 .
2015-02-26 20:11:13 +01:00
Florian Bruhin
4b4bb3af88
Handle NavigationTypeOther acceptNavigationRequest
...
This fixes hinting in some cases where javascript is used to load content, e.g.
on duckduckgo. However it still doesn't seem to help with github files etc.
See #488 .
2015-02-26 20:04:00 +01:00
Florian Bruhin
0ebef4069e
Remove debug console completing completely.
...
Turns out pylint doesn't like it if stuff is unused because we commented code
out ;)
2015-02-26 17:56:45 +01:00
Florian Bruhin
813ce9a513
Disable completion for debug console.
...
As long as it's broken it's more annoying rather than useful.
See #117 .
2015-02-26 17:48:47 +01:00
Florian Bruhin
8e0dddf86a
Restore sys.std* in utils.fake_io on exceptions.
2015-02-26 17:47:07 +01:00
Florian Bruhin
fcbd69e209
Clean up standarddir handling #2 .
...
We already attempted this in c5a2039da4
, but
having the directories as module attributes means they'll be created on start
(rather than when they're actually used), and it'd also be impossible to change
them after init for some reason in the future.
To still have a nice short API, we simply change the attributes to functions.
2015-02-26 07:01:22 +01:00
Florian Bruhin
0d9bf5e2c9
Fix lint.
2015-02-26 06:13:27 +01:00
Samir Benmendil
81af41d77f
Add option to set minimum number of chars in hints
2015-02-26 00:49:50 +00:00
Florian Bruhin
1dc9862c0b
Allow font names with integers in them.
2015-02-25 23:20:09 +01:00
Florian Bruhin
1d27dcca81
Ignore RuntimeError because of deleted Question.
2015-02-25 23:12:23 +01:00
Florian Bruhin
31d9018fc4
Disable insecure SSL ciphers (< 128bit) for Qt 5.2.
...
This is only an issue for the users which are stuck on Ubuntu Trusty.
2015-02-25 21:07:44 +01:00
Florian Bruhin
0fcd016427
Move cursor to end of textboxes when hinting.
2015-02-25 19:56:03 +01:00
Florian Bruhin
9d716d74b4
Fix lint.
2015-02-25 18:01:30 +01:00
Florian Bruhin
891c07f7e3
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-25 17:27:01 +01:00
Florian Bruhin
caad56c978
Print stacktrace on Qt warnings.
2015-02-24 07:12:25 +01:00
Florian Bruhin
0f9a1fe178
Display ImportError messages in earlyinit errors.
2015-02-23 15:16:30 +01:00
Florian Bruhin
94434ea739
Decorate DownloadItem slots with @pyqtSlot.
...
Before, using the right-click menu to cancel the download didn't actually
cancel it, as the QAction.toggled signal was emitted with checked=False which
got interpreted as remove_data=False.
2015-02-23 10:01:37 +01:00
Florian Bruhin
c5a2039da4
Refactor QStandardPaths handling.
2015-02-22 19:13:51 +01:00
Florian Bruhin
cabe5bf2a3
Use the real argparser instance for qtutils tests.
2015-02-22 12:10:42 +01:00
Florian Bruhin
617cd8977b
Add --qt-name argument. See #514 .
2015-02-21 18:53:01 +01:00
Florian Bruhin
359482b511
Fix getting Qt arguments.
2015-02-21 18:52:14 +01:00
Florian Bruhin
0ccb104f48
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-20 17:35:31 +01:00
Florian Bruhin
05d8a2429b
tests: Fix double tearDown.
2015-02-20 09:27:41 +01:00
Florian Bruhin
42c8acc7aa
Fix lint
2015-02-20 09:23:06 +01:00
Florian Bruhin
f33bc7bf31
tests: Get rid of second QCoreApplication.
2015-02-20 09:21:59 +01:00
Florian Bruhin
684f0d3df5
Fix starting with -c '' again.
2015-02-20 09:12:56 +01:00
Florian Bruhin
5fe85d0dde
Add test for starting with -c ''.
2015-02-20 09:09:35 +01:00
Florian Bruhin
60d4305cc4
tests: Adjust environ_set_temp to take a dict.
2015-02-20 08:34:24 +01:00
Florian Bruhin
634028e277
Fix QIODevice warnings when closing tabs.
...
This is a regression introduced in 43c9d69295
.
Fixes #517 .
2015-02-20 07:43:40 +01:00
Florian Bruhin
14f2420500
Fix wrong parsing of faulthandler logs.
2015-02-19 22:45:37 +01:00
Florian Bruhin
a41331a402
Remove test QApplication "fix" again.
...
This causes more segfaults than it prevents...
2015-02-19 22:41:36 +01:00
Florian Bruhin
87951ee3a8
Fix crash when closing tabs on Qt 5.2.1 (Trusty)
...
This issue was introduced in 8f1d81a644
.
2015-02-19 22:20:39 +01:00
Florian Bruhin
b5d3b264e8
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-19 21:38:11 +01:00
Florian Bruhin
2d4b03fbc9
Improve parsing of faulthandler logs.
2015-02-19 21:38:02 +01:00
Florian Bruhin
81fb57bbf0
Revert "Try another workaround for broken Windows tests."
...
This reverts commit 852fe2f84c
.
2015-02-19 16:59:33 +01:00
Florian Bruhin
852fe2f84c
Try another workaround for broken Windows tests.
2015-02-19 10:41:04 +01:00
Florian Bruhin
7dd908bd51
Try calling sip.delete on the test QApplication.
...
Maybe this helps with the unit tests on Windows?
2015-02-19 10:03:19 +01:00
Florian Bruhin
543c6cb90b
Quit test QApplication properly.
...
Maybe this fixes the hangs and crashes on the Windows buildbots?
2015-02-19 07:46:08 +01:00
Florian Bruhin
3d5012ccca
Rename 'Allowed' header for value completions.
2015-02-19 07:10:40 +01:00
Florian Bruhin
dc9e2a9772
Add a list of common user agents to completion.
2015-02-19 07:09:34 +01:00
Florian Bruhin
8c32fb86e2
Make it possible to set options with ! in it.
...
This is needed for a quit! alias for example. The option was wrongly treated as
an inversion even though a value was given.
2015-02-18 23:06:35 +01:00
Florian Bruhin
ea2dba6b38
Merge branch 'master' of ssh://tonks/qutebrowser
2015-02-18 22:20:41 +01:00
Florian Bruhin
3d72235023
Set the QSettings path to a config-subdirectory.
...
QWebInspector uses QSettings to save its GUI-settings. However, the default
path for QSettings is ~/.config/qutebrowser/qutebrowser.conf which overwrites
our own config file.
This fixes one part of #515 .
2015-02-18 22:18:55 +01:00