Commit Graph

4852 Commits

Author SHA1 Message Date
Florian Bruhin
1e982a9a84 Add/improve tests for qutebrowser.utils.qtutils. 2015-06-07 23:20:34 +02:00
Florian Bruhin
e60f698615 Add/improve tests for qutebrowser.utils.standarddir. 2015-06-07 23:20:34 +02:00
Florian Bruhin
df53ccf426 Write tests for qutebrowser.utils.version. 2015-06-07 23:20:34 +02:00
Florian Bruhin
4204579c06 Add/improve tests for qutebrowser.utils.utils. 2015-06-07 22:53:30 +02:00
Florian Bruhin
4a4856c176 Merge branch 'Carpetsmoker-downloads-cpu' 2015-06-07 21:51:39 +02:00
Florian Bruhin
90b3927906 Merge branch 'downloads-cpu' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-downloads-cpu 2015-06-07 21:51:18 +02:00
Florian Bruhin
2ff6dbd482 Remove unused import. 2015-06-07 21:44:45 +02:00
Florian Bruhin
f85ca19cef Use <noscript> tag for qute:settings without JS.
There was already a noscript tag, this just removes the special check and makes
it a bit more obvious.

See #727.
2015-06-07 21:38:44 +02:00
Florian Bruhin
da2ff6f3cb Update recommended Qt version in README. 2015-06-07 21:27:50 +02:00
Florian Bruhin
525d3ee4c9 Regenerate docs 2015-06-07 17:38:27 +02:00
Florian Bruhin
6b94dc5279 Add continue to default next-regexes. 2015-06-07 17:20:52 +02:00
Martin Tournoij
2fa6c952c2 Use less CPU when downloading files
When downloading a bunch (7 or 8) of files I noticed qutebrowser was using a lot
of CPU (>60%).

I did some looking, and in the `downloadProgress` callback qutebrower emits the
updated signal which causes everything to be updated. We don't really need this,
since _update_speed() calls it every 500ms anyway.

I tested by downloading 3 copies of the 1GB file [on this
page]( http://www.thinkbroadband.com/download.html ) qutebrowser consistently
pulls about 25% CPU on my system.

When removing this call, the system pulls about 17% CPU. Not a great amount, but
still significant enough to warrant a pull request ;-)

Some other notes:

- wget uses about 1.5%-2% for each process when downloading.
- When not doing any UI updates & speed calculations qutebrowser uses about 15%.
- Doing some quick profiling and strategic commenting seems to indicate there
  isn't any other low hanging fruit to be improved on here.
2015-06-07 17:15:04 +02:00
Florian Bruhin
83f7cf84a9 tests: Set progress widget geometry.
This hopefully fixes this warning on Windows:

    QWindowsWindow::setGeometryDp: Unable to set geometry 113x16+192+124 on
    QWidgetWindow/'ProgressClassWindow'. Resulting geometry:  124x16+192+124
    (frame: 8, 31, 8, 8, custom margin: 0, 0, 0, 0, minimum size: 0x0, maximum
    size: 16777215x16777215).
2015-06-07 11:14:14 +02:00
Florian Bruhin
37750b9e30 Regenerate docs. 2015-06-07 10:47:53 +02:00
Florian Bruhin
a82b0d007d Enforce a Qt with SSL support. 2015-06-07 10:47:28 +02:00
Florian Bruhin
e98a05e53d Fix scroll_anchor in javascript tests.
It seems scrollRequested doesn't actually get emitted.
2015-06-07 10:38:58 +02:00
Florian Bruhin
d887623377 Make tests fail on unexpected Qt messages. 2015-06-07 02:34:19 +02:00
Florian Bruhin
e86a79740a Use raising=True for QtBot.waitSignal. 2015-06-07 02:30:36 +02:00
Florian Bruhin
aa4cb2927d Fix TestHideQtWarning tests for pytest 1.4.0.
pytest captures the Qt logging messages, so we can't use qWarning to test.
2015-06-07 02:29:20 +02:00
Florian Bruhin
2117b2afc6 Revert "Skip test which might be responsible for segfaults."
This reverts commit 592ace18d4.
2015-06-07 01:25:10 +02:00
Florian Bruhin
5310c60d58 Remove unused import. 2015-06-07 01:24:24 +02:00
Florian Bruhin
a0e5a3e8ee tox: Update pytest-qt to 1.4.0.
Upstream changelog:

- Messages sent by qDebug, qWarning, qCritical are captured and displayed when
  tests fail, similar to pytest-catchlog. Also, tests can be configured to
  automatically fail if an unexpected message is generated. (See docs).
- New method waitSignals: will block untill all signals given are triggered, see
  docs (thanks @The-Compiler for idea and complete PR).
- New parameter raising to waitSignals and waitSignals: when True (defaults to
  False) will raise a qtbot.SignalTimeoutError exception when timeout is reached,
  see docs (thanks again to @The-Compiler for idea and complete PR).
- pytest-qt now requires pytest version >= 2.7.

Internal changes to improve memory management

- QApplication.exit() is no longer called at the end of the test session and
  the QApplication instance is not garbage collected anymore;
- QtBot no longer receives a QApplication as a parameter in the constructor,
  always referencing QApplication.instance() now; this avoids keeping an extra
  reference in the qtbot instances.
- deleteLater is called on widgets added in QtBot.addWidget at the end of each
  test;
- QApplication.processEvents() is called at the end of each test to make sure
  widgets are cleaned up;
2015-06-07 01:24:02 +02:00
Florian Bruhin
5a73ad0c19 Improve spell-checker case-sensitivity.
This only checks case-insensitively for the first char, so things like
"QMouseEvent" don't trigger the check.
2015-06-07 01:24:02 +02:00
Florian Bruhin
def41e70bf Fix some spelling mistakes. 2015-06-07 01:24:02 +02:00
Florian Bruhin
fd75f77108 Fix spell checker to check all files. 2015-06-07 01:24:02 +02:00
Lamar Pavel
5bacbc9d38 Remove obsolete try-except block 2015-06-06 14:07:57 +02:00
Lamar Pavel
de0686c50a Error messages and explicit test for None
Error messages for validate() are more specific.

Return of standarddir.conf() is explicitly tested for None to avoid ambiguity
with other falsey values.
2015-06-06 14:04:45 +02:00
Martin Tournoij
b0880df695 Execute in the current tab, and not the first one 2015-06-05 23:29:38 +02:00
Martin Tournoij
94178c558a Well, getting the error doesn't work... 2015-06-05 20:09:19 +02:00
Florian Bruhin
2459f14f6f Update changelog. 2015-06-05 17:53:16 +02:00
Florian Bruhin
015de0e6db misc_checks: Check spelling case-insensitively. 2015-06-05 17:51:33 +02:00
Florian Bruhin
ace7877010 Merge branch 'Carpetsmoker-issue-716' 2015-06-05 17:50:29 +02:00
Florian Bruhin
d3e85ad982 Update docs. 2015-06-05 17:50:00 +02:00
Florian Bruhin
5fb23f1373 Also migrate older search calls. 2015-06-05 17:45:38 +02:00
Florian Bruhin
8001099661 Adjust tests. 2015-06-05 17:45:32 +02:00
Florian Bruhin
708d0d9c27 Merge branch 'issue-716' of https://github.com/Carpetsmoker/qutebrowser into Carpetsmoker-issue-716 2015-06-05 17:38:52 +02:00
Florian Bruhin
d3f7d9319a tox: Update py to 1.4.28.
Upstream changelog:

- fix issue64 -- dirpath regression when "abs=True" is passed. Thanks Gilles
  Dartiguelongue.
2015-06-05 17:29:00 +02:00
Florian Bruhin
6ec8bbaca5 tox: Update pytest-mock to 0.6.0.
Upstream changelog:

- Two new auxiliary methods, spy and stub.
2015-06-05 17:27:59 +02:00
Florian Bruhin
e38169433e tox: Update pytest-flakes to 1.0.0.
Upstream changelog:

- Fix issue #6 - support PEP263 for source file encoding.
- Clarified license to be MIT like pytest-pep8 from which this is derived.
2015-06-05 17:26:49 +02:00
Martin Tournoij
dfada850e0 Update code after refactor, and add migration 2015-06-05 16:52:33 +02:00
Martin Tournoij
a7b10a090f Merge branch 'master' into issue-716 2015-06-05 16:45:52 +02:00
Martin Tournoij
fc4c7bd2e4 Merge the cookies-accept and third-party-cookie-policy settings 2015-06-05 16:20:50 +02:00
Lamar Pavel
402aa66756 Merge branch 'master' of github.com:The-Compiler/qutebrowser 2015-06-05 16:10:55 +02:00
Florian Bruhin
b55e22b5c3 Refactor key mode/parser handling in modeman. 2015-06-05 15:29:09 +02:00
Martin Tournoij
fa65f345ac Perhaps fix it more properly after all :-) 2015-06-05 15:19:40 +02:00
Martin Tournoij
57ddd8e95e Always handle the <Esc> key, even if it's bound.
This fixes #716, which sufficiently annoyed me to make this quick fix. It's not
a great fix, but it's not worse than what we had already, and the current
behaviour is very surprising IMHO.
2015-06-05 14:26:17 +02:00
Florian Bruhin
728f06e797 Close context menu if another mode was entered.
Fixes #735.
2015-06-05 11:15:22 +02:00
Florian Bruhin
7102459c81 Rename _get_modeman() to instance(). 2015-06-05 11:15:18 +02:00
Florian Bruhin
622938e3d3 Fix completion performance with shrink=True.
Before, the completion was shrinked every time any item was removed/added to
the completion (rowsRemoved/rowsInserted signals), which was >3000 times when
completing history.

Also, the signals got connected multiple times if setting the same model, which
made the situation worse.

Fixes #734.
2015-06-05 07:16:33 +02:00
Florian Bruhin
c776958388 Merge branch 'Carpetsmoker-yank-domain' 2015-06-05 06:39:53 +02:00